Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: added build script #293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kayrus
Copy link

@kayrus kayrus commented Aug 22, 2016

Build script should build skydns on any host which has go 1.5+ binary.
Also added scripts/updatedep script which updates vendor dependencies using glide.

@kayrus kayrus force-pushed the kayrus/build_vendor branch 2 times, most recently from a90e4d5 to e679f9d Compare August 22, 2016 12:05
@miekg
Copy link

miekg commented Aug 22, 2016

sorry, I'm just not a fan of all this vendoring....

@kayrus
Copy link
Author

kayrus commented Aug 22, 2016

@miekg it actually helps users to build go apps without downloading dependencies every time. also it pins package versions. I had to spend quite a lot of time to configure/get all these dependencies until I was able to build a skydns binary.

@kayrus kayrus force-pushed the kayrus/build_vendor branch from e679f9d to 77db949 Compare August 22, 2016 21:13
@kayrus
Copy link
Author

kayrus commented Aug 22, 2016

@miekg updated commit, added test script and fixed tests.

@kayrus kayrus force-pushed the kayrus/build_vendor branch from 77db949 to 83299e8 Compare August 22, 2016 21:34
@miekg
Copy link

miekg commented Aug 22, 2016

Sorry, but I'm not ready to vendor and then having to update all these
every so often.

I'm also not sure why a build script is needed and why go get is
insufficient....?

On 22 Aug 2016 10:18 pm, "kayrus" [email protected] wrote:

@miekg https://github.com/miekg updated commit, added test script and
fixed tests.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#293 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAVkW0wMU7977Ca58kXuyOsS_-RBLugWks5qihILgaJpZM4Jpymr
.

@kayrus
Copy link
Author

kayrus commented Aug 22, 2016

@miekg

  1. try to build your app on fresh OS which only has go binaries and nothing more.
  2. try to build it when there are also several apps with default GOPATH which would like to add cross-referenced deps of different versions.

@miekg
Copy link

miekg commented Aug 23, 2016

Just did:

% cd g/src/github.com/miekg
% git clone [email protected]:skynetservices/skydns
% go get -u
% go build
% ./skydns -version
skydns server version: 2.5.3a

I'm not ready to start vendoring as I'm then forced to update them every so often. Yes the downside is that the build can and will break.

@kayrus
Copy link
Author

kayrus commented Aug 23, 2016

@miekg you already have a GOPATH and a structure of GOROOT. I told you about "clean" machine. I.e. Clean cloud image of ubuntu xenial:

$ sudo apt-get install golang -y
$ git clone https://github.com/skynetservices/skydns
$ cd skydns
$ go get -u
package _/home/ubuntu/skydns: unrecognized import path "_/home/ubuntu/skydns" (import path does not begin with hostname)
$ go build
main.go:25:2: cannot find package "github.com/coreos/etcd/client" in any of:
        /usr/lib/go-1.6/src/github.com/coreos/etcd/client (from $GOROOT)
        ($GOPATH not set)
main.go:26:2: cannot find package "github.com/coreos/etcd/pkg/transport" in any of:
        /usr/lib/go-1.6/src/github.com/coreos/etcd/pkg/transport (from $GOROOT)
        ($GOPATH not set)
main.go:27:2: cannot find package "github.com/miekg/dns" in any of:
        /usr/lib/go-1.6/src/github.com/miekg/dns (from $GOROOT)
        ($GOPATH not set)
main.go:20:2: cannot find package "github.com/skynetservices/skydns/backends/etcd" in any of:
        /usr/lib/go-1.6/src/github.com/skynetservices/skydns/backends/etcd (from $GOROOT)
        ($GOPATH not set)
main.go:21:2: cannot find package "github.com/skynetservices/skydns/metrics" in any of:
        /usr/lib/go-1.6/src/github.com/skynetservices/skydns/metrics (from $GOROOT)
        ($GOPATH not set)
main.go:22:2: cannot find package "github.com/skynetservices/skydns/msg" in any of:
        /usr/lib/go-1.6/src/github.com/skynetservices/skydns/msg (from $GOROOT)
        ($GOPATH not set)
main.go:23:2: cannot find package "github.com/skynetservices/skydns/server" in any of:
        /usr/lib/go-1.6/src/github.com/skynetservices/skydns/server (from $GOROOT)
        ($GOPATH not set)
main.go:28:2: cannot find package "golang.org/x/net/context" in any of:
        /usr/lib/go-1.6/src/golang.org/x/net/context (from $GOROOT)
        ($GOPATH not set)

Here is my branch with the build script:

$ ./scripts/build
$ ./skydns --version
skydns server version: 2.5.3a

@miekg
Copy link

miekg commented Aug 23, 2016

[ Quoting [email protected] in "Re: [skynetservices/skydns] build: ..." ]

@miekg you already have a GOPATH and a structure of GOROOT. I told you about "clean" machine. I.e. Clean cloud image of ubuntu xenial:

Ack, but I don't want to maintain such a script. This is more akin to setting up
Go from scratch (with a nudge to SkyDNS), then really something SkyDNS specific

@kayrus
Copy link
Author

kayrus commented Aug 23, 2016

@miekg well, I don't know what can I say. Just imagine opensource world without make or cmake...

@mischief
Copy link

+1 for this.

if you don't wish to vendor the dependencies, at least use https://github.com/Masterminds/glide to create a version lockfile for the dependencies.

this way, it makes packaging easy because all dependencies and their versions can be listed in one place.

@miekg
Copy link

miekg commented Sep 12, 2016

[ Quoting [email protected] in "Re: [skynetservices/skydns] build: ..." ]

+1 for this.

if you don't wish to vendor the dependencies, at least use https://github.com/Masterminds/glide to create a version lockfile for the dependencies.

That's one of the first not bat-shit-crazy vendoring tools I've come across.

this way, it makes packaging easy because all dependencies and their versions can be listed in one place.

You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#293 (comment)
/Miek

Miek Gieben

@mountkin
Copy link

go get is broken on the master branch.

# github.com/coreos/etcd/clientv3
src/github.com/coreos/etcd/clientv3/client.go:344: cannot use c.tokenCred (type *authTokenCredential) as type credentials.PerRPCCredentials in argument to grpc.WithPerRPCCredentials:
	*authTokenCredential does not implement credentials.PerRPCCredentials (wrong type for GetRequestMetadata method)
		have GetRequestMetadata("context".Context, ...string) (map[string]string, error)
		want GetRequestMetadata("golang.org/x/net/context".Context, ...string) (map[string]string, error)
src/github.com/coreos/etcd/clientv3/client.go:400: cannot use client.balancer (type *healthBalancer) as type grpc.Balancer in argument to grpc.WithBalancer:
	*healthBalancer does not implement grpc.Balancer (wrong type for Get method)
		have Get("context".Context, grpc.BalancerGetOptions) (grpc.Address, func(), error)
		want Get("golang.org/x/net/context".Context, grpc.BalancerGetOptions) (grpc.Address, func(), error)
src/github.com/coreos/etcd/clientv3/retry.go:117: cannot use *retryKVClient literal (type *retryKVClient) as type etcdserverpb.KVClient in return argument:
	*retryKVClient does not implement etcdserverpb.KVClient (wrong type for Compact method)
		have Compact("context".Context, *etcdserverpb.CompactionRequest, ...grpc.CallOption) (*etcdserverpb.CompactionResponse, error)

@miekg
Copy link

miekg commented Dec 14, 2017

Note that CoreDNS (coredns.io) should be able to give you a similar experience to SkyDNS and it waaay more actively maintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants