project: use vndr for vendoring#27912
Conversation
|
Yes for native vendor dir. |
|
ping @tianon |
|
can we keep We've taught people how to do vendoring for some time, so any pointers we could give people that are used to the existing workflow would help :D |
|
We also should leave a comment on these PR's https://github.com/docker/docker/pulls?q=is%3Aopen+is%3Apr+label%3Astatus%2Fneeds-vendoring to explain what needs to be changed |
|
@thaJeztah I'd love never write bash again, but if you insist. |
|
@thaJeztah put |
|
@LK4D4 no, this is perfect, just what I meant, thanks! We can remove the file in a while, it's just temporary :) |
|
works like a charm, @LK4D4 yeah pls do not remove |
hack/make/validate-default-seccomp
Outdated
|
Apart from a minor typo, seems like a huge improvement, LGTM. |
|
Fixed typo. Thanks! |
hack/vendor.sh
Outdated
There was a problem hiding this comment.
Yes, you're right. I'll fix
vendor.conf
Outdated
There was a problem hiding this comment.
Would this transition be a good opportunity to require hashes for each vendored repo? Relying on upstream tags kind of worries me.
There was a problem hiding this comment.
I'd like to keep it outside this PR because it would move it back to design review. There is no consensus among maintainers about using tags vs revisions.
There was a problem hiding this comment.
Definitely for a separate PR, but my ideal would be both "tag" (if exists, and for readability) and hash. I.e. "0.5.2 -> 0.5.3" gives meaning to a change, but the hash makes sure that an upstream doesn't re-push a tag (which happened!)
tianon
left a comment
There was a problem hiding this comment.
Overall looks sane to me! 👍 ❤️
(just one minor comment)
hack/vendor.sh
Outdated
There was a problem hiding this comment.
This $@ should be quoted, ie:
vndr "$@"|
@tianon @aaronlehmann fixed comments! |
|
ping @thaJeztah @vdemeester |
vdemeester
left a comment
There was a problem hiding this comment.
LGTM 🐸
Need vndr locally to update the vendor though right ? (we could have a make vendor or something, but could be done in a follow-up PR)
|
moving to merge! |
Signed-off-by: Alexander Morozov <[email protected]>
|
This breaks effectively all downstream dependents of this repo with compilation failures like: |
|
@tamird whoa, that is really unfortunate. |
|
Yes, go's vendoring feature is basically terrible for this reason :( |
|
Actually I kinda know what to do. Like in etcd, we need to move vendor folder under cmd. Will try tomorrow. |
- What I did
Vendored all dependencies with github.com/LK4D4/vndr and removed
hack/vendor.sh. Also, I've fixed some minor stuff:go buildbecause pathes doesn't work correctly withAUTO_GOPATHI tried
make validate,make crossandhack/make.sh {dyn}binaryinmake shellwithAUTO_GOPATH=1and without it.I think
vndrprovides slightly better experience thanhack/vendor.shwith same features.- How I did it
Slightly modified
hack/vendor.shto convert it tovendor.confand ranvndrtool.- How to verify it
Try to compile docker.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)