Skip to content

x/tools/gopls: signal version differences in go.mod when using go.work #57026

@hyangah

Description

@hyangah

go.mod is not a lock file and go's module version selection may pick versions different from what are written in go.mod require statement. But most of time, we expect the versions appearing in go.mod are the versions actually in use. Especially, when using go.work or replace or exclude come into play, the difference can be sometimes confusing.

How about surfacing this when the versions chosen by Go and written in the main module's go.mod are different?
Either using 1) inlay hints next to the require statement or 2) informational diagnostics on the require statement.

cc ideas from @ianthehat

Metadata

Metadata

Assignees

Labels

FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.goplsIssues related to the Go language server, gopls.modules

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions