Skip to content
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: go get @downgrade should log when dependencies are removed #37764

Closed
misterpickypants opened this issue Mar 9, 2020 · 2 comments
Closed

Comments

@misterpickypants
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.14 darwin/amd64

What did you do?

I installed a binary via go get at an older version than the corresponding lib that I was using. This silently removed a seemingly unrelated dependency, cause a subsequent build of my package to fail because the dependency was automatically re-added, but at the latest version.

module myproject

go 1.14

require (
  github.com/some/lib v1.1.0   // depends on github.com/other/lib v1.5.0
  github.com/other/lib v1.5.0
  ...
)

Installing an old binary via go get github.com/other/lib/cmd/binary v1.4.0 can remove the dependency on github.com/some/lib if there is no old version of some/lib that matches the v1.4.0 target.

The problem is that this removal is completely silent.

A subsequent build of myproject will automatically re-add the dependency, but at the latest version.

What did you expect to see?

I'd like a clear message indicating if seemingly unrelated dependencies are removed because no acceptable combination of versions was found.

@bcmills
Copy link
Contributor

bcmills commented Mar 9, 2020

Duplicate of #33284

@bcmills bcmills marked this as a duplicate of #33284 Mar 9, 2020
@bcmills
Copy link
Contributor

bcmills commented Mar 9, 2020

(or at least a specific instance of it.)

@bcmills bcmills closed this as completed Mar 9, 2020
@golang golang locked and limited conversation to collaborators Mar 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants