-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go/internal/modload: reject the -modfile flag in workspace mode #60033
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
Conversation
This PR (HEAD: 1e6c402) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/493315 to see it. Tip: You can toggle comments from me using the |
Message from Bryan Mills: Patch Set 1: Code-Review+2 (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
This PR (HEAD: 64c8d4a) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/493315 to see it. Tip: You can toggle comments from me using the |
Message from Zeke Lu: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Bryan Mills: Patch Set 2: Auto-Submit+1 Code-Review+2 Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Gopher Robot: Patch Set 2: TryBot-Result-1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Bryan Mills: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Gopher Robot: Patch Set 2: TryBot-Result-1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Currently, in workspace mode, the -modfile flag affects all the modules listed in the go.work file. This is not desirable most of the time. And when it results in an error, the error message does not help. For example, when there are more than one modules listed in the go.work file, running "go list -m -modfile=path/to/go.mod" gives this error: go: module example.com/foo appears multiple times in workspace This change reject -modfile flag explicitly with this error message: go: -modfile cannot be used in workspace mode While at here, correct some typos in the modload package.
This PR (HEAD: 7dbc9c3) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/493315 to see it. Tip: You can toggle comments from me using the |
Message from Zeke Lu: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Bryan Mills: Patch Set 3: Auto-Submit+1 Code-Review+2 Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Gopher Robot: Patch Set 3: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Message from Gopher Robot: Patch Set 3: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/493315. |
Currently, in workspace mode, the -modfile flag affects all the modules listed in the go.work file. This is not desirable most of the time. And when it results in an error, the error message does not help. For example, when there are more than one modules listed in the go.work file, running "go list -m -modfile=path/to/go.mod" gives this error: go: module example.com/foo appears multiple times in workspace This change reject -modfile flag explicitly with this error message: go: -modfile cannot be used in workspace mode While at here, correct some typos in the modload package. Fixes #59996. Change-Id: Iff4cd9f3974ea359889dd713a747b6932cf42dfd GitHub-Last-Rev: 7dbc9c3 GitHub-Pull-Request: #60033 Reviewed-on: https://go-review.googlesource.com/c/go/+/493315 TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Auto-Submit: Bryan Mills <[email protected]> Run-TryBot: Bryan Mills <[email protected]>
This PR is being closed because golang.org/cl/493315 has been merged. |
Currently, in workspace mode, the -modfile flag affects all the modules
listed in the go.work file. This is not desirable most of the time. And
when it results in an error, the error message does not help.
For example, when there are more than one modules listed in the go.work
file, running "go list -m -modfile=path/to/go.mod" gives this error:
go: module example.com/foo appears multiple times in workspace
This change reject -modfile flag explicitly with this error message:
go: -modfile cannot be used in workspace mode
While at here, correct some typos in the modload package.
Fixes #59996.