Skip to content

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

@matloob

Description

@matloob

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions