Skip to content

Upgrade direct dependencies in combination with the go tool directive: #3706

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

Open
hu3bi opened this issue Mar 6, 2025 · 5 comments
Open

Comments

@hu3bi
Copy link

hu3bi commented Mar 6, 2025

Is your feature request related to a problem? Please describe.

When clicking "Upgrade direct dependencies", VS Code pulls in several unnecessary (tool) dependencies, which are removed after running go mod tidy. This behavior may be confusing, especially for new Go developers.
Describe the solution you'd like
I would prefer the same outcome as running go get -u all

Or vscode could just keep the behavior as it is and run go mod tidy afterward

Additional context
golang/go#71663

@h9jiang
Copy link
Member

h9jiang commented Mar 6, 2025

Hi hu3bi,

Thanks for reporting this issue. The code lens is reported from gopls, see documentation.

Behind the scene, its running go get -d ..... from command.go.

I'm not expert of go binary, maybe @samthanawalla can share thoughts or concerns see if this is ok to change the implementations.

@h9jiang h9jiang added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 6, 2025
@ansaba
Copy link

ansaba commented Mar 6, 2025

cc: @matloob

@h9jiang
Copy link
Member

h9jiang commented Mar 6, 2025

Based on the discussion, I think we can do a go mod tidy after upgrade dependency.

Or consider running go get -u ./... behind the scene.

@gopherbot
Copy link
Collaborator

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2025
@h9jiang
Copy link
Member

h9jiang commented Apr 7, 2025

I should remove the waiting for info tag. This is a FR.

@h9jiang h9jiang reopened this Apr 7, 2025
@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 7, 2025
@h9jiang h9jiang removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Apr 7, 2025
@h9jiang h9jiang reopened this Apr 7, 2025
@h9jiang h9jiang modified the milestones: Untriaged, vscode-go/backlog Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants