-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: '"bzr": executable file not found in $PATH' when fetching github.com/influxdata/platform #29790
Comments
Ok its even worse than I first through, having downloaded
If I edit the |
We're discussing separately in influxdata/influxdb#11222, but the dependencies are valid albeit very indirect:
|
@stevenh Since The issue with the go tool trying to fetch replaced dependencies is #27859, which is already fixed at tip and also in the 1.12 beta. |
When filing an issue, please title the issue according to the actual symptom you observed, not a hypothesis as to its cause. The From influxdata/influxdb#11222 (comment), it appears that your issue has been resolved. Is there anything remaining to do here? |
Sorry about the title was trying to be helpful and didn’t think downloads fail when You are right in this case Even when the influx devs kindly fixed the issue, I would expect the standard flow i.e. to just re-run the According to feedback from the influx devs the dependency was for tests only which raises another potential issue that there doesn’t seem to be any way in Back to the main issue of dependency In this case we were lucky, influx was a direct dependency it could have been many levels deep so we could have been stuck waiting for many repos update before we do anything, which seems to be a serious problem with go.mod The hope this makes sense? |
In general |
Thanks @bcmills will re-test this flow when 1.12 is released, which seems like it fixing a lot of issues in this area, and will update the thread based on that. |
A test dependency is a dependency. We intend for That said, your dependency on |
I was mistaken: the |
So just to confirm my understanding; are you saying that that building any project which is e.g. If so this sounds like projects are going to suffer from dependency bloat quickly and could even break if said dependencies aren't publicly available. |
Depends on what you mean by “download the dependencies”. You will need to download the |
Thanks for clarifying, so it sounds like size bloat wont be a direct issue then, but this could still easily lead to issues when test only dependencies aren't available publicly or there's some other issue downloading Do you think it would make sense to make said failures a warning and not fatal error, which they appear to be now? |
No, they cannot be warnings. In general we do not know how the missing modules might impact the selected versions of other modules in the build graph, so if we just drop those modules we might (more-or-less silently) end up with a different configuration from what we expected for the given version. Reproducibility is a critical feature of modules, so we shouldn't degrade to a non-reproducible configuration without explicit user intervention. |
Do you see any solution to the specific problem of test only dependency causing failures such as this? Pretty much every other package manager has the concept of separate runtime and build / test dependencies. Which when translated to golang, as a development language, would mean separate build and test dependencies; without which there is a real risk of 3rd party dependencies resulting in failure as demonstrated by what we saw here. Other areas of the golang tool chain clearly know the difference between normal code and test code so it’s seems reasonable to continue this. With this is mind I believe we need a clear method of mitigating such an issue if the tool is to be successful and not cause frustration that would prevent adoption. |
The solution currently on the roadmap is to provide a module proxy that can cache and serve We're certainly keeping an eye on issues surrounding test dependencies, but at the moment we do not plan to separate test (or tool) dependencies from other general module dependencies. |
As far as I can tell there are no remaining direct actions to take for this issue. We can revisit the story around transitive dependencies once we see how the use of module proxies shakes out. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
GO111MODULE=on go get -u=patch
or
GO111MODULE=on go mod vendor
What did you expect to see?
I expected the commands to succeed.
What did you see instead?
The cause of this is we have a dependency on
github.com/influxdata/platform
which has a dependency in its go.mod file oflaunchpad.net/gocheck
andlabix.org/v2/mgo
however neither packages are reference bygithub.com/influxdata/platform
This means that both
go get
andgo mod vendor
when run with module support incorrectly assume that intermediate go.mod files are valid.Even worse is a matching
replace
in the localgo.mod
doesn't apply and hence can not be used to override the 3rd party dependency.This means that the failure of a 3rd party to update their
go.mod
can prevents any dependent projects from downloading / updating.The text was updated successfully, but these errors were encountered: