-
Notifications
You must be signed in to change notification settings - Fork 1k
dep cannot vendor dependencies that do not have Go source code #1306
Comments
I hit same issue when trying to use dep to manage some non-Go build tools. |
This also happens when fetching e.g. github.com/docker/docker, which doesn't have Go code in the root (since v0.9.1 at least):
Version:
|
yeah...this is tricky. i'm considering the possibility that we change the rules on the only other alternative i can think of right now is something like #269, which is a whole other can of worms.
yeah, the design here implicitly expects that you give this is gonna be a point of friction for a while, unfortunately. the easiest way to make e.g. your editor's autocomplete work is to just trick it by also having that project on |
Thanks for your answer @sdboyer.
In my view, any arbitrary binary is potentially usable by Go code, so that's seems a bit of an odd restriction. Maybe there could just be an option to override this behaviour?
In this case, I'm trying to grab the docker client which is under |
the key here is the definition of "usable" - dep is, for now, primarily concerned with what is necessary to compile Go code. not generate; not run. it's nice when we can also capture those things, but for now, they're not our primary objective. that puts arbitrary binaries out of scope, unless i've missed something quite big about extensible compiler capabilities. (entirely possible!)
|
I have a related issue. Not sure if I should open a new issue for that though: |
@discordianfish this issue is specifically about the case where there's no Go code in a dependency, which is different from having no Go code in the current project. |
Oh perfect, thanks! Sorry for the noise. |
Have a look at github.com/heptio/contour. I’m using the pattern you describe and it is working well.
… On 11 Nov 2017, at 01:40, discordianfish ***@***.***> wrote:
Oh perfect, thanks! Sorry for the noise.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi @sdboyer, Would be nice to have a workaround in the meantime. Many people are trying to use dep and are blocked by this issue :/ |
yeah, i don't see any problems with expanding the definition of |
Happy to lend some commits while I am enjoying my time of being unemployed if you want to assign this or any other issues to me |
Hi @sdboyer, I can contribute to this issue as well. We just need to clarify your expectations. Do you wish that we remove the constraint looking for *.go files? (IMO that's what we should do) or do we handle it as a warning? Lines 219 to 226 in 13df556
|
Here's a PR for it #1398. Feedback welcome, thanks. |
i'm delighted to see all the offers to help ❤️ ❤️ this is how these things get done! but yeah, lemme clarify the requirements here. we can't mess with to the specifics. right now, the behavior of the solver is that:
what we want to do here is tease apart actual
this achieves the outcome i described in an earlier comment: #1306 (comment) there's going to be more work to do here. in addition to likely needing to update some of gps' tests, we'll want at least one new one to cover this particular path (and probably a few to cover combinations of conditions). crucially, we're also going to need to change how the hasherdoes its work, as we're changing the semantics of imports and required's so that they're no longer identical: we'll need to break them out into separate groups. this change will also then entail a bump o the |
Lots of offers of work but I see no open PRs? Is anyone working on this at the moment? It's a blocker for our transition (and I unfortunately do not have spare cycles at this time 😞 ). |
nope, nobody is on this at the moment, unfortunately. it involves solver changes, so it's a rather tricky task to take on. |
* This does not include the code generators, such as gogen, because of an open issue in dep: golang/dep#1306. * This adds a new dependency that was not previously identified with glide: github.com/petar/GOLLRB
I am working on this, there was a lot of overlap between the changes needed for this and the transitive constraint prototype so I had a head start. 😀 |
* This does not include the code generators, such as gogen, because of an open issue in dep: golang/dep#1306. * This adds a new dependency that was not previously identified with glide: github.com/petar/GOLLRB
@carolynvs This is an interesting point, because what you suggest above does not appear to be the behaviour, perhaps I'm missing something. I have a Go project Is there an override I can use to vendor the entirety of project |
@hamid-elaosta Here is an example of how I vendored the k8's codegen repos: |
@carolynvs Thanks for the links. Unfortunately neither seems to work (and dep complains about redundant prune options) I'm not sure if it's some combination of my project requirements that is preventing it but the error message didn't change. The project I'm attempting to vendor is on a specific branch (non-master), the constraint is overridden with an SSH path because it's a private (corporate) git server, and my local copy was not go-g[o]t but git cloned (because go-get won't check out over ssh from our git server). EDIT: I should add, dep ensure worked when I had a go file in the sub-package that contains the proto, but it was removed in a recent update to that project (it's now generated after checkout). |
Hit the same issue when trying to use dep to get HTML static file from another project. |
I tried to use dep to get
Then i got all files in my |
The only purpose at the moment is to allow vendoring of the SPDK source code into Go projects which manage dependencies with the "dep" tool. That tool is designed for Go projects and as a sanity check rejects any dependency which does not have at least one Go file, at least at the moment (golang/dep#1306). Change-Id: I22458d0895729ad7d8ea53e7541e9089da1d448a Signed-off-by: Patrick Ohly <[email protected]> Reviewed-on: https://review.gerrithub.io/416831 Tested-by: SPDK Automated Test System <[email protected]> Reviewed-by: Daniel Verkamp <[email protected]> Reviewed-by: Ben Walker <[email protected]>
@zhexuany I think your problem is not related to this issue, and you could open a new issue or reach out to the community if this problem still bothers you.
The |
tried to avoid pruning |
My case was solved by following options.
|
Solution from @tico8 works! However I wonder if I |
@carolynvs I am following how you construct your Gopkg.toml file for k8s dependencies. However, I still encountered this problem while trying to get k8s.io/client-go, k8s.io/api, k8s.io/apimachinery. My Dep Version:
My Gopkg.toml (I've exhausted every combination, with or without prune):
Run Dep ensure -v
|
What version of
dep
are you using (dep version
)?What
dep
command did you run?I am trying to convert a project that uses glide to vendor two repositories containing protocol buffer definitions. The abstract from
glide.yaml
isThe two repositories in question are
github.com/envoyproxy/data-plane-api
andgithub.aaakk.us.kg/googleapis/googleapis
. When I try to adddep ensure refuses to vendor the repositories
What did you expect to see?
those two repositories vendored into
vendor/
What did you see instead?
The text was updated successfully, but these errors were encountered: