Skip to content

cmd/go: improve error message from '-mod=readonly'ย #29118

Open
@leitzler

Description

@leitzler

What version of Go are you using (go version)?

$ go version
go version go1.11.2 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
N/A

What did you do?

Run go build -mod=readonly when an update of go.mod is needed.

What did you expect to see?

A more descriptive error message. Since -mod=readonly is typically supposed to be used in CI, it will save a lot of manual work if the error message did actually tell why an update to go.mod is needed.

E.g.:
go: github.com/sirupsen/[email protected] requires github.com/stretchr/[email protected], but go.mod require @v1.2.1 and updates is disabled by -mod=readonly

What did you see instead?

go: updates to go.mod needed, disabled by -mod=readonly

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.modules

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions