I have a c library that I link with my go app. Source of this library is vendored in ./vendor directory along with other go dependencies (managed by dep). When I run dep ensure however, it seems to delete the c lib directory in ./vendor. Is there any way that I can instruct dep to keep everything that's not tracked by gopkg.toml intact?
I'm not sure I get the issue, so I'll ask some questions to understand better:
c code vendored by dep? Or did you add it manually?prune options defined in Gopkg.toml?dep assumes that it owns vendor/ and will delete it when it needs to change any dependencies. If you want to add any packages and control them, use something else besides vendor/
c code is not vendored by dep.prune option. So it should be the default.I'm using a custom script to vendor c code because it uses git submodules and complicates things a bit on my end. It would be great if I could tell dep not to touch certain directories in vendor.
I have a similar issue in a project that requires some packages managed with gx (IPFS package manager)- these cannot be managed outside gx. Would be great if I could use dep for all non-gx packages by telling it to stop deleting vendor/gx.
This can also be noticed with:
@buddyspike Hey buddy, Did you find any solutions to keep your own package?
Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!
Most helpful comment
I'm not sure I get the issue, so I'll ask some questions to understand better:
ccode vendored bydep? Or did you add it manually?pruneoptions defined inGopkg.toml?depassumes that it ownsvendor/and will delete it when it needs to change any dependencies. If you want to add any packages and control them, use something else besidesvendor/