Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hyangah opened this issue Dec 1, 2022 · 1 comment
Open
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Dec 1, 2022

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

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Dec 1, 2022
@gopherbot gopherbot added this to the Unreleased milestone Dec 1, 2022
@hyangah hyangah added FeatureRequest and removed gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. labels Dec 1, 2022
@toothrot toothrot added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Dec 1, 2022
@findleyr findleyr added the gopls Issues related to the Go language server, gopls. label Dec 6, 2022
@findleyr
Copy link
Contributor

findleyr commented Dec 6, 2022

Makes sense to me.

CC @bcmills, who may have insight.

@bcmills bcmills added the modules label Dec 6, 2022
@findleyr findleyr modified the milestones: Unreleased, gopls/v0.12.0 Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest gopls Issues related to the Go language server, gopls. modules NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

5 participants