nsqio / go-nsq

The official Go package for NSQ
MIT License
2.59k stars 444 forks source link

dep; update .travis.yml #218

Closed judwhite closed 6 years ago

judwhite commented 6 years ago

Use dep for dependency management.

Two reasons:

Per the dep README:

dep is still changing rapidly. If you need stability (e.g. for CI), it's best to rely on a released version, not tip.

Given this advice, added the following to .travis.yml:

  - wget -O dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64
  - chmod +x dep
  - ./dep ensure

to replace:

  - go get github.com/golang/snappy

Note revision = "d9eb7a3d35ec988b8585d4a0068e462c27d28380" is taken from nsqio/nsq/Godeps#L6. You could also specify branch = "master" (or version = "x.y.z" if tags exist and you trust semver), which would mimic the go get command but would differ from nsqio/nsq.

Added go 1.9.x to .travis.yml.

Similar PR coming for nsqio/nsq if this approach works.

RFR @mreiferson @jehiah @ploxiln

mreiferson commented 6 years ago

this is great, thanks @judwhite!

want to squash down?

mreiferson commented 6 years ago

Actually, one question β€” dep supports libraries, not just binaries?

judwhite commented 6 years ago

@mreiferson Yes it does. If you use dep to import a library which also uses dep, it reads its Gopkg.toml to determine which ones you need to resolve. How it deals with conflicts I haven't read about yet, but I know you can override your deps' deps with whatever revision you want.

Squash merge, or do you prefer a merge commit?

mreiferson commented 6 years ago

squash merge

ploxiln commented 6 years ago

@mreiferson IIRC you previously/typically had the opposite preference - manual squash then merge commit, over github-squash-merge no-merge-commit?

mreiferson commented 6 years ago

I misunderstood, since he can’t merge the PR, and I had asked, that he could only be talking about what do do with the commits in this branch.

judwhite commented 6 years ago

@mreiferson Squashed.