-
Notifications
You must be signed in to change notification settings - Fork 34
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
Handling of nested-vendoring #5
Comments
@ijc25 Yeah, nested vendoring is really hard :/ Trying to automate it definitely won't work for all users. I'd vote for a separate tool which can read all repos vendored files and report if you need to update. |
Hard> Yes :-/ A separate tool seems like a reasonable solution. It might be useful to that goal to have vndr not strip the vendor.conf files out of things which it pulls in? |
ijc
pushed a commit
to ijc/vndr
that referenced
this issue
Apr 7, 2017
Related to LK4D4#5 this allows a human (or maybe in the future a tool) to see if what is being vendored by the top-level project is consistent with what the vendored projects themselves are vendoring. Follow the pattern of licenseFilesRegex by using a regex even though it currently only matches one file, to allow for easier extension in the future. Signed-off-by: Ian Campbell <[email protected]>
ijc
pushed a commit
to ijc/vndr
that referenced
this issue
Apr 10, 2017
Related to LK4D4#5 this allows a human (or maybe in the future a tool) to see if what is being vendored by the top-level project is consistent with what the vendored projects themselves are vendoring. Signed-off-by: Ian Campbell <[email protected]>
ijc
pushed a commit
to ijc/vndr
that referenced
this issue
Apr 10, 2017
Related to LK4D4#5 this allows a human (or maybe in the future a tool) to see if what is being vendored by the top-level project is consistent with what the vendored projects themselves are vendoring. Signed-off-by: Ian Campbell <[email protected]>
thaJeztah
added a commit
to thaJeztah/vndr
that referenced
this issue
Apr 27, 2019
Related to LK4D4#5 this allows a human (or maybe a tool) to see if what is being vendored by the top-level project is consistent with what the vendored projects themselves are vendoring. Signed-off-by: Sebastiaan van Stijn <[email protected]>
LK4D4
pushed a commit
that referenced
this issue
Apr 28, 2019
Related to #5 this allows a human (or maybe a tool) to see if what is being vendored by the top-level project is consistent with what the vendored projects themselves are vendoring. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I vendor a package which itself vendors stuff then I somehow need to ensure that I satisfy the requirements of that package.
I'll use swarmkit as an example. If I vendor docker/swarmkit into my project then I also need to pickup the contents of docker/swarmkit/vendor.conf somehow.
Before I switched to vndr I was simply dumping a copy of docker/swarmkit into
vendor/github.com/docker/swarmkit
, including thevendor/github.com/docker/swarmkit/vendor
directory. This almost worked since go will consultvendor/github.com/docker/swarmkit/vendor
while buildingvendor/github.com/docker/swarmkit
(but not otherwise, which is quite nice for encapsulation).However it didn't actually work because
vendor/golang.org/x/net/context/
is treated as distinct fromvendor/github.com/docker/swarmkit/vendor/golang.org/x/net/context/
and hence theContext
objects used in my project could not be passed to Swarmkit functions (since the types don't match).My manual solution was to "promote" (with
mv(1)
) the subset of packages which need to cross the API boundary fromvendor/github.com/docker/swarmkit/vendor
to my project'svendor
dir. In practice this was a fairly small/manageable subset (golang.org/x/net
,google.golang.org/grpc
andgit.f4.workers.dev/golang/protobuf
).With vndr I toyed with removing the code which removes nested
vendor
directories, but that suffers from the type mismatch problem mentioned. There is no mechanism with vndr to promote things in the way that I was doing.I ended up simply lifting the whole of
docker/swarmkit/vendor.conf
into myvendor.conf
, but that's rather manual (and prone to getting out of date). I'm not sure what other way this could be handled. Some half baked thoughts:Neither of those seem like perfect options though.
The text was updated successfully, but these errors were encountered: