You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using vgo @ 69d657270ed243a47e733d2f6546e619907cfe4b
go version go1.10.1 linux/amd64 vgo:2018-02-20.1
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
GOHOSTARCH=amd64
GOHOSTOS=windows
What did you do?
I'm running vgo build in this application sample github.com/dlsniper/depapp (this is placed still inside $GOPATH) and github.com/sirupsen/logrus v1.0.5 gets removed from go.mod file.
What did you expect to see?
I would expect that if the user explicitly specifies a dependency and version, then the version is still kept there (or upgraded if needed), not removed.
Removing this has the potential to create needless churn in VCS history as new dependencies are added and vgo build runs. It's also a surprising behavior to see this happen, even if the same package version is inferred by the tool.
What did you see instead?
The dependency was removed from the file.
The text was updated successfully, but these errors were encountered:
Sorry, but as you appear to know already, this is working as intended. Minimizing go.mod has many positive benefits once you understand that's what is happening.
The reason I opened this is that I was confused for a few minutes as to what's happening and why.
As I wrote the file by hand, I am expecting that go build won't change it in this way. I would expect the version to be upgraded if needed, but not entirely removed.
So, I think others would be equally confused about this property. I would rather avoid this surprising behavior and introduce this as a clean-up functionality to vgo list -cleanup or similar.
I would ask to either reconsider this or at least keeping it open for a little longer to see if others face a similar situation.
What version of Go are you using (
go version
)?I'm using vgo @ 69d657270ed243a47e733d2f6546e619907cfe4b
go version go1.10.1 linux/amd64 vgo:2018-02-20.1
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?GOHOSTARCH=amd64
GOHOSTOS=windows
What did you do?
I'm running
vgo build
in this application samplegithub.com/dlsniper/depapp
(this is placed still inside $GOPATH) andgithub.com/sirupsen/logrus v1.0.5
gets removed fromgo.mod
file.What did you expect to see?
I would expect that if the user explicitly specifies a dependency and version, then the version is still kept there (or upgraded if needed), not removed.
Removing this has the potential to create needless churn in VCS history as new dependencies are added and
vgo build
runs. It's also a surprising behavior to see this happen, even if the same package version is inferred by the tool.What did you see instead?
The dependency was removed from the file.
The text was updated successfully, but these errors were encountered: