Skip to content

Commit d1d61bc

Browse files
committed
src/goInstallTools: pin dlv-dap version @ 89ed5a0
Building from master is too risky. Eventually, we want to allow users to choose the version to install or allow Nightly/Preview mode users to install from the master. But that's not included in this CL. Fixes #1661 Change-Id: Ib3d6a4b63b1084b30bc8a24e69453395e622810a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/339449 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]>
1 parent 80c1009 commit d1d61bc

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

src/goInstallTools.ts

-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ export async function installTools(
161161
const toInstall: Promise<{ tool: Tool; reason: string }>[] = [];
162162
for (const tool of missing) {
163163
const modulesOffForTool = modulesOff;
164-
165164
const reason = installTool(tool, goVersion, envForTools, !modulesOffForTool);
166165
toInstall.push(Promise.resolve({ tool, reason: await reason }));
167166
}

src/goToolsInformation.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,18 @@ export const allToolsInformation: { [key: string]: Tool } = {
213213
modulePath: 'github.com/go-delve/delve',
214214
replacedByGopls: false,
215215
isImportant: true,
216-
description: 'Go debugger (Delve)'
216+
description: 'Go debugger (Delve)',
217+
minimumGoVersion: semver.coerce('1.12') // dlv requires 1.12+ for build
217218
},
218219
'dlv-dap': {
219220
name: 'dlv-dap',
220221
importPath: 'github.com/go-delve/delve/cmd/dlv',
221222
modulePath: 'github.com/go-delve/delve',
222223
replacedByGopls: false,
223224
isImportant: true,
224-
description: 'Go debugger (Delve built for DAP experiment)',
225-
defaultVersion: 'master', // Always build from the master.
226-
minimumGoVersion: semver.coerce('1.14'), // last 3 versions per delve policy
225+
description: 'Go debugger & debug adapter (Delve DAP)',
226+
defaultVersion: 'v1.7.1-0.20210729173401-89ed5a0b1972', // pinned version
227+
minimumGoVersion: semver.coerce('1.12'), // dlv requires 1.12+ for build
227228
latestVersion: semver.parse('v1.7.1-0.20210729173401-89ed5a0b1972'),
228229
latestVersionTimestamp: moment('2021-07-29', 'YYYY-MM-DD')
229230
},

test/integration/install.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ suite('Installation Tests', function () {
160160
{ name: 'guru', versions: ['v1.0.0'], wantVersion: 'v1.0.0' },
161161
{
162162
name: 'dlv-dap',
163-
versions: ['v1.0.0', 'master'],
163+
versions: ['v1.0.0', getTool('dlv-dap').defaultVersion!],
164164
wantVersion: 'v' + getTool('dlv-dap').latestVersion!.toString()
165165
}
166166
],
@@ -175,7 +175,7 @@ suite('Installation Tests', function () {
175175
{ name: 'guru', versions: ['v1.0.0'], wantVersion: 'v1.0.0' },
176176
{
177177
name: 'dlv-dap',
178-
versions: ['v1.0.0', 'master'],
178+
versions: ['v1.0.0', getTool('dlv-dap').defaultVersion!],
179179
wantVersion: 'v' + getTool('dlv-dap').latestVersion!.toString()
180180
}
181181
],

tools/allTools.ts.in

+6-5
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,18 @@ export const allToolsInformation: { [key: string]: Tool } = {
211211
modulePath: 'github.com/go-delve/delve',
212212
replacedByGopls: false,
213213
isImportant: true,
214-
description: 'Go debugger (Delve)'
214+
description: 'Go debugger (Delve)',
215+
minimumGoVersion: semver.coerce('1.12') // dlv requires 1.12+ for build
215216
},
216217
'dlv-dap': {
217218
name: 'dlv-dap',
218219
importPath: 'github.com/go-delve/delve/cmd/dlv',
219220
modulePath: 'github.com/go-delve/delve',
220221
replacedByGopls: false,
221-
isImportant: false,
222-
description: 'Go debugger (Delve built for DAP experiment)',
223-
defaultVersion: 'master', // Always build from the master.
224-
minimumGoVersion: semver.coerce('1.14'), // last 3 versions per delve policy
222+
isImportant: true,
223+
description: 'Go debugger & debug adapter (Delve DAP)',
224+
defaultVersion: '%s', // pinned version
225+
minimumGoVersion: semver.coerce('1.12'), // dlv requires 1.12+ for build
225226
latestVersion: semver.parse('%s'),
226227
latestVersionTimestamp: moment('%s', 'YYYY-MM-DD')
227228
},

tools/generate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ func main() {
269269
}
270270

271271
// TODO(suzmue): change input to json and avoid magic string printing.
272-
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")])
272+
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")])
273273

274274
// Write tools section.
275275
b.WriteString(toolsString)

0 commit comments

Comments
 (0)