Skip to content

go/version: doesn't handle devel toolchain versions #73369

Closed
@prattmic

Description

@prattmic

If I build a binary with a tip toolchain and read the debug/buildinfo out of it, I get a GoVersion that looks something like devel go1.25-9ce47e66e8 Wed Mar 26 03:48:50 2025 -0700.

If I am using go/version to compare versions, everything falls over because go/version considers the above output to be invalid (IsValid() == false), and then Compare sorts it before everything else.

I'd really like this to compare equal to go1.25, so that it also compares greater than go1.24.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions