This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 646
Fixes #310 - install Missing Analysis Tool. Better feedback would be nice #375
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f50ee69
With this commit, goInstallTools will log simply for successes, give …
cee7993
This commit removes an errant console.log statement.
cad2363
This commite fixes the usage of installTool in goReferences (updates …
76c98da
This commit removes the debug logging that was added for a different …
727d157
This commit corrects a missing semi-colon and non strict equals.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ import cp = require('child_process'); | |
import path = require('path'); | ||
import { getBinPath } from './goPath'; | ||
import { byteOffsetAt, canonicalizeGOPATHPrefix } from './util'; | ||
import { installTool } from './goInstallTools'; | ||
import { installTools } from './goInstallTools'; | ||
|
||
export class GoReferenceProvider implements vscode.ReferenceProvider { | ||
|
||
|
@@ -40,7 +40,7 @@ export class GoReferenceProvider implements vscode.ReferenceProvider { | |
try { | ||
if (err && (<any>err).code === 'ENOENT') { | ||
vscode.window.showInformationMessage('The "guru" command is not available. Use "go get -v golang.org/x/tools/cmd/guru" to install.', 'Install').then(selected => { | ||
installTool('guru'); | ||
installTools(['guru']); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW -There's another open issue tracking adding this logic to all of the places where we put up an error about a tool not being available. Would be great to address this as well either as part of this change or as a follow-on change. |
||
}); | ||
return resolve(null); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ export class GoCompletionItemProvider implements vscode.CompletionItemProvider { | |
currentWord = word.substr(0, position.character - wordAtPosition.start.character); | ||
} | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not needed? |
||
if (currentWord.match(/^\d+$/)) { | ||
return resolve([]); | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I was meaning to look into/change was running these serially instead of in parallel. I'm pretty sure
go get
has issues when multiple gets are run in parallel, and users have reported that the existing extension occasionally runs into errors. Since you are making changes here - may make sense to also just change this to do the gets serially?