-
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 : Errors in go get all
cause the tool to stop and not finish the work
#34451
Comments
|
Ok, I see. I've been trying to figure out these differences. When it is said, update "indirect" dependencies, does that mean my cache contains versions of a deps, deps that are potentially higher than listed in that deps own module file? Though there is still a problem because since this versioning issue exists, it is causing |
version selection works by building out a graph of dependencies recursively "indirect" means not directly imported by your packages (dependency of a dependency, dependency under specific conditions (test, build tags))
cache just saves you a roundtrip to remote servers, which version is used is still decided by building out he graph of needed dependencies |
I get that, thanks! Maybe I am having UI / useability issues? I felt like something was now partially updated :( I am left wondering if I am in an odd state? Did the tooling rollback or was nothing even updated? It would be nice to be told that. I am clueless. I would like a warning with a prompt (Y/N) from the tooling anytime you are about to update anything indirectly. There are so many switches and combinations, you could do this when you don't want to. In fact, maybe a mode that prompts anytime the go.mod or go.sum file will be touched. That would give me the opportunity to pause and try to understand what I just did. Eventually I could turn that off. |
This is the same underlying problem as #30831: prior to modules, the repository lacked an indication of its canonical import path. GOPATH mode did not verify import paths unless an (It is important to detect this error because packages within a repo or module may There are several possible short-term workarounds:
I notice that you already found and applied workaround (1). Long term, we need better support for repositories whose import paths have changed. That is tracked in #30831. |
Duplicate of #30831 |
@ardan-bkennedy The import path for DATA-DOG/sqlmock has changed. The new import path is |
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?
using this project
https://github.com/ardanlabs/service
I ran
go get -u all
and received an error.When I run
go get -u ./...
everything succeeds.What did you expect to see?
I expected
go get -u all
to behave the same way asgo get -u ./...
What did you see instead?
I saw the documented failure about the invalid version.
What's worse,
go get
stopped finishing it's update. This is the real problem for me.More information
I understand the failure. I am using a dependency
github.com/GuiaBolso/darwin
that imported the DataDoggo-sqlmock
package viagopkg.in
. The latest version ofgo-sqlmock
has ago.mod
file. There is an incompatibility as we are seeing.To fix this I added a
replace
command in mygo.mod
filehttps://github.com/ardanlabs/service/blob/master/go.mod
Version 1.3.0 is the highest version of
go-sqlmock
that does not have ago.mod
file.The text was updated successfully, but these errors were encountered: