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: clean up command-line-arguments interaction with MainModules #49228

Open
matloob opened this issue Oct 29, 2021 · 0 comments
Open

cmd/go: clean up command-line-arguments interaction with MainModules #49228

matloob opened this issue Oct 29, 2021 · 0 comments

Comments

@matloob
Copy link
Contributor

@matloob matloob commented Oct 29, 2021

This is a clean up task outside of the scope of workspaces, but which would be nice to do:

Before workspaces, when the go command was in module mode, but not in any particular module, it had a fake Target module with the path command-line-arguments and an empty modroot. This was directly translated in workspace mode to a MainModules set with a single entry with that fake module path and empty modroot.

Instead, we should make MainModules.Len() == 0 mean that we're in module mode but not inside any module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants