Skip to content

cmd/go: pass expected version to compiler #19064

@rsc

Description

@rsc

Split off from discussion #18678, there referred to as "2".

Plan is to add a new internal-use flag to the compiler, -needversion,
and the compiler dies with a useful error if its own runtime.Version
does not match the passed in flag. When invoking the compiler,
the go command would pass -needversion with its own runtime.Version.
The check would then detect when the go command and the compiler
disagree about the Go toolchain version, which happens (to sometimes
mysterious effect) when the first 'go' in $PATH does not match the
$GOROOT environment setting.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions