diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index e27b16b6a8..bc8dead420 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -161,7 +161,6 @@ export async function installTools( const toInstall: Promise<{ tool: Tool; reason: string }>[] = []; for (const tool of missing) { const modulesOffForTool = modulesOff; - const reason = installTool(tool, goVersion, envForTools, !modulesOffForTool); toInstall.push(Promise.resolve({ tool, reason: await reason })); } diff --git a/src/goToolsInformation.ts b/src/goToolsInformation.ts index 90c8356ea8..cdb63d5754 100644 --- a/src/goToolsInformation.ts +++ b/src/goToolsInformation.ts @@ -213,7 +213,8 @@ export const allToolsInformation: { [key: string]: Tool } = { modulePath: 'github.com/go-delve/delve', replacedByGopls: false, isImportant: true, - description: 'Go debugger (Delve)' + description: 'Go debugger (Delve)', + minimumGoVersion: semver.coerce('1.12') // dlv requires 1.12+ for build }, 'dlv-dap': { name: 'dlv-dap', @@ -221,9 +222,9 @@ export const allToolsInformation: { [key: string]: Tool } = { modulePath: 'github.com/go-delve/delve', replacedByGopls: false, isImportant: true, - description: 'Go debugger (Delve built for DAP experiment)', - defaultVersion: 'master', // Always build from the master. - minimumGoVersion: semver.coerce('1.14'), // last 3 versions per delve policy + description: 'Go debugger & debug adapter (Delve DAP)', + defaultVersion: 'v1.7.1-0.20210729173401-89ed5a0b1972', // pinned version + minimumGoVersion: semver.coerce('1.12'), // dlv requires 1.12+ for build latestVersion: semver.parse('v1.7.1-0.20210729173401-89ed5a0b1972'), latestVersionTimestamp: moment('2021-07-29', 'YYYY-MM-DD') }, diff --git a/test/integration/install.test.ts b/test/integration/install.test.ts index c4875f57e7..00eaef336a 100644 --- a/test/integration/install.test.ts +++ b/test/integration/install.test.ts @@ -160,7 +160,7 @@ suite('Installation Tests', function () { { name: 'guru', versions: ['v1.0.0'], wantVersion: 'v1.0.0' }, { name: 'dlv-dap', - versions: ['v1.0.0', 'master'], + versions: ['v1.0.0', getTool('dlv-dap').defaultVersion!], wantVersion: 'v' + getTool('dlv-dap').latestVersion!.toString() } ], @@ -175,7 +175,7 @@ suite('Installation Tests', function () { { name: 'guru', versions: ['v1.0.0'], wantVersion: 'v1.0.0' }, { name: 'dlv-dap', - versions: ['v1.0.0', 'master'], + versions: ['v1.0.0', getTool('dlv-dap').defaultVersion!], wantVersion: 'v' + getTool('dlv-dap').latestVersion!.toString() } ], diff --git a/tools/allTools.ts.in b/tools/allTools.ts.in index 33d46b7d4d..ee85474abf 100644 --- a/tools/allTools.ts.in +++ b/tools/allTools.ts.in @@ -211,17 +211,18 @@ export const allToolsInformation: { [key: string]: Tool } = { modulePath: 'github.com/go-delve/delve', replacedByGopls: false, isImportant: true, - description: 'Go debugger (Delve)' + description: 'Go debugger (Delve)', + minimumGoVersion: semver.coerce('1.12') // dlv requires 1.12+ for build }, 'dlv-dap': { name: 'dlv-dap', importPath: 'github.com/go-delve/delve/cmd/dlv', modulePath: 'github.com/go-delve/delve', replacedByGopls: false, - isImportant: false, - description: 'Go debugger (Delve built for DAP experiment)', - defaultVersion: 'master', // Always build from the master. - minimumGoVersion: semver.coerce('1.14'), // last 3 versions per delve policy + isImportant: true, + description: 'Go debugger & debug adapter (Delve DAP)', + defaultVersion: '%s', // pinned version + minimumGoVersion: semver.coerce('1.12'), // dlv requires 1.12+ for build latestVersion: semver.parse('%s'), latestVersionTimestamp: moment('%s', 'YYYY-MM-DD') }, diff --git a/tools/generate.go b/tools/generate.go index 4f0948ec0a..a3f64f722f 100644 --- a/tools/generate.go +++ b/tools/generate.go @@ -269,7 +269,7 @@ func main() { } // TODO(suzmue): change input to json and avoid magic string printing. - toolsString := fmt.Sprintf(string(data), goplsVersion.Version, goplsVersion.Time[:len("YYYY-MM-DD")], goplsVersionPre.Version, goplsVersionPre.Time[:len("YYYY-MM-DD")], dlvVersion.Version, dlvVersion.Time[:len("YYYY-MM-DD")]) + toolsString := fmt.Sprintf(string(data), goplsVersion.Version, goplsVersion.Time[:len("YYYY-MM-DD")], goplsVersionPre.Version, goplsVersionPre.Time[:len("YYYY-MM-DD")], dlvVersion.Version, dlvVersion.Version, dlvVersion.Time[:len("YYYY-MM-DD")]) // Write tools section. b.WriteString(toolsString)