@@ -989,9 +989,13 @@ function allFoldersHaveSameGopath(): boolean {
989
989
return vscode . workspace . workspaceFolders . find ( ( x ) => tempGopath !== getCurrentGoPath ( x . uri ) ) ? false : true ;
990
990
}
991
991
992
- export async function shouldUpdateLanguageServer ( tool : Tool , cfg : LanguageServerConfig ) : Promise < semver . SemVer > {
992
+ export async function shouldUpdateLanguageServer (
993
+ tool : Tool ,
994
+ cfg : LanguageServerConfig ,
995
+ mustCheck ?: boolean
996
+ ) : Promise < semver . SemVer > {
993
997
// Only support updating gopls for now.
994
- if ( tool . name !== 'gopls' || cfg . checkForUpdates === 'off' || IsInCloudIDE ) {
998
+ if ( tool . name !== 'gopls' || ( ! mustCheck && ( cfg . checkForUpdates === 'off' || IsInCloudIDE ) ) ) {
995
999
return null ;
996
1000
}
997
1001
@@ -1501,7 +1505,7 @@ async function suggestGoplsIssueReport(
1501
1505
// just prompt them to update, not file an issue.
1502
1506
const tool = getTool ( 'gopls' ) ;
1503
1507
if ( tool ) {
1504
- const versionToUpdate = await shouldUpdateLanguageServer ( tool , latestConfig ) ;
1508
+ const versionToUpdate = await shouldUpdateLanguageServer ( tool , latestConfig , true ) ;
1505
1509
if ( versionToUpdate ) {
1506
1510
promptForUpdatingTool ( tool . name , versionToUpdate , true ) ;
1507
1511
return ;
@@ -1580,6 +1584,7 @@ You will be asked to provide additional information and logs, so PLEASE READ THE
1580
1584
// Get the user's version in case the update prompt above failed.
1581
1585
const usersGoplsVersion = await getLocalGoplsVersion ( latestConfig ) ;
1582
1586
const extInfo = getExtensionInfo ( ) ;
1587
+ const goVersion = await getGoVersion ( ) ;
1583
1588
const settings = latestConfig . flags . join ( ' ' ) ;
1584
1589
const title = `gopls: automated issue report (${ errKind } )` ;
1585
1590
const goplsLog = sanitizedLog
@@ -1596,7 +1601,9 @@ Failed to auto-collect gopls trace: ${failureReason}.
1596
1601
const body = `
1597
1602
gopls version: ${ usersGoplsVersion }
1598
1603
gopls flags: ${ settings }
1604
+ update flags: ${ latestConfig . checkForUpdates }
1599
1605
extension version: ${ extInfo . version }
1606
+ go version: ${ goVersion ?. format ( true ) }
1600
1607
environment: ${ extInfo . appName } ${ process . platform }
1601
1608
initialization error: ${ initializationError }
1602
1609
manual restart count: ${ manualRestartCount }
0 commit comments