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 mod tidy
ignores go.work
file
#50750
Comments
Tidiness is a property of an individual module, not a workspace: if a module is tidy, then a downstream consumer of the module knows which versions to use for every dependency of every package in that module. If you don't particularly care about downstream consumers having a package that is provided by the workspace, you can use Otherwise, you either need to publish the workspace dependencies before running |
@matloob, for Go 1.19 I wonder if we should augment the |
go mod tidy
ignores go.work
` filego mod tidy
ignores go.work
` file
go mod tidy
ignores go.work
` filego mod tidy
ignores go.work
file
Currently with reproducing repository (https://github.com/bozaro/go-work-play/tree/go-mod-tidy). I can run:
And But for This behaviour looks like inconsistent: I expects that |
What valid use cases are there for |
This is also happening for I agree with @liadmord, the only benefit I see get from the |
I agree with @bozaro @liadmord and @AlmogBaku I have a monorepo private project where I have multiple modules, and on each one I need to insert a lot of |
Many of my colleagues have this need |
a big problem for go 1.18 workspace mode |
Encountering the same issue with Furthermore, some other
Expected behaviour: The |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Minimal reproducing repository: https://github.com/bozaro/go-work-play/tree/go-mod-tidy
Full script:
What did you expect to see?
I expect
go.mod
andgo.sum
updated with current working copy state.What did you see instead?
I see that
go mod tidy
try to get modules forshared
go modules from repository ignoringgo.work
content.The text was updated successfully, but these errors were encountered: