Skip to content

goInstallTools: show PATH entries when go is missing#4028

Open
098tarik wants to merge 2 commits into
golang:masterfrom
098tarik:master
Open

goInstallTools: show PATH entries when go is missing#4028
098tarik wants to merge 2 commits into
golang:masterfrom
098tarik:master

Conversation

@098tarik
Copy link
Copy Markdown

@098tarik 098tarik commented May 3, 2026

Problem

When the extension cannot find the go binary, the existing prompt points
users to install Go but does not help diagnose PATH mismatches inside VS
Code. Instead, it shows a very disruptive blog of paths that is usually cutoff
as it does not fit the notification UI.

Change

This change updates the missing-go prompt to offer a "Show PATH Entries"
action alongside the download link.

The PATH action opens a quick pick with the PATH entries searched for the
go binary. This makes it easier to spot missing or unexpected
directories.

The prompt message is also trimmed to report GOROOT separately and avoid
dumping the full PATH into the error text.

Implementation

The choice handling is split into small local helpers in
goInstallTools.ts. Brief comments are also added for the new prompt
actions and the PATH parsing helper.

Testing

Tested with npm run bundle-dev

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 3, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gopherbot
Copy link
Copy Markdown
Collaborator

This PR (HEAD: 44712bf) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/vscode-go/+/773540.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Gopher Robot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 1: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 1:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-05-04T14:22:34Z","revision":"51ca6e18c7e2ed62439a5fe16018b404d11cb258"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 1: -Commit-Queue

(Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_3771561>)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 1:

This CL has failed the run. Reason:

Tryjob golang/try/x_vscode-go-go1.25-linux-amd64_docker has failed with summary (view all results):


To reproduce, try gomote repro 8682725664689088305.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Go LUCI:

Patch Set 1: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Tarik C. Brown:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Tarik C. Brown:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@098tarik
Copy link
Copy Markdown
Author

098tarik commented May 8, 2026

@madelinekalil Could you try running the pipeline again?

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 1: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 1:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-05-08T14:50:46Z","revision":"51ca6e18c7e2ed62439a5fe16018b404d11cb258"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 1: -Commit-Queue

(Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_3771561>)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 1:

This CL has failed the run. Reason:

Tryjob golang/try/x_vscode-go-gotip-linux-amd64_docker has failed with summary (view all results):


To reproduce, try gomote repro 8682361477483305825.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

This PR (HEAD: 88085e9) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/vscode-go/+/773540.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Tarik C. Brown:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Tarik C. Brown:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 2: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 2:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-05-11T21:06:04Z","revision":"4ccb7779f5669033272a4711a9e4ecc0b04a6e94"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Madeline Kalil:

Patch Set 2: -Commit-Queue

(Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_3771561>)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 2:

This CL has failed the run. Reason:

Tryjob golang/try/x_vscode-go-gotip-linux-amd64_docker has failed with summary (view all results):


To reproduce, try gomote repro 8682066089191021425.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 2: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Hongxiang Jiang:

Patch Set 3: Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 3:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-05-18T18:36:56Z","revision":"9681cf53d639c0418fcd0c14beed784e62232f4c"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from Hongxiang Jiang:

Patch Set 3: -Commit-Queue

(Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_3494492>)


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 3:

This CL has failed the run. Reason:

Tryjob golang/try/x_vscode-go-go1.26-linux-amd64_docker has failed with summary (view all results):


To reproduce, try gomote repro 8681441293986970801.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Copy Markdown
Collaborator

Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com:

Patch Set 3: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/773540.
After addressing review feedback, remember to publish your drafts!

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

Successfully merging this pull request may close these issues.

2 participants