-
Notifications
You must be signed in to change notification settings - Fork 1k
finding the VCS root of a vendored package #355
Comments
Hi, thanks for the issue! It's very helpful when folks bring in perspectives like these. It seems like dep should meet your requirements just fine:
Is that enough info? |
Thanks, that’s helpful. I’ll have a look later as to whether I can put the pieces together correctly. One additional question: is there a tell-tale sign that a project uses dep as opposed to other vendoring tools? I assume we’d need to make this logic conditional on the vendoring tool which was used. |
The indicator to look for would be the name and location of the files in the root directory - at minimum, a However, it's premature to design against such things. As the README notes, we're still in the experimental phase. We're actively planning on changing those file names - #168 - and there's a good chance they'll change again on full integration into the go toolchain. |
I should note - for your purposes, creating a |
For now, we have adopted a less involved fix on the Debian end, which is also compatible with other vendoring tools: Debian/dh-make-golang@99a2380 I’ll defer implementing dep-specific code until that becomes necessary/beneficial :). Let’s close the issue as there’s nothing left to be done. Thanks for your help! |
Thanks for reaching out! Please do raise any other issues or questions as you run into them. Now's the time to make sure we consider things, and integration into system package management is not an area we've spent a ton of time on. And, clearly, such things are complicated 😄 |
Context: Debian/dh-make-golang#46
For packaging Go programs in Debian, we must separate Go libraries into individual Debian packages; vendoring is verboten as per Debian-wide policy.
The Debian tooling (specifically
dh-make-golang
) discovers all dependencies of a program by usingvcs.RepoRootForImportPath
. This doesn’t work when dependencies are vendored, as there is precisely one VCS repository into which all packages are copied.Is there any way to programmatically determine the repo root for packages vendored using golang/dep? If not, could one be added? Recording the repo root in a JSON file would be sufficient, for example.
The text was updated successfully, but these errors were encountered: