From f78c016d5a67c7f7a4f7916193ca3204e2693cf5 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Sat, 19 Sep 2020 07:19:19 -0400 Subject: [PATCH 001/189] [release] package.json: default 'go.coverMode' to be 'default' According to `go help testflag`, the actual default of `-covermode` when it's not explicitly set is affected by the `-race` flag. -covermode set,count,atomic Set the mode for coverage analysis for the package[s] being tested. The default is "set" unless -race is enabled, in which case it is "atomic". Introduce 'default' as the default option for 'go.coverMode' to indicate the covermode is unspecified. Fixes golang/vscode-go#666 Change-Id: I7c7059140947639e3fd0438e1bc6cc50c712ebbb Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/256117 Trust: Hyang-Ah Hana Kim Trust: Peter Weinberger Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Peter Weinberger TryBot-Result: kokoro (cherry picked from commit 8d0bafa77137068c79b42be92c704cb4ed7f9a1a) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/257602 --- docs/settings.md | 6 +++--- package.json | 5 +++-- src/testUtils.ts | 14 ++++++++------ test/integration/test.test.ts | 12 +++++++++++- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 7634e3f44f..5969f236f6 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -63,11 +63,11 @@ Default: `` ### `go.coverMode` -When generating code coverage, the value for -covermode +When generating code coverage, the value for -covermode. 'default' is the default value chosen by the 'go test' command. -Allowed Values:`[set count atomic]` +Allowed Values:`[default set count atomic]` -Default: `set` +Default: `default` ### `go.coverOnSave` diff --git a/package.json b/package.json index 344eee999e..9968de4d9e 100644 --- a/package.json +++ b/package.json @@ -1316,12 +1316,13 @@ "go.coverMode": { "type": "string", "enum": [ + "default", "set", "count", "atomic" ], - "default": "set", - "description": "When generating code coverage, the value for -covermode", + "default": "default", + "description": "When generating code coverage, the value for -covermode. 'default' is the default value chosen by the 'go test' command.", "scope": "resource" }, "go.coverShowCounts": { diff --git a/src/testUtils.ts b/src/testUtils.ts index 90adc562f4..74fc1ae902 100644 --- a/src/testUtils.ts +++ b/src/testUtils.ts @@ -270,17 +270,19 @@ export async function goTest(testconfig: TestConfig): Promise { } else { args.push('-timeout', testconfig.goConfig['testTimeout']); if (testconfig.applyCodeCoverage) { - let coverMode = testconfig.goConfig['coverMode']; + args.push('-coverprofile=' + tmpCoverPath); + const coverMode = testconfig.goConfig['coverMode']; switch (coverMode) { - case 'set': case 'count': case 'atomic': break; + case 'default': + break; + case 'set': case 'count': case 'atomic': + args.push('-covermode', coverMode); + break; default: vscode.window.showWarningMessage( - `go.coverMode=${coverMode} is illegal. Use 'set', 'count', atomic'` + `go.coverMode=${coverMode} is illegal. Use 'set', 'count', 'atomic', or 'default'.` ); - coverMode = 'set'; } - args.push('-coverprofile=' + tmpCoverPath); - args.push('-covermode', coverMode); } } if (testTags && testconfig.flags.indexOf('-tags') === -1) { diff --git a/test/integration/test.test.ts b/test/integration/test.test.ts index 6287f7a388..d7028dda09 100644 --- a/test/integration/test.test.ts +++ b/test/integration/test.test.ts @@ -50,7 +50,7 @@ suite('Test Go Test', function () { } async function runTest( - input: { isMod: boolean, includeSubDirectories: boolean, testFlags?: string[] }, + input: { isMod: boolean, includeSubDirectories: boolean, testFlags?: string[], applyCodeCoverage?: boolean}, wantFiles: string[]) { fs.copySync(sourcePath, repoPath, { recursive: true }); @@ -65,8 +65,12 @@ suite('Test Go Test', function () { flags: input.testFlags ? input.testFlags : getTestFlags(config), isMod: input.isMod, includeSubDirectories: input.includeSubDirectories, + applyCodeCoverage: input.applyCodeCoverage }; try { + // TODO: instead of calling goTest, consider to test + // testCurrentPackage, testCurrentWorkspace, testCurrentFile + // which are closer to the features exposed to users. const result = await goTest(testConfig); assert.equal(result, false); // we expect tests to fail. } catch (e) { @@ -90,6 +94,9 @@ suite('Test Go Test', function () { await runTest( { isMod: true, includeSubDirectories: true, testFlags: ['-v'] }, [path.join(repoPath, 'a_test.go'), path.join(repoPath, 'b', 'b_test.go')]); + await runTest( + { isMod: true, includeSubDirectories: true, testFlags: ['-race'], applyCodeCoverage: true }, + [path.join(repoPath, 'a_test.go'), path.join(repoPath, 'b', 'b_test.go')]); await runTest( { isMod: true, includeSubDirectories: false, testFlags: ['-v'] }, [path.join(repoPath, 'a_test.go')]); @@ -106,6 +113,9 @@ suite('Test Go Test', function () { await runTest( { isMod: true, includeSubDirectories: true, testFlags: ['-v'] }, [path.join(repoPath, 'a_test.go'), path.join(repoPath, 'b', 'b_test.go')]); + await runTest( + { isMod: true, includeSubDirectories: true, testFlags: ['-race'], applyCodeCoverage: true }, + [path.join(repoPath, 'a_test.go'), path.join(repoPath, 'b', 'b_test.go')]); await runTest( { isMod: true, includeSubDirectories: false, testFlags: ['-v'] }, [path.join(repoPath, 'a_test.go')]); From 292b78f8bad14261eca77f9a9c9812b230b12490 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 23 Sep 2020 14:16:26 -0400 Subject: [PATCH 002/189] [release] src/goLanguageServer.ts: include sanitized trace to issue report Many automated gopls crash reports come with empty stack trace and provides little information. This CL tries to extract the stack trace from panic or the initialize error message. The stack trace is from the gopls binary itself so there is not much confidential except the package file paths. Remove those file paths and leave only the file base name parts. The package paths are included in the function name parts, so we still can locate the corresponding files in the gopls repository. If we fail to sanitize, do not include any stack trace and ask users to include it manually. Also, includes the language server binary flag, which will help with identifying crashes caused by incorrect gopls args. B Change-Id: I5fcab48b28b7adb0adf369af4227c29ca646b2a3 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/256878 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit 9ebcc1fe739107f1f0e9ae6ad2d2d53e459dbb8a) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/257604 --- src/goLanguageServer.ts | 85 +++++++++- test/gopls/report.test.ts | 322 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 402 insertions(+), 5 deletions(-) create mode 100644 test/gopls/report.test.ts diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 943cdfa2b9..33293a2f1b 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -1045,9 +1045,23 @@ You will be asked to provide additional information and logs, so PLEASE READ THE break; } const usersGoplsVersion = await getLocalGoplsVersion(latestConfig); + // TODO(hakim): If gopls version is too old, ask users to update it. + const settings = latestConfig.flags.join(' '); const title = `gopls: automated issue report (${errKind})`; + const sanitizedLog = collectGoplsLog(); + const goplsLog = (sanitizedLog) ? + `
${sanitizedLog}
` : + ` +Please attach the stack trace from the crash. +A window with the error message should have popped up in the lower half of your screen. +Please copy the stack trace and error messages from that window and paste it in this issue. + + +`; + const body = ` gopls version: ${usersGoplsVersion} +gopls flags: ${settings} ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW. @@ -1055,11 +1069,7 @@ Describe what you observed. -Please attach the stack trace from the crash. -A window with the error message should have popped up in the lower half of your screen. -Please copy the stack trace from that window and paste it in this issue. - - +${goplsLog} OPTIONAL: If you would like to share more information, you can attach your complete gopls logs. @@ -1106,3 +1116,68 @@ function minutesBetween(a: Date, b: Date): number { function msBetween(a: Date, b: Date): number { return Math.abs(a.getTime() - b.getTime()); } + +function collectGoplsLog(): string { + serverOutputChannel.show(); + // Find the logs in the output channel. There is no way to read + // an output channel directly, but we can find the open text + // document, since we just surfaced the output channel to the user. + // See https://github.com/microsoft/vscode/issues/65108. + let logs: string; + for (const doc of vscode.workspace.textDocuments) { + if (doc.languageId !== 'Log') { + continue; + } + if (doc.isDirty || doc.isClosed) { + continue; + } + // The document's name should look like 'extension-output-#X'. + if (doc.fileName.indexOf('extension-output-') === -1) { + continue; + } + logs = doc.getText(); + break; + } + return sanitizeGoplsTrace(logs); +} + +// capture only panic stack trace and the initialization error message. +// exported for testing. +export function sanitizeGoplsTrace(logs?: string): string { + if (!logs) { + return ''; + } + const panicMsgBegin = logs.lastIndexOf('panic: '); + if (panicMsgBegin > -1) { // panic message was found. + const panicMsgEnd = logs.indexOf('Connection to server got closed.', panicMsgBegin); + if (panicMsgEnd > -1) { + const panicTrace = logs.substr(panicMsgBegin, panicMsgEnd - panicMsgBegin); + const filePattern = /(\S+\.go):\d+/; + const sanitized = panicTrace.split('\n').map( + (line: string) => { + // Even though this is a crash from gopls, the file path + // can contain user names and user's filesystem directory structure. + // We can still locate the corresponding file if the file base is + // available because the full package path is part of the function + // name. So, leave only the file base. + const m = line.match(filePattern); + if (!m) { return line; } + const filePath = m[1]; + const fileBase = path.basename(filePath); + return line.replace(filePath, ' ' + fileBase); + } + ).join('\n'); + + return sanitized; + } + } + const initFailMsgBegin = logs.lastIndexOf('Starting client failed'); + if (initFailMsgBegin > -1) { // client start failed. Capture up to the 'Code:' line. + const initFailMsgEnd = logs.indexOf('Code: ', initFailMsgBegin); + if (initFailMsgEnd > -1) { + const lineEnd = logs.indexOf('\n', initFailMsgEnd); + return lineEnd > -1 ? logs.substr(initFailMsgBegin, lineEnd - initFailMsgBegin) : logs.substr(initFailMsgBegin); + } + } + return ''; +} diff --git a/test/gopls/report.test.ts b/test/gopls/report.test.ts new file mode 100644 index 0000000000..fc9cb3649d --- /dev/null +++ b/test/gopls/report.test.ts @@ -0,0 +1,322 @@ +/*--------------------------------------------------------- + * Copyright 2020 The Go Authors. All rights reserved. + * Licensed under the MIT License. See LICENSE in the project root for license information. + *--------------------------------------------------------*/ + +import * as assert from 'assert'; +import { sanitizeGoplsTrace } from '../../src/goLanguageServer'; + +suite('gopls issue report tests', () => { + test('sanitize user trace', () => { + interface TestCase { + name: string; + in: string; + want: string; + } + const testCases: TestCase[] = [ + { + name: `panic trace`, + in: traceFromIssueGo41435, + want: sanitizedTraceFromIssueGo41435 + }, + { + name: `initialization error message`, + in: traceFromIssueVSCodeGo572, + want: sanitizedTraceFromIssuVSCodeGo572 + }, + { + name: `incomplete panic trace`, + in: `panic: \nsecret\n`, + want: '' + }, + { + name: `incomplete initialization error message`, + in: `Secret Starting client failed.\nAnoter Secret\n`, + want: '' + } + ]; + + testCases.map((tc: TestCase) => { + const out = sanitizeGoplsTrace(tc.in); + assert.strictEqual(out, tc.want, `sanitizeGoplsTrace(${tc.name}) returned unexpected results`); + }); + + }); +}); + +const traceFromIssueGo41435 = ` +[Info - 12:50:16 PM] 2020/09/16 12:50:16 go env for /Users/Gopher/go/src/project +(root /Users/Gopher/go/src/project) +(valid build configuration = true) +(build flags: []) +GONOSUMDB= +GOPROXY=http://172.26.1.9:5000 +GOROOT=/opt/local/lib/go +GOSUMDB=off +GOCACHE=/Users/Gopher/Library/Caches/go-build +GOMODCACHE= +GOPRIVATE= +GO111MODULE= +GOINSECURE= +GOPATH=/Users/Gopher/go +GOFLAGS= +GOMOD= +GONOPROXY= + +[Info - 12:50:16 PM] 2020/09/16 12:50:16 go/packages.Load +snapshot=0 +directory=/Users/Gopher/go/src/project +query=[./... builtin] +packages=2 + +[Info - 12:50:16 PM] 2020/09/16 12:50:16 go/packages.Load +snapshot=1 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=0 + +[Error - 12:50:16 PM] 2020/09/16 12:50:16 reloadOrphanedFiles: failed to load: no packages returned: packages.Load error +query=[file:///Users/Gopher/go/src/project/main.go] + +[Info - 12:50:16 PM] 2020/09/16 12:50:16 go/packages.Load +snapshot=1 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=0 + +[Error - 12:50:16 PM] 2020/09/16 12:50:16 DocumentSymbols failed: getting file for DocumentSymbols: no packages returned: packages.Load error +URI=file:///Users/Gopher/go/src/project/main.go + +[Info - 12:50:16 PM] 2020/09/16 12:50:16 go/packages.Load +snapshot=1 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=0 + +[Error - 12:50:16 PM] 2020/09/16 12:50:16 failed to compute document links: no packages returned: packages.Load error +URI=file:///Users/Gopher/go/src/project/main.go + +[Info - 12:50:18 PM] 2020/09/16 12:50:18 go/packages.Load +snapshot=2 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Info - 12:50:18 PM] 2020/09/16 12:50:18 go/packages.Load +snapshot=2 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:18 PM] 2020/09/16 12:50:18 go/packages.Load +snapshot=2 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:18 PM] 2020/09/16 12:50:18 go/packages.Load +snapshot=2 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Error - 12:50:19 PM] Request textDocument/completion failed. +Message: invalid pos +Code: 0 +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=10 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=10 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=10 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=10 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=11 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=11 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=11 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=11 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=12 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=12 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=12 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=12 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=13 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=13 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=13 +package_path="command-line-arguments" +files=[/Users/Gopher/go/src/project/main.go] + +[Info - 12:50:20 PM] 2020/09/16 12:50:20 go/packages.Load +snapshot=13 +directory=/Users/Gopher/go/src/project +query=[file=/Users/Gopher/go/src/project/main.go] +packages=1 + +[Info - 12:50:26 PM] 2020/09/16 12:50:26 go/packages.Load +snapshot=17 +directory=/Users/Gopher/go/src/project +query=[./... builtin] +packages=2 + +panic: runtime error: invalid memory address or nil pointer dereference +[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x16cc8a8] + +goroutine 1011 [running]: +golang.org/x/tools/internal/lsp/mod.vendorLens(0x1ae5540, 0xc000385480, 0x1af9ac0, 0xc0007c8dc0, 0x277eae8, 0xc000504f80, 0xc00032ff80, 0xc000332600, 0xb, 0x10, ...) +/Users/Gopher/go/pkg/mod/golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940/internal/lsp/mod/code_lens.go:129 +0x158 +golang.org/x/tools/internal/lsp.(*Server).codeLens(0xc0002d72c0, 0x1ae5540, 0xc000385480, 0xc0006eaab0, 0x0, 0x0, 0x0, 0x0, 0x0) +/Users/Gopher/go/pkg/mod/golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940/internal/lsp/code_lens.go:38 +0x4a1 +golang.org/x/tools/internal/lsp.(*Server).CodeLens(0xc0002d72c0, 0x1ae5540, 0xc000385480, 0xc0006eaab0, 0xc0006eaab0, 0x0, 0x0, 0xc0007e87c0, 0x1ae5600) +/Users/Gopher/go/pkg/mod/golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940/internal/lsp/server_gen.go:16 +0x4d +golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1ae5540, 0xc000385480, 0x1b009e0, 0xc0002d72c0, 0xc0006eaa80, 0x1ae5780, 0xc0003853c0, 0x0, 0x0, 0x0) +/Users/Gopher/go/pkg/mod/golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940/internal/lsp/protocol/tsserver.go:325 +0x263d +golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1ae5540, 0xc000385480, 0xc0006eaa80, 0x1ae5780, 0xc0003853c0, 0x0, 0xbfd08444a6de7080) +/Users/Gopher/go/pkg/mod/golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940/internal/lsp/protocol/protocol.go:63 +0xc0 +golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1ae5540, 0xc000385480, 0xc0006eaa80, 0x1ae5780, 0xc0003853c0, 0x0, 0x0) +/Users/Gopher/go/pkg/mod/golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940/internal/lsp/lsprpc/lsprpc.go:557 +0x420 +golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1ae5540, 0xc000385480, 0xc000445080, 0x1ae5780, 0xc0003853c0, 0xc0002a04b7, 0x20) +/Users/Gopher/go/pkg/mod/golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940/internal/jsonrpc2/handler.go:35 +0xd3 +golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc00021ac60, 0xc0007b7980, 0xc000326d20, 0x1ae5540, 0xc000385480, 0xc000445080, 0x1ae5780, 0xc0003853c0) +/Users/Gopher/go/pkg/mod/golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940/internal/jsonrpc2/handler.go:103 +0x86 +created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1 +/Users/Gopher/go/pkg/mod/golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940/internal/jsonrpc2/handler.go:100 +0x171 +[Info - 12:50:26 PM] Connection to server got closed. Server will restart. +[Error - 12:50:26 PM] Request textDocument/codeLens failed. +Error: Connection got disposed. +at Object.dispose (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:13824:25) +at Object.dispose (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:10459:35) +at LanguageClient.handleConnectionClosed (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:12694:42) +at LanguageClient.handleConnectionClosed (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:70282:15) +at closeHandler (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:12681:18) +at CallbackList.invoke (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:24072:39) +at Emitter.fire (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:24131:36) +at closeHandler (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:13160:26) +at CallbackList.invoke (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:24072:39) +at Emitter.fire (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:24131:36) +at StreamMessageReader.fireClose (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:28055:27) +at Socket. (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:28095:46) +at Socket.emit (events.js:208:15) +at Pipe. (net.js:588:12) +[Error - 12:50:26 PM] Request textDocument/foldingRange failed. +Error: Connection got disposed. +at Object.dispose (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:13824:25) +at Object.dispose (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:10459:35) +at LanguageClient.handleConnectionClosed (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:12694:42) +at LanguageClient.handleConnectionClosed (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:70282:15) +at closeHandler (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:12681:18) +at CallbackList.invoke (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:24072:39) +at Emitter.fire (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:24131:36) +at closeHandler (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:13160:26) +at CallbackList.invoke (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:24072:39) +at Emitter.fire (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:24131:36) +at StreamMessageReader.fireClose (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:28055:27) +at Socket. (/Users/Gopher/.vscode/extensions/golang.go-0.16.2/dist/goMain.js:28095:46) +at Socket.emit (events.js:208:15) +at Pipe. (net.js:588:12) +[Info - 12:50:26 PM] 2020/09/16 12:50:26 Build info +golang.org/x/tools/gopls v0.5.0 +golang.org/x/tools/gopls@v0.5.0 h1:XEmO9RylgmaXp33iGrWfCGopVYDGBmLy+KmsIsfIo8Y= +github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/google/go-cmp@v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= +github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= +golang.org/x/tools@v0.0.0-20200914163123-ea50a3c84940 h1:151ExL+g/k/wnhOqV+O1OliaTi0FR2UxQEEcpAhzzw8= +golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +honnef.co/go/tools@v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k= +mvdan.cc/gofumpt@v0.0.0-20200802201014-ab5a8192947d h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ= +mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=`; + +const sanitizedTraceFromIssueGo41435 = `panic: runtime error: invalid memory address or nil pointer dereference +[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x16cc8a8] + +goroutine 1011 [running]: +golang.org/x/tools/internal/lsp/mod.vendorLens(0x1ae5540, 0xc000385480, 0x1af9ac0, 0xc0007c8dc0, 0x277eae8, 0xc000504f80, 0xc00032ff80, 0xc000332600, 0xb, 0x10, ...) + code_lens.go:129 +0x158 +golang.org/x/tools/internal/lsp.(*Server).codeLens(0xc0002d72c0, 0x1ae5540, 0xc000385480, 0xc0006eaab0, 0x0, 0x0, 0x0, 0x0, 0x0) + code_lens.go:38 +0x4a1 +golang.org/x/tools/internal/lsp.(*Server).CodeLens(0xc0002d72c0, 0x1ae5540, 0xc000385480, 0xc0006eaab0, 0xc0006eaab0, 0x0, 0x0, 0xc0007e87c0, 0x1ae5600) + server_gen.go:16 +0x4d +golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x1ae5540, 0xc000385480, 0x1b009e0, 0xc0002d72c0, 0xc0006eaa80, 0x1ae5780, 0xc0003853c0, 0x0, 0x0, 0x0) + tsserver.go:325 +0x263d +golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x1ae5540, 0xc000385480, 0xc0006eaa80, 0x1ae5780, 0xc0003853c0, 0x0, 0xbfd08444a6de7080) + protocol.go:63 +0xc0 +golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x1ae5540, 0xc000385480, 0xc0006eaa80, 0x1ae5780, 0xc0003853c0, 0x0, 0x0) + lsprpc.go:557 +0x420 +golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x1ae5540, 0xc000385480, 0xc000445080, 0x1ae5780, 0xc0003853c0, 0xc0002a04b7, 0x20) + handler.go:35 +0xd3 +golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc00021ac60, 0xc0007b7980, 0xc000326d20, 0x1ae5540, 0xc000385480, 0xc000445080, 0x1ae5780, 0xc0003853c0) + handler.go:103 +0x86 +created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1 + handler.go:100 +0x171 +[Info - 12:50:26 PM] `; + +const traceFromIssueVSCodeGo572 = ` + +[Error - 下午9:23:45] Starting client failed +Message: unsupported URI scheme: (gopls only supports file URIs) +Code: 0 +[Info - 下午9:23:45] 2020/08/25 21:23:45 server shutdown without initialization + +`; + +const sanitizedTraceFromIssuVSCodeGo572 = `Starting client failed +Message: unsupported URI scheme: (gopls only supports file URIs) +Code: 0`; From dfdd910242c52db5cf71ff399b62a39d7934cda3 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 18 Sep 2020 12:06:05 -0400 Subject: [PATCH 003/189] [release] src/goInstallTools.ts: return a rejected promise when go isn't found If Go is not found, return a rejected promise, so, the promise chaining can work. updateGoVarsFromConfig is not declared as an async, so returning nothing means returning nothing. Fixes golang/vscode-go#660 Change-Id: I16f73ca057f3b6bb220a754afc1baa43cc891c22 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/255963 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Trust: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller (cherry picked from commit 8e9cae79cd4df94a06d30722c4ce6935f58e4e9b) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/257603 --- src/goInstallTools.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index 218b58e3cb..13824e7c08 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -347,7 +347,7 @@ export function updateGoVarsFromConfig(): Promise { const goRuntimePath = getBinPath('go', false); if (!goRuntimePath) { suggestDownloadGo(); - return; + return Promise.reject(); } return new Promise((resolve, reject) => { @@ -482,7 +482,7 @@ async function suggestDownloadGo() { } const choice = await vscode.window.showErrorMessage( - `Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}. ` + + `Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}). ` + `Check PATH, or Install Go and reload the window.`, 'Go to Download Page' ); From 20ba7a5582e5b50445e61d3fa8fc1b946f759f01 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 23 Sep 2020 18:28:34 -0400 Subject: [PATCH 004/189] [release] src/goInstallTools.ts: mutate PATH only when necessary When the extension chooses a different version of go than the one from the system default - because the user has configured `go.goroot` or `go.alternateTools.go`, or used the `Go: Choose Go Environment` command - the extension mutates the `PATH` (or `Path` on windows) environment variable so all the underlying tools pick the same go version. It also changes the environment variable collection used in the integrated terminal so when the user invokes `go` from the terminal, they use the go version consistent with the extension. But this behavior can conflict with external version management software. Change the PATH environment only if the extension is configured to choose the go binary. Fixes golang/vscode-go#679. Update golang/vscode-go#544. Change-Id: I9f7acb26b752ed33dbde2b238a67ed09616b43e5 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/256938 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit ab4b257d907f29879886ba1855202412bae6793b) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/258077 --- src/goInstallTools.ts | 107 +++++++++++++++++++++++++++++------------- 1 file changed, 74 insertions(+), 33 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index 13824e7c08..96949073d6 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -27,6 +27,7 @@ import { Tool, ToolAtVersion, } from './goTools'; +import { getFromWorkspaceState } from './stateUtils'; import { getBinPath, getGoConfig, @@ -36,7 +37,7 @@ import { GoVersion, rmdirRecursive, } from './util'; -import { envPath, getCurrentGoRoot, getToolFromToolPath, setCurrentGoRoot } from './utils/pathUtils'; +import { correctBinname, envPath, getCurrentGoRoot, getToolFromToolPath, setCurrentGoRoot } from './utils/pathUtils'; // declinedUpdates tracks the tools that the user has declined to update. const declinedUpdates: Tool[] = []; @@ -342,10 +343,11 @@ export async function promptForUpdatingTool(toolName: string, newVersion?: SemVe } export function updateGoVarsFromConfig(): Promise { - // FIXIT: if updateGoVarsFromConfig is called again after addGoRuntimeBaseToPATH sets PATH, - // the go chosen by getBinPath based on PATH will not change. const goRuntimePath = getBinPath('go', false); - if (!goRuntimePath) { + + if (!goRuntimePath || !path.isAbsolute(goRuntimePath)) { + // getBinPath returns the absolute path to the tool if it exists. + // Otherwise, it may return the tool name (e.g. 'go'). suggestDownloadGo(); return Promise.reject(); } @@ -355,41 +357,80 @@ export function updateGoVarsFromConfig(): Promise { ['env', 'GOPATH', 'GOROOT', 'GOPROXY', 'GOBIN', 'GOMODCACHE'], { env: toolExecutionEnvironment(), cwd: getWorkspaceFolderPath() }, (err, stdout, stderr) => { - if (err || stderr) { - outputChannel.append(`Failed to run '${goRuntimePath} env: ${err}\n${stderr}`); - outputChannel.show(); + if (err || stderr) { + outputChannel.append(`Failed to run '${goRuntimePath} env: ${err}\n${stderr}`); + outputChannel.show(); - vscode.window.showErrorMessage(`Failed to run '${goRuntimePath} env. The config change may not be applied correctly.`); - return reject(); - } - const envOutput = stdout.split('\n'); - if (!process.env['GOPATH'] && envOutput[0].trim()) { - process.env['GOPATH'] = envOutput[0].trim(); - } - if (envOutput[1] && envOutput[1].trim()) { - setCurrentGoRoot(envOutput[1].trim()); - } - if (!process.env['GOPROXY'] && envOutput[2] && envOutput[2].trim()) { - process.env['GOPROXY'] = envOutput[2].trim(); - } - if (!process.env['GOBIN'] && envOutput[3] && envOutput[3].trim()) { - process.env['GOBIN'] = envOutput[3].trim(); - } - if (!process.env['GOMODCACHE'] && envOutput[4] && envOutput[4].trim()) { - process.env['GOMODCACHE'] = envOutput[4].trim(); - } + vscode.window.showErrorMessage(`Failed to run '${goRuntimePath} env. The config change may not be applied correctly.`); + return reject(); + } + const envOutput = stdout.split('\n'); + if (!process.env['GOPATH'] && envOutput[0].trim()) { + process.env['GOPATH'] = envOutput[0].trim(); + } + if (envOutput[1] && envOutput[1].trim()) { + setCurrentGoRoot(envOutput[1].trim()); + } + if (!process.env['GOPROXY'] && envOutput[2] && envOutput[2].trim()) { + process.env['GOPROXY'] = envOutput[2].trim(); + } + if (!process.env['GOBIN'] && envOutput[3] && envOutput[3].trim()) { + process.env['GOBIN'] = envOutput[3].trim(); + } + if (!process.env['GOMODCACHE'] && envOutput[4] && envOutput[4].trim()) { + process.env['GOMODCACHE'] = envOutput[4].trim(); + } - // cgo, gopls, and other underlying tools will inherit the environment and attempt - // to locate 'go' from the PATH env var. - addGoRuntimeBaseToPATH(path.join(getCurrentGoRoot(), 'bin')); - initGoStatusBar(); - // TODO: restart language server or synchronize with language server update. + // cgo, gopls, and other underlying tools will inherit the environment and attempt + // to locate 'go' from the PATH env var. + // Update the PATH only if users configured to use a different + // version of go than the system default. + if (!!goPickedByExtension()) { + addGoRuntimeBaseToPATH(path.join(getCurrentGoRoot(), 'bin')); + } + initGoStatusBar(); + // TODO: restart language server or synchronize with language server update. - return resolve(); - }); + return resolve(); + }); }); } +// The go command is picked up by searching directories in PATH by default. +// But users can override it and force the extension to pick a different +// one by configuring +// +// 1) with the go.environment.choose command, which stores the selection +// in the workspace memento with the key 'selectedGo', +// 2) with 'go.alternateTools': { 'go': ... } setting, or +// 3) with 'go.goroot' setting +// +// goPickedByExtension returns the chosen path if the default path should +// be overridden by above methods. +// TODO: This logic is duplicated in getBinPath. Centralize this logic. +function goPickedByExtension(): string | undefined { + // getFromWorkspaceState('selectedGo') + const selectedGoPath: string = getFromWorkspaceState('selectedGo')?.binpath; + if (selectedGoPath) { + return selectedGoPath; + } + + const cfg = getGoConfig(); + + // 'go.alternateTools.go' + const alternateTools: { [key: string]: string } = cfg.get('alternateTools'); + const alternateToolPath: string = alternateTools['go']; + if (alternateToolPath) { + return alternateToolPath; + } + // 'go.goroot' + const goRoot: string = cfg.get('goroot'); + if (goRoot) { + return path.join(goRoot, 'bin', correctBinname('go')); + } + return undefined; +} + let alreadyOfferedToInstallTools = false; export async function offerToInstallTools() { From a42b5de115d2a05cea249bbbb68525747d34ea84 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 25 Sep 2020 15:41:52 -0400 Subject: [PATCH 005/189] [release] v0.17.1 CHANGELOG and prep Change-Id: Iff88e5fe3dddd8c5fb09b542046f94f4f61d6522 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/257717 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- CHANGELOG.md | 16 ++++++++++++++++ package-lock.json | 2 +- package.json | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cce39ee1a3..e61bfaf5f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +## v0.17.1 - 28th Sep, 2020 + +### Enhancement +- Mutate the `PATH`/`Path` environment variable only if users +explicitly configure to select the go command using `go.goroot`, +`go.alternateTools`, or `Go: Choose Go Environment` menu. +([Issue 679](https://github.com/golang/vscode-go/issues/679)) +- Includes sanitized gopls crash traces in the automated gopls crash report. +([CL 256878](https://go-review.googlesource.com/c/vscode-go/+/256878)) + +### Fixes +- Changed the default of `go.coverMode` to be `default`. ([Issue 666](https://github.com/golang/vscode-go/issues/666)) +- Fixed a missing promise reject when go is not found. ([Issue 660](https://github.com/golang/vscode-go/issues/660)) + +Thank you for reporting issues! + ## v0.17.0 - 18th Sep, 2020 Go code debugging and code coverage support is getting better. diff --git a/package-lock.json b/package-lock.json index 93079f464d..ee7ee397d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.17.0", + "version": "0.17.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9968de4d9e..179ca7663f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.17.0", + "version": "0.17.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { @@ -2038,4 +2038,4 @@ ] } } -} \ No newline at end of file +} From d9187fe34c50ecc796058e91e2fe751b59eab329 Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 30 Sep 2020 10:55:47 -0400 Subject: [PATCH 006/189] [release] src/goInstallTools.ts: add GOROOT/bin to PATH when it wasn't found from PATH The fix for golang/vscode-go#679 changed to prepend GOROOT/bin to PATH or Path only if users explicitly configured to use go different from what's found from PATH. I forgot the case where go was not found from PATH and the extension picked up a common default go installation directory. (C:\Go\bin or /usr/local/go/bin). This change rewrote the fix - rewrote getBinPath to return why it chose the path as well. Then, we mutate the PATH env var if getBinPath picked go with a reason other than it's in PATH (why === 'path'). Since getBinPath and getBinPathWithPreferredGopathGoroot are used in many places, this CL introduces getBinPathWithExplanation and getBinPath wraps it. Updates golang/vscode-go#679 Fixes golang/vscode-go#713 Change-Id: Ie00612fcef2cf4c2a187a263da04b342182c030b Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/258316 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 9bf9d642c76369144bc85323622240a121868454) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/258519 --- src/goInstallTools.ts | 45 ++++++------------------------------------ src/util.ts | 12 +++++++++-- src/utils/pathUtils.ts | 34 +++++++++++++++++++++---------- 3 files changed, 40 insertions(+), 51 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index 96949073d6..759cd3be39 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -30,6 +30,7 @@ import { import { getFromWorkspaceState } from './stateUtils'; import { getBinPath, + getBinPathWithExplanation, getGoConfig, getGoVersion, getTempFilePath, @@ -37,7 +38,7 @@ import { GoVersion, rmdirRecursive, } from './util'; -import { correctBinname, envPath, getCurrentGoRoot, getToolFromToolPath, setCurrentGoRoot } from './utils/pathUtils'; +import { envPath, getCurrentGoRoot, getToolFromToolPath, setCurrentGoRoot } from './utils/pathUtils'; // declinedUpdates tracks the tools that the user has declined to update. const declinedUpdates: Tool[] = []; @@ -343,7 +344,8 @@ export async function promptForUpdatingTool(toolName: string, newVersion?: SemVe } export function updateGoVarsFromConfig(): Promise { - const goRuntimePath = getBinPath('go', false); + const {binPath, why} = getBinPathWithExplanation('go', false); + const goRuntimePath = binPath; if (!goRuntimePath || !path.isAbsolute(goRuntimePath)) { // getBinPath returns the absolute path to the tool if it exists. @@ -384,8 +386,8 @@ export function updateGoVarsFromConfig(): Promise { // cgo, gopls, and other underlying tools will inherit the environment and attempt // to locate 'go' from the PATH env var. // Update the PATH only if users configured to use a different - // version of go than the system default. - if (!!goPickedByExtension()) { + // version of go than the system default found from PATH (or Path). + if (why !== 'path') { addGoRuntimeBaseToPATH(path.join(getCurrentGoRoot(), 'bin')); } initGoStatusBar(); @@ -396,41 +398,6 @@ export function updateGoVarsFromConfig(): Promise { }); } -// The go command is picked up by searching directories in PATH by default. -// But users can override it and force the extension to pick a different -// one by configuring -// -// 1) with the go.environment.choose command, which stores the selection -// in the workspace memento with the key 'selectedGo', -// 2) with 'go.alternateTools': { 'go': ... } setting, or -// 3) with 'go.goroot' setting -// -// goPickedByExtension returns the chosen path if the default path should -// be overridden by above methods. -// TODO: This logic is duplicated in getBinPath. Centralize this logic. -function goPickedByExtension(): string | undefined { - // getFromWorkspaceState('selectedGo') - const selectedGoPath: string = getFromWorkspaceState('selectedGo')?.binpath; - if (selectedGoPath) { - return selectedGoPath; - } - - const cfg = getGoConfig(); - - // 'go.alternateTools.go' - const alternateTools: { [key: string]: string } = cfg.get('alternateTools'); - const alternateToolPath: string = alternateTools['go']; - if (alternateToolPath) { - return alternateToolPath; - } - // 'go.goroot' - const goRoot: string = cfg.get('goroot'); - if (goRoot) { - return path.join(goRoot, 'bin', correctBinname('go')); - } - return undefined; -} - let alreadyOfferedToInstallTools = false; export async function offerToInstallTools() { diff --git a/src/util.ts b/src/util.ts index fa94f7bbb9..ee361b438f 100644 --- a/src/util.ts +++ b/src/util.ts @@ -20,7 +20,7 @@ import { getFromWorkspaceState } from './stateUtils'; import { envPath, fixDriveCasingInWindows, - getBinPathWithPreferredGopathGoroot, + getBinPathWithPreferredGopathGorootWithExplanation, getCurrentGoRoot, getInferredGopath, resolveHomeDir, @@ -477,7 +477,15 @@ function resolveToolsGopath(): string { } } +// getBinPath returns the path to the tool. export function getBinPath(tool: string, useCache = true): string { + const r = getBinPathWithExplanation(tool, useCache); + return r.binPath; +} + +// getBinPathWithExplanation returns the path to the tool, and the explanation on why +// the path was chosen. See getBinPathWithPreferredGopathGorootWithExplanation for details. +export function getBinPathWithExplanation(tool: string, useCache = true): {binPath: string, why?: string} { const cfg = getGoConfig(); const alternateTools: { [key: string]: string } = cfg.get('alternateTools'); const alternateToolPath: string = alternateTools[tool]; @@ -487,7 +495,7 @@ export function getBinPath(tool: string, useCache = true): string { selectedGoPath = getFromWorkspaceState('selectedGo')?.binpath; } - return getBinPathWithPreferredGopathGoroot( + return getBinPathWithPreferredGopathGorootWithExplanation( tool, tool === 'go' ? [] : [getToolsGopath(), getCurrentGoPath()], tool === 'go' && cfg.get('goroot') ? resolvePath(cfg.get('goroot')) : undefined, diff --git a/src/utils/pathUtils.ts b/src/utils/pathUtils.ts index ab3be8f74c..3f1f59a39f 100644 --- a/src/utils/pathUtils.ts +++ b/src/utils/pathUtils.ts @@ -37,23 +37,37 @@ export function getBinPathWithPreferredGopathGoroot( preferredGopaths: string[], preferredGoroot?: string, alternateTool?: string, - useCache = true, + useCache = true ): string { + const r = getBinPathWithPreferredGopathGorootWithExplanation( + toolName, preferredGopaths, preferredGoroot, alternateTool, useCache); + return r.binPath; +} + +// Is same as getBinPAthWithPreferredGopathGoroot, but returns why the +// returned path was chosen. +export function getBinPathWithPreferredGopathGorootWithExplanation( + toolName: string, + preferredGopaths: string[], + preferredGoroot?: string, + alternateTool?: string, + useCache = true, +): {binPath: string, why?: string} { if (alternateTool && path.isAbsolute(alternateTool) && executableFileExists(alternateTool)) { binPathCache[toolName] = alternateTool; - return alternateTool; + return {binPath: alternateTool, why: 'alternateTool'}; } // FIXIT: this cache needs to be invalidated when go.goroot or go.alternateTool is changed. if (useCache && binPathCache[toolName]) { - return binPathCache[toolName]; + return {binPath: binPathCache[toolName], why: 'cached'}; } const binname = alternateTool && !path.isAbsolute(alternateTool) ? alternateTool : toolName; const pathFromGoBin = getBinPathFromEnvVar(binname, process.env['GOBIN'], false); if (pathFromGoBin) { binPathCache[toolName] = pathFromGoBin; - return pathFromGoBin; + return {binPath: pathFromGoBin, why: 'gobin'}; } for (const preferred of preferredGopaths) { @@ -62,7 +76,7 @@ export function getBinPathWithPreferredGopathGoroot( const pathFrompreferredGoPath = getBinPathFromEnvVar(binname, preferred, true); if (pathFrompreferredGoPath) { binPathCache[toolName] = pathFrompreferredGoPath; - return pathFrompreferredGoPath; + return {binPath: pathFrompreferredGoPath, why: 'gopath'}; } } } @@ -71,14 +85,14 @@ export function getBinPathWithPreferredGopathGoroot( const pathFromGoRoot = getBinPathFromEnvVar(binname, preferredGoroot || getCurrentGoRoot(), true); if (pathFromGoRoot) { binPathCache[toolName] = pathFromGoRoot; - return pathFromGoRoot; + return {binPath: pathFromGoRoot, why: 'goroot'}; } // Finally search PATH parts const pathFromPath = getBinPathFromEnvVar(binname, envPath, false); if (pathFromPath) { binPathCache[toolName] = pathFromPath; - return pathFromPath; + return {binPath: pathFromPath, why: 'path'}; } // Check default path for go @@ -86,13 +100,13 @@ export function getBinPathWithPreferredGopathGoroot( const defaultPathForGo = process.platform === 'win32' ? 'C:\\Go\\bin\\go.exe' : '/usr/local/go/bin/go'; if (executableFileExists(defaultPathForGo)) { binPathCache[toolName] = defaultPathForGo; - return defaultPathForGo; + return {binPath: defaultPathForGo, why: 'default'}; } - return; + return {binPath: ''}; } // Else return the binary name directly (this will likely always fail downstream) - return toolName; + return {binPath: toolName}; } /** From c71e9ce12c6c617e504928378875b4acc13264a3 Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 30 Sep 2020 13:32:26 -0400 Subject: [PATCH 007/189] [release] CHANGELOG.md: v0.17.2 Change-Id: I168686656e3a9c2f5ebf70b024951d20fed8c677 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/258521 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- CHANGELOG.md | 8 ++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e61bfaf5f9..8370f9bead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v0.17.2 - 29th Sep, 2020 + +### Fixes +- Fixed a regression caused by the change for ([Issue 679](https://github.com/golang/vscode-go/issues/679)). +If `go` is not found from `PATH` available to the extension, the extension tries a couple of well-known +default locations to find the `go` binary. In this case, we need to mutate `PATH` so other tools including +`gopls` or `dlv` can choose the same go version. ([Issue 713](https://github.com/golang/vscode-go/issues/713)). + ## v0.17.1 - 28th Sep, 2020 ### Enhancement diff --git a/package-lock.json b/package-lock.json index ee7ee397d9..6638187940 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.17.1", + "version": "0.17.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 179ca7663f..0bff059745 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.17.1", + "version": "0.17.2", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From b6fe8e26b11f6f96b1f030f745ac03da6db5f2ad Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 30 Sep 2020 18:59:13 -0400 Subject: [PATCH 008/189] [release] src/goEnvironmentStatus.ts: clear pre-installed terminal PATH mutation Changes to vscode.EnvironmentVariableCollection persist across vscode sessions, so when we decide not to mutate PATH, we need to clear the preexisting changes. The new function 'clearGoRuntimeBaseFromPATH' reverses almost all of what addGoRuntimeBaseToPATH did on the persisted state. Manually tested by setting/unsetting "go.alternateTools". Also, fixes the case where 'go.alternateTools' is set as an alternate tool name rather than an absolute path - in that case, we search the alternate tool from PATH. In this case, the reason shouldn't be 'path'. Manually tested by setting "go.alternateTools": { "go": "mygo.sh" } where "mygo.sh" is another binary that exists in PATH and shells out go. In addition to this, this change fixes an exception thrown while calling updateIntegratedTerminal when no 'go' executable is found from the default PATH. In that case, getBinPathFromEnvVar returns null, and path.dirname throws an error for non-string params. This results in the failure of updating terminal's PATH change and the users will not see the picked go from the terminal. This is a bug preexisted before 0.17.1 Manually tested by launching code without go in PATH. Updates golang/vscode-go#679 Fixes golang/vscode-go#713 Change-Id: I240694cb4425e81998299ab38097393a0f3faf46 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/258557 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 1b82f49fa02036b34eed6c3b06d115da4a6db897) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/258797 --- src/goEnvironmentStatus.ts | 40 ++++++++++++++++++++++++++++++-------- src/goInstallTools.ts | 5 ++++- src/utils/pathUtils.ts | 14 +++++++------ 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/goEnvironmentStatus.ts b/src/goEnvironmentStatus.ts index 554fa0f8dd..b52c1f2640 100644 --- a/src/goEnvironmentStatus.ts +++ b/src/goEnvironmentStatus.ts @@ -277,6 +277,16 @@ async function downloadGo(goOption: GoEnvironmentOption) { // PATH value cached before addGoRuntimeBaseToPath modified. let defaultPathEnv = ''; +function pathEnvVarName(): string|undefined { + if (process.env.hasOwnProperty('PATH')) { + return 'PATH'; + } else if (process.platform === 'win32' && process.env.hasOwnProperty('Path')) { + return 'Path'; + } else { + return; + } +} + // addGoRuntimeBaseToPATH adds the given path to the front of the PATH environment variable. // It removes duplicates. // TODO: can we avoid changing PATH but utilize toolExecutionEnv? @@ -285,12 +295,8 @@ export function addGoRuntimeBaseToPATH(newGoRuntimeBase: string) { return; } - let pathEnvVar: string; - if (process.env.hasOwnProperty('PATH')) { - pathEnvVar = 'PATH'; - } else if (process.platform === 'win32' && process.env.hasOwnProperty('Path')) { - pathEnvVar = 'Path'; - } else { + const pathEnvVar = pathEnvVarName(); + if (!pathEnvVar) { return; } @@ -331,14 +337,32 @@ export function addGoRuntimeBaseToPATH(newGoRuntimeBase: string) { process.env[pathEnvVar] = pathVars.join(path.delimiter); } +// Clear terminal PATH environment modification previously installed +// using addGoRuntimeBaseToPATH. +// In particular, changes to vscode.EnvironmentVariableCollection persist across +// vscode sessions, so when we decide not to mutate PATH, we need to clear +// the preexisting changes. +export function clearGoRuntimeBaseFromPATH() { + if (terminalCreationListener) { + const l = terminalCreationListener; + terminalCreationListener = undefined; + l.dispose(); + } + const pathEnvVar = pathEnvVarName(); + if (!pathEnvVar) { + return; + } + environmentVariableCollection?.delete(pathEnvVar); +} + /** * update the PATH variable in the given terminal to default to the currently selected Go */ export async function updateIntegratedTerminal(terminal: vscode.Terminal): Promise { if (!terminal) { return; } const gorootBin = path.join(getCurrentGoRoot(), 'bin'); - const defaultGoRuntimeBin = path.dirname(getBinPathFromEnvVar('go', defaultPathEnv, false)); - if (gorootBin === defaultGoRuntimeBin) { + const defaultGoRuntime = getBinPathFromEnvVar('go', defaultPathEnv, false); + if (defaultGoRuntime && gorootBin === path.dirname(defaultGoRuntime)) { return; } diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index 759cd3be39..25ddfe12a6 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -12,7 +12,7 @@ import { SemVer } from 'semver'; import util = require('util'); import vscode = require('vscode'); import { toolExecutionEnvironment, toolInstallationEnvironment } from './goEnv'; -import { addGoRuntimeBaseToPATH, initGoStatusBar } from './goEnvironmentStatus'; +import { addGoRuntimeBaseToPATH, clearGoRuntimeBaseFromPATH, initGoStatusBar } from './goEnvironmentStatus'; import { getLanguageServerToolPath } from './goLanguageServer'; import { restartLanguageServer } from './goMain'; import { hideGoStatus, outputChannel, showGoStatus } from './goStatus'; @@ -389,6 +389,9 @@ export function updateGoVarsFromConfig(): Promise { // version of go than the system default found from PATH (or Path). if (why !== 'path') { addGoRuntimeBaseToPATH(path.join(getCurrentGoRoot(), 'bin')); + } else { + // clear pre-existing terminal PATH mutation logic set up by this extension. + clearGoRuntimeBaseFromPATH(); } initGoStatusBar(); // TODO: restart language server or synchronize with language server update. diff --git a/src/utils/pathUtils.ts b/src/utils/pathUtils.ts index 3f1f59a39f..f67d8b5026 100644 --- a/src/utils/pathUtils.ts +++ b/src/utils/pathUtils.ts @@ -18,7 +18,8 @@ let binPathCache: { [bin: string]: string } = {}; export const envPath = process.env['PATH'] || (process.platform === 'win32' ? process.env['Path'] : null); -export function getBinPathFromEnvVar(toolName: string, envVarValue: string, appendBinToPath: boolean): string { +// find the tool's path from the given PATH env var, or null if the tool is not found. +export function getBinPathFromEnvVar(toolName: string, envVarValue: string, appendBinToPath: boolean): string|null { toolName = correctBinname(toolName); if (envVarValue) { const paths = envVarValue.split(path.delimiter); @@ -44,7 +45,7 @@ export function getBinPathWithPreferredGopathGoroot( return r.binPath; } -// Is same as getBinPAthWithPreferredGopathGoroot, but returns why the +// Is same as getBinPathWithPreferredGopathGoroot, but returns why the // returned path was chosen. export function getBinPathWithPreferredGopathGorootWithExplanation( toolName: string, @@ -64,10 +65,11 @@ export function getBinPathWithPreferredGopathGorootWithExplanation( } const binname = alternateTool && !path.isAbsolute(alternateTool) ? alternateTool : toolName; + const found = (why: string) => binname === toolName ? why : 'alternateTool'; const pathFromGoBin = getBinPathFromEnvVar(binname, process.env['GOBIN'], false); if (pathFromGoBin) { binPathCache[toolName] = pathFromGoBin; - return {binPath: pathFromGoBin, why: 'gobin'}; + return {binPath: pathFromGoBin, why: binname === toolName ? 'gobin' : 'alternateTool'}; } for (const preferred of preferredGopaths) { @@ -76,7 +78,7 @@ export function getBinPathWithPreferredGopathGorootWithExplanation( const pathFrompreferredGoPath = getBinPathFromEnvVar(binname, preferred, true); if (pathFrompreferredGoPath) { binPathCache[toolName] = pathFrompreferredGoPath; - return {binPath: pathFrompreferredGoPath, why: 'gopath'}; + return {binPath: pathFrompreferredGoPath, why: found('gopath')}; } } } @@ -85,14 +87,14 @@ export function getBinPathWithPreferredGopathGorootWithExplanation( const pathFromGoRoot = getBinPathFromEnvVar(binname, preferredGoroot || getCurrentGoRoot(), true); if (pathFromGoRoot) { binPathCache[toolName] = pathFromGoRoot; - return {binPath: pathFromGoRoot, why: 'goroot'}; + return {binPath: pathFromGoRoot, why: found('goroot')}; } // Finally search PATH parts const pathFromPath = getBinPathFromEnvVar(binname, envPath, false); if (pathFromPath) { binPathCache[toolName] = pathFromPath; - return {binPath: pathFromPath, why: 'path'}; + return {binPath: pathFromPath, why: found('path')}; } // Check default path for go From 5a991c1ebe2cd1c67ad5cede4b6be2bd8d74d744 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 16 Oct 2020 16:34:17 -0400 Subject: [PATCH 009/189] [release] Revert "LICENSE: restore LICENSE" This is only for the main branch. Release branch needs the full license info. This reverts commit 50240bfb20c5ba1800eed652bb7f1bdca0e49439. Change-Id: Ic2d4cf40d77c1717f9ef28c757d4551f5699d776 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/263200 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller TryBot-Result: kokoro --- LICENSE | 2047 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2047 insertions(+) diff --git a/LICENSE b/LICENSE index bec3260395..138c3871bf 100644 --- a/LICENSE +++ b/LICENSE @@ -22,3 +22,2050 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE GO PRODUCT. + +----- + +The following software may be included in this product: ajv. A copy of the source code may be downloaded from https://github.com/ajv-validator/ajv.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2015-2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: asn1. A copy of the source code may be downloaded from git://github.com/joyent/node-asn1.git. This software contains the following license and notice below: + +Copyright (c) 2011 Mark Cavage, All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE + +----- + +The following software may be included in this product: asynckit. A copy of the source code may be downloaded from git+https://github.com/alexindigo/asynckit.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2016 Alex Indigo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: available-typed-arrays. A copy of the source code may be downloaded from git+https://github.com/inspect-js/available-typed-arrays.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2020 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: aws-sign2, forever-agent, oauth-sign, request, tunnel-agent. A copy of the source code may be downloaded from https://github.com/mikeal/aws-sign (aws-sign2), https://github.com/mikeal/forever-agent (forever-agent), https://github.com/mikeal/oauth-sign (oauth-sign), https://github.com/request/request.git (request), https://github.com/mikeal/tunnel-agent (tunnel-agent). This software contains the following license and notice below: + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +----- + +The following software may be included in this product: aws4. A copy of the source code may be downloaded from https://github.com/mhart/aws4.git. This software contains the following license and notice below: + +Copyright 2013 Michael Hart (michael.hart.au@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: balanced-match. A copy of the source code may be downloaded from git://github.com/juliangruber/balanced-match.git. This software contains the following license and notice below: + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: bcrypt-pbkdf. A copy of the source code may be downloaded from git://github.com/joyent/node-bcrypt-pbkdf.git. This software contains the following license and notice below: + +The Blowfish portions are under the following license: + +Blowfish block cipher for OpenBSD +Copyright 1997 Niels Provos +All rights reserved. + +Implementation advice by David Mazieres . + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +The bcrypt_pbkdf portions are under the following license: + +Copyright (c) 2013 Ted Unangst + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + +Performance improvements (Javascript-specific): + +Copyright 2016, Joyent Inc +Author: Alex Wilson + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: brace-expansion, isarray. A copy of the source code may be downloaded from git://github.com/juliangruber/brace-expansion.git (brace-expansion), git://github.com/juliangruber/isarray.git (isarray). This software contains the following license and notice below: + +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: caseless. A copy of the source code may be downloaded from https://github.com/mikeal/caseless. This software contains the following license and notice below: + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +1. Definitions. +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. +END OF TERMS AND CONDITIONS + +----- + +The following software may be included in this product: combined-stream, delayed-stream. A copy of the source code may be downloaded from git://github.com/felixge/node-combined-stream.git (combined-stream), git://github.com/felixge/node-delayed-stream.git (delayed-stream). This software contains the following license and notice below: + +Copyright (c) 2011 Debuggable Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: concat-map, is-typedarray. A copy of the source code may be downloaded from git://github.com/substack/node-concat-map.git (concat-map), git://github.com/hughsk/is-typedarray.git (is-typedarray). This software contains the following license and notice below: + +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: core-util-is. A copy of the source code may be downloaded from git://github.com/isaacs/core-util-is. This software contains the following license and notice below: + +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +----- + +The following software may be included in this product: dashdash. A copy of the source code may be downloaded from git://github.com/trentm/node-dashdash.git. This software contains the following license and notice below: + +# This is the MIT license + +Copyright (c) 2013 Trent Mick. All rights reserved. +Copyright (c) 2013 Joyent Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: debug. A copy of the source code may be downloaded from git://github.com/visionmedia/debug.git. This software contains the following license and notice below: + +(The MIT License) + +Copyright (c) 2014 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: deep-equal. A copy of the source code may be downloaded from http://github.com/inspect-js/node-deep-equal.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2012, 2013, 2014 James Halliday , 2009 Thomas Robinson <280north.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: define-properties, es-abstract. A copy of the source code may be downloaded from git://github.com/ljharb/define-properties.git (define-properties), git://github.com/ljharb/es-abstract.git (es-abstract). This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (C) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: diff. A copy of the source code may be downloaded from git://github.com/kpdecker/jsdiff.git. This software contains the following license and notice below: + +Software License Agreement (BSD License) + +Copyright (c) 2009-2015, Kevin Decker + +All rights reserved. + +Redistribution and use of this software in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither the name of Kevin Decker nor the names of its + contributors may be used to endorse or promote products + derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----- + +The following software may be included in this product: ecc-jsbn. A copy of the source code may be downloaded from https://github.com/quartzjer/ecc-jsbn.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2014 Jeremie Miller + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: es-get-iterator, side-channel, which-boxed-primitive. A copy of the source code may be downloaded from git+https://github.com/ljharb/es-get-iterator.git (es-get-iterator), git+https://github.com/ljharb/side-channel.git (side-channel), git+https://github.com/ljharb/which-boxed-primitive.git (which-boxed-primitive). This software contains the following license and notice below: + +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, is-typed-array, which-typed-array. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/ljharb/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/ljharb/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/ljharb/is-typed-array.git (is-typed-array), git://github.com/inspect-js/which-typed-array.git (which-typed-array). This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: es5class. A copy of the source code may be downloaded from https://github.com/pocesar/ES5-Class.git. This software contains the following license and notice below: + +(The MIT License) + +Copyright (c) 2011 Bruno Filippone + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: extend. A copy of the source code may be downloaded from https://github.com/justmoon/node-extend.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2014 Stefan Thomas + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: extsprintf, jsprim. A copy of the source code may be downloaded from git://github.com/davepacheco/node-extsprintf.git (extsprintf), git://github.com/joyent/node-jsprim.git (jsprim). This software contains the following license and notice below: + +Copyright (c) 2012, Joyent, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE + +----- + +The following software may be included in this product: fast-deep-equal, json-schema-traverse. A copy of the source code may be downloaded from git+https://github.com/epoberezkin/fast-deep-equal.git (fast-deep-equal), git+https://github.com/epoberezkin/json-schema-traverse.git (json-schema-traverse). This software contains the following license and notice below: + +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: fast-json-stable-stringify. A copy of the source code may be downloaded from git://github.com/epoberezkin/fast-json-stable-stringify.git. This software contains the following license and notice below: + +This software is released under the MIT license: + +Copyright (c) 2017 Evgeny Poberezkin +Copyright (c) 2013 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: faye-websocket. A copy of the source code may be downloaded from git://github.com/faye/faye-websocket-node.git. This software contains the following license and notice below: + +Copyright 2010-2019 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +----- + +The following software may be included in this product: foreach. A copy of the source code may be downloaded from git://github.com/manuelstofer/foreach. This software contains the following license and notice below: + +The MIT License + +Copyright (c) 2013 Manuel Stofer + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: form-data. A copy of the source code may be downloaded from git://github.com/form-data/form-data.git. This software contains the following license and notice below: + +Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +----- + +The following software may be included in this product: fs.realpath. A copy of the source code may be downloaded from git+https://github.com/isaacs/fs.realpath.git. This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + Copyright Joyent, Inc. and other Node contributors. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: function-bind. A copy of the source code may be downloaded from git://github.com/Raynos/function-bind.git. This software contains the following license and notice below: + +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: getpass, http-signature, sshpk. A copy of the source code may be downloaded from https://github.com/arekinath/node-getpass.git (getpass), git://github.com/joyent/node-http-signature.git (http-signature), git+https://github.com/joyent/node-sshpk.git (sshpk). This software contains the following license and notice below: + +Copyright Joyent, Inc. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +----- + +The following software may be included in this product: glob. A copy of the source code may be downloaded from git://github.com/isaacs/node-glob.git. This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ + +----- + +The following software may be included in this product: har-schema. A copy of the source code may be downloaded from https://github.com/ahmadnassri/har-schema.git. This software contains the following license and notice below: + +Copyright (c) 2015, Ahmad Nassri + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: har-validator. A copy of the source code may be downloaded from https://github.com/ahmadnassri/node-har-validator.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2018 Ahmad Nassri + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: has-symbols. A copy of the source code may be downloaded from git://github.com/ljharb/has-symbols.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2016 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: http-parser-js. A copy of the source code may be downloaded from git://github.com/creationix/http-parser-js.git. This software contains the following license and notice below: + +Copyright (c) 2015 Tim Caswell (https://github.com/creationix) and other +contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +Some files from the tests folder are from joyent/node and mscedex/io.js, a fork +of nodejs/io.js: + +- tests/iojs/test-http-parser-durability.js + + This file is from https://github.com/mscdex/io.js/blob/js-http-parser/test/pummel/test-http-parser-durability.js + with modifications by Jan Schär (jscissr). + + """ + Copyright io.js contributors. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + """ + +- tests/fixtures/* + tests/parallel/* + tests/testpy/* + tests/common.js + tests/test.py + tests/utils.py + + These files are from https://github.com/nodejs/node with changes by + Jan Schär (jscissr). + + Node.js is licensed for use as follows: + + """ + Copyright Node.js contributors. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + """ + + This license applies to parts of Node.js originating from the + https://github.com/joyent/node repository: + + """ + Copyright Joyent, Inc. and other Node contributors. All rights reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + """ + +----- + +The following software may be included in this product: inflight. A copy of the source code may be downloaded from https://github.com/npm/inflight.git. This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: inherits. A copy of the source code may be downloaded from git://github.com/isaacs/inherits. This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: is-arguments, is-regex, object-is. A copy of the source code may be downloaded from git://github.com/ljharb/is-arguments.git (is-arguments), git://github.com/ljharb/is-regex.git (is-regex), git://github.com/es-shims/object-is.git (object-is). This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: is-bigint. A copy of the source code may be downloaded from git+https://github.com/ljharb/is-bigint.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2018 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: is-map, is-set, is-weakmap, is-weakset, which-collection. A copy of the source code may be downloaded from git+https://github.com/inspect-js/is-map.git (is-map), git+https://github.com/inspect-js/is-set.git (is-set), git+https://github.com/inspect-js/is-weakmap.git (is-weakmap), git+https://github.com/inspect-js/is-weakset.git (is-weakset), git+https://github.com/inspect-js/which-collection.git (which-collection). This software contains the following license and notice below: + +MIT License + +Copyright (c) 2019 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: isstream. A copy of the source code may be downloaded from https://github.com/rvagg/isstream.git. This software contains the following license and notice below: + +The MIT License (MIT) +===================== + +Copyright (c) 2015 Rod Vagg +--------------------------- + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: jsbn. A copy of the source code may be downloaded from https://github.com/andyperlitch/jsbn.git. This software contains the following license and notice below: + +Licensing +--------- + +This software is covered under the following copyright: + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + +Address all questions regarding this license to: + + Tom Wu + tjw@cs.Stanford.EDU + +----- + +The following software may be included in this product: json-rpc2. A copy of the source code may be downloaded from git://github.com/pocesar/node-jsonrpc2.git. This software contains the following license and notice below: + +Copyright (C) 2009 Eric Florenzano and + Ryan Tomayko + +Permission is hereby granted, free of charge, to any person ob- +taining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restric- +tion, including without limitation the rights to use, copy, modi- +fy, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONIN- +FRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: json-stringify-safe, minimatch, once, semver, wrappy. A copy of the source code may be downloaded from git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver (semver), https://github.com/npm/wrappy (wrappy). This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: jsonparse. A copy of the source code may be downloaded from http://github.com/creationix/jsonparse.git. This software contains the following license and notice below: + +The MIT License + +Copyright (c) 2012 Tim Caswell + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: lodash. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git. This software contains the following license and notice below: + +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + +----- + +The following software may be included in this product: mime-db. A copy of the source code may be downloaded from https://github.com/jshttp/mime-db.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: mime-types. A copy of the source code may be downloaded from https://github.com/jshttp/mime-types.git. This software contains the following license and notice below: + +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: mkdirp. A copy of the source code may be downloaded from https://github.com/isaacs/node-mkdirp.git. This software contains the following license and notice below: + +Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me) + +This project is free software released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: moment. A copy of the source code may be downloaded from https://github.com/moment/moment.git. This software contains the following license and notice below: + +Copyright (c) JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: ms. A copy of the source code may be downloaded from https://github.com/zeit/ms.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: object-assign, path-is-absolute. A copy of the source code may be downloaded from https://github.com/sindresorhus/object-assign.git (object-assign), https://github.com/sindresorhus/path-is-absolute.git (path-is-absolute). This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: object-inspect. A copy of the source code may be downloaded from git://github.com/inspect-js/object-inspect.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2013 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: object-keys. A copy of the source code may be downloaded from git://github.com/ljharb/object-keys.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (C) 2013 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: object.assign. A copy of the source code may be downloaded from git://github.com/ljharb/object.assign.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: performance-now. A copy of the source code may be downloaded from git://github.com/braveg1rl/performance-now.git. This software contains the following license and notice below: + +Copyright (c) 2013 Braveg1rl + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: psl. A copy of the source code may be downloaded from git@github.com:lupomontero/psl.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2017 Lupo Montero lupomontero@gmail.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: qs. A copy of the source code may be downloaded from https://github.com/ljharb/qs.git. This software contains the following license and notice below: + +Copyright (c) 2014 Nathan LaFreniere and other contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors + +----- + +The following software may be included in this product: regexp.prototype.flags. A copy of the source code may be downloaded from git://github.com/es-shims/RegExp.prototype.flags.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (C) 2014 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: safe-buffer. A copy of the source code may be downloaded from git://github.com/feross/safe-buffer.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: safer-buffer. A copy of the source code may be downloaded from git+https://github.com/ChALkeR/safer-buffer.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2018 Nikita Skovoroda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: string.prototype.trimend, string.prototype.trimstart. A copy of the source code may be downloaded from git://github.com/es-shims/String.prototype.trimEnd.git (string.prototype.trimend), git://github.com/es-shims/String.prototype.trimStart.git (string.prototype.trimstart). This software contains the following license and notice below: + +MIT License + +Copyright (c) 2017 Khaled Al-Ansari + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: tough-cookie. A copy of the source code may be downloaded from git://github.com/salesforce/tough-cookie.git. This software contains the following license and notice below: + +Copyright (c) 2015, Salesforce.com, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----- + +The following software may be included in this product: tree-kill. A copy of the source code may be downloaded from git://github.com/pkrumins/node-tree-kill.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2018 Peter Krumins + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: tweetnacl. A copy of the source code may be downloaded from https://github.com/dchest/tweetnacl-js.git. This software contains the following license and notice below: + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + +----- + +The following software may be included in this product: uuid. A copy of the source code may be downloaded from https://github.com/uuidjs/uuid.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: verror. A copy of the source code may be downloaded from git://github.com/davepacheco/node-verror.git. This software contains the following license and notice below: + +Copyright (c) 2016, Joyent, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE + +----- + +The following software may be included in this product: vscode-debugadapter, vscode-debugprotocol. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugprotocol). This software contains the following license and notice below: + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: vscode-jsonrpc, vscode-languageclient, vscode-languageserver-protocol, vscode-languageserver-types. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-languageserver-node.git (vscode-jsonrpc), https://github.com/Microsoft/vscode-languageserver-node.git (vscode-languageclient), https://github.com/Microsoft/vscode-languageserver-node.git (vscode-languageserver-protocol), https://github.com/Microsoft/vscode-languageserver-node.git (vscode-languageserver-types). This software contains the following license and notice below: + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: web-request. A copy of the source code may be downloaded from git+https://github.com/davetemplin/web-request.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2016 Dave Templin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: websocket-driver. A copy of the source code may be downloaded from git://github.com/faye/websocket-driver-node.git. This software contains the following license and notice below: + +Copyright 2010-2020 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +----- + +The following software may be included in this product: websocket-extensions. A copy of the source code may be downloaded from git://github.com/faye/websocket-extensions-node.git. This software contains the following license and notice below: + +Copyright 2014-2020 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + From bb05e9685093e32d25ea3787d2bc3ad05d35afac Mon Sep 17 00:00:00 2001 From: Peter Weinbergr Date: Mon, 19 Oct 2020 13:20:29 -0400 Subject: [PATCH 010/189] [release] src/goMain: Add a command to copy to gopls output channel to an editor window Intended to be used to make looking through the gopls output channel easier than when it is just in a panel. There doesn't seem to be a straightforward way to give it a sensible name. It would be nice to make the Error popup go away after some period of time. Change-Id: I954d6bae13b7dcefd715fac23f41a0f28a0a6a28 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/263526 Reviewed-by: Hyang-Ah Hana Kim Trust: Hyang-Ah Hana Kim Trust: Peter Weinberger (cherry picked from commit 6f8699c4f942ba03fbc94e6a43c0d8a90e69954d) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/266578 Reviewed-by: Peter Weinberger Run-TryBot: Peter Weinberger --- docs/commands.md | 4 ++++ package.json | 5 +++++ src/goLanguageServer.ts | 30 +++++++++++++++++++++++++++++- src/goMain.ts | 11 +++++++---- 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/docs/commands.md b/docs/commands.md index e75e93629f..dada091cf1 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -91,6 +91,10 @@ Generates unit tests for the selected function in the current file Generates method stub for implementing the provided interface and inserts at the cursor. +### `Go: extract server output channel to editor` + +Show the gopls (server) output channel in the editor. + ### `Go: Toggle gc details` Toggle the display of compiler optimization choices diff --git a/package.json b/package.json index f9b9fade54..4434f62f5e 100644 --- a/package.json +++ b/package.json @@ -242,6 +242,11 @@ "title": "Go: Generate Interface Stubs", "description": "Generates method stub for implementing the provided interface and inserts at the cursor." }, + { + "command": "go.extractServerChannel", + "title": "Go: extract server output channel to editor", + "description": "Show the gopls (server) output channel in the editor." + }, { "command": "go.toggle.gc_details", "title": "Go: Toggle gc details", diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index e229a3921c..3699e0adbd 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -1147,7 +1147,7 @@ function daysBetween(a: Date, b: Date): number { return msBetween(a, b) / timeDay; } -// minutesBetween returns the number of days between a and b. +// minutesBetween returns the number of minutes between a and b. function minutesBetween(a: Date, b: Date): number { return msBetween(a, b) / timeMinute; } @@ -1156,6 +1156,34 @@ function msBetween(a: Date, b: Date): number { return Math.abs(a.getTime() - b.getTime()); } +export function showServerOutputChannel() { + if (!languageServerIsRunning) { + vscode.window.showInformationMessage(`gopls is not running`); + return; + } + // likely show() is asynchronous, despite the documentation + serverOutputChannel.show(); + let found: vscode.TextDocument; + for (const doc of vscode.workspace.textDocuments) { + if (doc.fileName.indexOf('extension-output-') !== -1) { + // despite show() above, this might not get the output we want, so check + const contents = doc.getText(); + if (contents.indexOf('[Info - ') === -1) { + continue; + } + if (found !== undefined) { + vscode.window.showInformationMessage('multiple docs named extension-output-...'); + } + found = doc; + // .log, as some decoration is better than none + vscode.workspace.openTextDocument({language: 'log', content: contents}); + } + } + if (found === undefined) { + vscode.window.showErrorMessage('make sure "gopls (server)" output is showing'); + } +} + function collectGoplsLog(): string { serverOutputChannel.show(); // Find the logs in the output channel. There is no way to read diff --git a/src/goMain.ts b/src/goMain.ts index 9449fb1052..c9843b1532 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -33,10 +33,9 @@ import { } from './goInstallTools'; import { languageServerIsRunning, - promptForLanguageServerDefaultChange, - resetSurveyConfig, - showSurveyConfig, - startLanguageServerWithFallback, watchLanguageServerConfiguration + promptForLanguageServerDefaultChange, resetSurveyConfig, showServerOutputChannel, + showSurveyConfig, startLanguageServerWithFallback, + watchLanguageServerConfiguration } from './goLanguageServer'; import { lintCode } from './goLint'; import { logVerbose, setLogConfig } from './goLogging'; @@ -452,6 +451,10 @@ export function activate(ctx: vscode.ExtensionContext) { ctx.subscriptions.push(vscode.commands.registerCommand('go.install.package', installCurrentPackage)); + ctx.subscriptions.push(vscode.commands.registerCommand('go.extractServerChannel', () => { + showServerOutputChannel(); + })); + ctx.subscriptions.push(vscode.commands.registerCommand('go.toggle.gc_details', () => { if (!languageServerIsRunning) { vscode.window.showErrorMessage('"Go: Toggle gc details" command is available only when the language server is running'); From 2ba92977ad570c1e50610e718cdf7922b6e7c97d Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Mon, 26 Oct 2020 15:38:57 -0400 Subject: [PATCH 011/189] [release] src/goStatus: show Go status bar when the extension is enabled We should be showing the Go status bar, even when there are no active text editors. Fixes golang/vscode-go#831 Change-Id: Ifb228b25f64ad41c7b63bdca27cf351768d8c4ce Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/265126 Trust: Suzy Mueller Trust: Hyang-Ah Hana Kim Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 5eaf73c4b88bc24173382927ddd99713ed842d55) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/266577 Reviewed-by: Suzy Mueller --- src/goInstallTools.ts | 4 ++-- src/goMain.ts | 4 ++-- src/goStatus.ts | 51 +++++++++++++------------------------------ 3 files changed, 19 insertions(+), 40 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index 691c42bce1..f5704fa9f0 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -16,7 +16,7 @@ import { addGoRuntimeBaseToPATH, clearGoRuntimeBaseFromPATH } from './goEnvironm import { getLanguageServerToolPath } from './goLanguageServer'; import { logVerbose } from './goLogging'; import { restartLanguageServer } from './goMain'; -import { addGoStatus, initGoEnvStatusBar, outputChannel, removeGoStatus } from './goStatus'; +import { addGoStatus, initGoStatusBar, outputChannel, removeGoStatus } from './goStatus'; import { containsTool, disableModulesForWildcard, @@ -414,7 +414,7 @@ export function updateGoVarsFromConfig(): Promise { // clear pre-existing terminal PATH mutation logic set up by this extension. clearGoRuntimeBaseFromPATH(); } - initGoEnvStatusBar(); + initGoStatusBar(); // TODO: restart language server or synchronize with language server update. return resolve(); diff --git a/src/goMain.ts b/src/goMain.ts index c9843b1532..4bae122bbf 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -45,7 +45,7 @@ import { GO111MODULE, isModSupported } from './goModules'; import { playgroundCommand } from './goPlayground'; import { GoReferencesCodeLensProvider } from './goReferencesCodelens'; import { GoRunTestCodeLensProvider } from './goRunTestCodelens'; -import { disposeGoStatusBar, expandGoStatusBar, outputChannel, showHideStatus } from './goStatus'; +import { disposeGoStatusBar, expandGoStatusBar, outputChannel, updateGoStatusBar } from './goStatus'; import { subTestAtCursor, testAtCursor, testCurrentFile, testCurrentPackage, testPrevious, testWorkspace } from './goTest'; import { getConfiguredTools } from './goTools'; import { vetCode } from './goVet'; @@ -589,7 +589,7 @@ function addOnChangeTextDocumentListeners(ctx: vscode.ExtensionContext) { } function addOnChangeActiveTextEditorListeners(ctx: vscode.ExtensionContext) { - [showHideStatus, applyCodeCoverage].forEach((listener) => { + [updateGoStatusBar, applyCodeCoverage].forEach((listener) => { // Call the listeners on initilization for current active text editor if (!!vscode.window.activeTextEditor) { listener(vscode.window.activeTextEditor); diff --git a/src/goStatus.ts b/src/goStatus.ts index 0009f58a7f..08ec245501 100644 --- a/src/goStatus.ts +++ b/src/goStatus.ts @@ -25,24 +25,18 @@ let statusBarEntry: vscode.StatusBarItem; let modulePath: string; export const languageServerIcon = '$(zap)'; -export function showHideStatus(editor: vscode.TextEditor) { - // Update the status bar entry - if (!editor) { - hideGoStatusBar(); - } else { - showGoStatusBar(); - // Only update the module path if we are in a Go file. - // This allows the user to open output windows without losing - // the go.mod information in the status bar. - if (isGoFile(editor.document)) { - isModSupported(editor.document.uri).then((isMod) => { - if (isMod) { - getModFolderPath(editor.document.uri).then((p) => modulePath = p); - } else { - modulePath = ''; - } - }); - } +export function updateGoStatusBar(editor: vscode.TextEditor) { + // Only update the module path if we are in a Go file. + // This allows the user to open output windows without losing + // the go.mod information in the status bar. + if (!!editor && isGoFile(editor.document)) { + isModSupported(editor.document.uri).then((isMod) => { + if (isMod) { + getModFolderPath(editor.document.uri).then((p) => modulePath = p); + } else { + modulePath = ''; + } + }); } } @@ -93,7 +87,7 @@ export async function expandGoStatusBar() { /** * Initialize the status bar item with current Go binary */ -export async function initGoEnvStatusBar() { +export async function initGoStatusBar() { if (!goEnvStatusbarItem) { goEnvStatusbarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, 50); } @@ -110,7 +104,7 @@ export async function initGoEnvStatusBar() { const cfg = buildLanguageServerConfig(); updateLanguageServerIconGoStatusBar(true, cfg.serverName); - showHideStatus(vscode.window.activeTextEditor); + showGoStatusBar(); } export async function updateLanguageServerIconGoStatusBar(started: boolean, server: string) { @@ -150,21 +144,6 @@ export function showGoStatusBar() { if (!!goEnvStatusbarItem) { goEnvStatusbarItem.show(); } - if (!!statusBarEntry) { - statusBarEntry.show(); - } -} - -/** - * Hide the Go statusbar items on the statusbar - */ -export function hideGoStatusBar() { - if (!!goEnvStatusbarItem) { - goEnvStatusbarItem.hide(); - } - if (!!statusBarEntry) { - statusBarEntry.hide(); - } } export function removeGoStatus() { @@ -178,5 +157,5 @@ export function addGoStatus(message: string, command: string, tooltip?: string) statusBarEntry.text = `$(alert) ${message}`; statusBarEntry.command = command; statusBarEntry.tooltip = tooltip; - showHideStatus(vscode.window.activeTextEditor); + statusBarEntry.show(); } From d37cc81afebf12f93266ae1a7501c6ecfef8e08d Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 30 Oct 2020 09:30:17 -0400 Subject: [PATCH 012/189] [release] CHANGELOG.md: change log for v0.18.1 And adjusted the new go.extractServerChannel command's title. For golang/vscode-go#861 Change-Id: I50becbc66126f7f3fd5d92f2473427a3d8348d58 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/266581 Trust: Hyang-Ah Hana Kim Trust: Peter Weinberger Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Peter Weinberger Reviewed-by: Suzy Mueller TryBot-Result: kokoro (cherry picked from commit 084dae7bfb1632001fbb32af45d79e93e8fd1229) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/266582 --- CHANGELOG.md | 15 ++++++++++++++- docs/commands.md | 4 ++-- package.json | 4 ++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1aee38d48..0aa33f6726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ +## v0.18.1 - 30th Oct, 2020 + +A list of all issues and changes can be found in the [v0.18.1 milestone](https://github.com/golang/vscode-go/milestone/15?closed=1). + +### Enhancement +- New `Go: extract language server logs to editor` command was added ([CL 263526](https://go-review.googlesource.com/c/vscode-go/+/263526)). + +### Fixes +- Fixed a bug that hid the Go status bar when there is no active text editor ([Issue 831](https://github.com/golang/vscode-go/issues/831)). + +### Thanks +Thank you for your contributions, @suzmue, @pjweinbgo! + ## v0.18.0 - 23rd Oct, 2020 -Unified Go status UI ⚡, many debugger feature improvements, and LSP 3.16 features! A list of all issues fixed with this release can be found in the [v0.18.0 milestone](https://github.com/golang/vscode-go/milestone/11). +Unified Go status UI ⚡, many debugger feature improvements, and LSP 3.16 features! A list of all issues fixed with this release can be found in the [v0.18.0 milestone](https://github.com/golang/vscode-go/milestone/11?closed=1). ### New Features - The new Go status bar provides a menu to manage the go version, open the gopls trace, open the `go.mod` file, and more. The old `Go Modules` status bar was removed in favor of this new unified status bar. See [VS Code Go UI documentation](https://github.com/golang/vscode-go/blob/master/docs/ui.md) to learn more about this. diff --git a/docs/commands.md b/docs/commands.md index dada091cf1..f1450e93ca 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -91,9 +91,9 @@ Generates unit tests for the selected function in the current file Generates method stub for implementing the provided interface and inserts at the cursor. -### `Go: extract server output channel to editor` +### `Go: Extract Language Server Logs To Editor` -Show the gopls (server) output channel in the editor. +Extract logs in the `gopls (server)` output channel to the editor. ### `Go: Toggle gc details` diff --git a/package.json b/package.json index 4434f62f5e..adb1425b76 100644 --- a/package.json +++ b/package.json @@ -244,8 +244,8 @@ }, { "command": "go.extractServerChannel", - "title": "Go: extract server output channel to editor", - "description": "Show the gopls (server) output channel in the editor." + "title": "Go: Extract Language Server Logs To Editor", + "description": "Extract logs in the `gopls (server)` output channel to the editor." }, { "command": "go.toggle.gc_details", From cb22953dcd976e9f953b894bbbc579dd889a40ac Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 30 Oct 2020 16:45:25 -0400 Subject: [PATCH 013/189] [release] package.json: update version info in package.json It should be v0.18.1 https://github.com/golang/vscode-go/runs/1334020348?check_suite_focus=true Change-Id: I651703cbef4057be984c09f721aacba5eb1a7c26 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/266757 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 88b653e7f8..fd47f8418b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.18.0", + "version": "0.18.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index adb1425b76..1197e34a56 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.18.0", + "version": "0.18.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 1d583760034e4a553bfbe47d4714f74c6a3339db Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Fri, 20 Nov 2020 00:48:47 -0500 Subject: [PATCH 014/189] [release] update CHANGELOG and LICENSE for v0.19.0 Change-Id: I1625af6036f78186f6fb60b1cd8579ffc3724495 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/271886 Trust: Suzy Mueller Trust: Hyang-Ah Hana Kim Run-TryBot: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim --- CHANGELOG.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ LICENSE | 54 ++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 102 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aa33f6726..12257090b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,57 @@ +## v0.19.0 - 19 Nov, 2020 + +A list of all issues and changes can be found in the [v0.19.0 milestone](https://github.com/golang/vscode-go/milestone/14). + +### Community + +- Go Nightly users are encouraged to discuss issues and share feedback in the [#vscode-go-nightly](https://gophers.slack.com/archives/C01DQ2KBMNU) slack channel as well as the newly created [Go Nightly mailing list](https://groups.google.com/g/vscode-go-nightly) ([Issue 817](https://github.com/golang/vscode-go/issues/817)) +- All experiments have been turned on for Go nightly ([Issue 818](https://github.com/golang/vscode-go/issues/818)) + +### Enhancements + +- Added a snippet for TestMain ([Issue 629](https://github.com/golang/vscode-go/issues/629)) +- Added `lispcase`, `pascalcase` and `keep` as transform variants for go.addTags ([Issue 906](https://github.com/golang/vscode-go/issues/906), [936](https://github.com/golang/vscode-go/issues/936)) +- Added support for `gomodifytags`'s --template flag ([Issue 826](https://github.com/golang/vscode-go/issues/826)) +- Language Server + * Upgraded to the latest vscode-languageclient pre-release ([Issue 42148](https://github.com/golang/go/issues/42148)) +- Debugging + * package.json: activate extension onDebugInitialConfigurations ([Issue 131](https://github.com/golang/vscode-go/issues/131)) + + +### Fixes + +- Fixed test streaming output handling to correctly add -json flag ([Issue 471](https://github.com/golang/vscode-go/issues/471)) +- Fixed bug that unnecessarily buffered test output ([Issue 917](https://github.com/golang/vscode-go/issues/917)) +- Fixed a bug that occurred when choosing a new Go environment using the file picker ([Issue 868](https://github.com/golang/vscode-go/issues/868), [864](https://github.com/golang/vscode-go/issues/864)) +- Hide running test StatusBarItem after cancelling tests +- Tool Installation + * Unset GOOS/GOARCH/GOROOT/... from tool installation env since the tools need to be built for the host machine ([Issue 628](https://github.com/golang/vscode-go/issues/628)) + * Changed the dependency tool installation to use the `go` command chosen from the current `GOROOT/bin` for gocode-gomode too ([Issue 757](https://github.com/golang/vscode-go/issues/757)) +- Filter out unsupported document types to improve VS Code Live Share experience ([Issue 605](https://github.com/golang/vscode-go/issues/605)) +- Fixed language server survey computation error +- Debugging + * No longer shows a warning about editing Go files if there is no Go Debug Session running. + * Now removes user set '--gcflags' before passing the program to the debugger, since the debugger adds its own flags before building resulting in an error ([Issue 117](https://github.com/golang/vscode-go/issues/117)) + * Fixed bug where the working directory passed in by the user is ignored ([Issue 918](https://github.com/golang/vscode-go/issues/918)) + +### Code Health + +- Debugging + * Added additional tests for the debug adapter including for disconnect requests and remote attach scenarios ([Issue 779](https://github.com/golang/vscode-go/issues/779), [790](https://github.com/golang/vscode-go/issues/790)) + * Added tests for the debug configuration to test the user settings that should affect the debug configuration +- Improved the extension contributor experience by renaming the test fixtures folder to avoid errors being shown for these files +- Language Server Tests + - Changed the test environment setup to use single file edit ([Issue 655](https://github.com/golang/vscode-go/issues/655), [832](https://github.com/golang/vscode-go/issues/832)) +- Adjusted home directory used in gerrit CI since recent changes in kokoro were restricting access ([Issue 833](https://github.com/golang/vscode-go/issues/833)) +- Updated Github workflows actions/setup-go to v2 +- Restructured the goTest code to be more readable and easier to test +- Continued to improve the gopls settings documentation generator ([Issue 197](https://github.com/golang/vscode-go/issues/197)) + + +### Thanks + +Thank you for your contribution, @pofl, @hyangah, @perrito666, @pjweinbgo, @quoctruong, @stamblerre, @skaldesh, and @suzmue! + ## v0.18.1 - 30th Oct, 2020 A list of all issues and changes can be found in the [v0.18.1 milestone](https://github.com/golang/vscode-go/milestone/15?closed=1). diff --git a/LICENSE b/LICENSE index 138c3871bf..cb8385be7d 100644 --- a/LICENSE +++ b/LICENSE @@ -28,6 +28,32 @@ THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY B ----- +The following software may be included in this product: @types/yargs-parser. A copy of the source code may be downloaded from https://github.com/DefinitelyTyped/DefinitelyTyped.git. This software contains the following license and notice below: + +MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE + +----- + The following software may be included in this product: ajv. A copy of the source code may be downloaded from https://github.com/ajv-validator/ajv.git. This software contains the following license and notice below: The MIT License (MIT) @@ -394,7 +420,7 @@ THE SOFTWARE. ----- -The following software may be included in this product: concat-map, is-typedarray. A copy of the source code may be downloaded from git://github.com/substack/node-concat-map.git (concat-map), git://github.com/hughsk/is-typedarray.git (is-typedarray). This software contains the following license and notice below: +The following software may be included in this product: concat-map, is-typedarray, minimist. A copy of the source code may be downloaded from git://github.com/substack/node-concat-map.git (concat-map), git://github.com/hughsk/is-typedarray.git (is-typedarray), git://github.com/substack/minimist.git (minimist). This software contains the following license and notice below: This software is released under the MIT license: @@ -1191,7 +1217,7 @@ PERFORMANCE OF THIS SOFTWARE. ----- -The following software may be included in this product: is-arguments, is-regex, object-is. A copy of the source code may be downloaded from git://github.com/ljharb/is-arguments.git (is-arguments), git://github.com/ljharb/is-regex.git (is-regex), git://github.com/es-shims/object-is.git (object-is). This software contains the following license and notice below: +The following software may be included in this product: is-arguments, is-negative-zero, is-regex, object-is. A copy of the source code may be downloaded from git://github.com/ljharb/is-arguments.git (is-arguments), git://github.com/ljharb/is-negative-zero.git (is-negative-zero), git://github.com/ljharb/is-regex.git (is-regex), git://github.com/es-shims/object-is.git (object-is). This software contains the following license and notice below: The MIT License (MIT) @@ -1511,11 +1537,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- -The following software may be included in this product: mkdirp. A copy of the source code may be downloaded from https://github.com/isaacs/node-mkdirp.git. This software contains the following license and notice below: +The following software may be included in this product: mkdirp. A copy of the source code may be downloaded from https://github.com/substack/node-mkdirp.git. This software contains the following license and notice below: -Copyright James Halliday (mail@substack.net) and Isaac Z. Schlueter (i@izs.me) +Copyright 2010 James Halliday (mail@substack.net) -This project is free software released under the MIT license: +This project is free software released under the MIT/X11 license: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1929,6 +1955,22 @@ For more information, please refer to ----- +The following software may be included in this product: uri-js. A copy of the source code may be downloaded from http://github.com/garycourt/uri-js. This software contains the following license and notice below: + +Copyright 2011 Gary Court. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. + +----- + The following software may be included in this product: uuid. A copy of the source code may be downloaded from https://github.com/uuidjs/uuid.git. This software contains the following license and notice below: The MIT License (MIT) @@ -1979,7 +2021,7 @@ THE SOFTWARE ----- -The following software may be included in this product: vscode-debugadapter, vscode-debugprotocol. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugprotocol). This software contains the following license and notice below: +The following software may be included in this product: vscode-debugadapter, vscode-debugadapter-testsupport, vscode-debugprotocol. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter-testsupport), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugprotocol). This software contains the following license and notice below: Copyright (c) Microsoft Corporation From bad9dbbfddef1ac610b85f089720a8cbd793fd72 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Fri, 20 Nov 2020 18:30:04 -0500 Subject: [PATCH 015/189] [release] webpack.config.js: ignore warnings from yargs dependency The dependency on 'yargs-parser' and 'yargs-unparser' broke the webpack. The recommended fix from https://github.com/yargs/yargs/issues/781 is to filter out the warnings in the webpack config. Manually tested by running `vsce-package`. Change-Id: Ia0115fd0ccf4a5edfddef4b8f020a70a7e6720a0 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/272093 Trust: Suzy Mueller Trust: Hyang-Ah Hana Kim Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/272446 Reviewed-by: Heschi Kreinick Reviewed-by: Peter Weinberger --- webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 65d2b3f2ac..f360b4a29a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -44,5 +44,9 @@ const config = { // when this is true, the debugger breaks... minimize: false }, + stats: { + // Ignore warnings due to yarg's dynamic module loading + warningsFilter: [/node_modules\/yargs/] + }, }; module.exports = config; From 99f2a1038175488a1e42b42a089573297a3bb1f5 Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Sun, 22 Nov 2020 13:13:31 -0500 Subject: [PATCH 016/189] [release] src/goLanguageServer: suggest updating gopls before filing an issue We're getting a lot of crash issue reports with people using outdated gopls versions. We can just suggest an update to them instead of filing an issue. Also, update the hardcoded latest gopls version and clean up the installing message which used to print "gopls@v0.5.3@0.5.3". Some formatting changes seem to have snuck in--I have format on save set for TypeScript with the TSLint extension. Should I change something? Change-Id: I3aca9e47f42e1e9951b1f6ad99944e36afac766f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/272209 Trust: Rebecca Stambler Trust: Hyang-Ah Hana Kim Run-TryBot: Rebecca Stambler TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit dd08b76e6bf97353b066b866ec5a3578217f7265) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/272966 Trust: Robert Findley --- src/goInstallTools.ts | 27 ++++++++++++++++----------- src/goLanguageServer.ts | 39 +++++++++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index 3870634783..231c00b516 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -226,8 +226,6 @@ export async function installTool( } args.push(importPath); - const toolImportPath = tool.version ? importPath + '@' + tool.version : importPath; - let output: string; let result: string = ''; try { @@ -253,10 +251,10 @@ export async function installTool( await execFile(goBinary, ['build', '-o', outputFile, importPath], opts); } const toolInstallPath = getBinPath(tool.name); - outputChannel.appendLine(`Installing ${toolImportPath} (${toolInstallPath}) SUCCEEDED`); + outputChannel.appendLine(`Installing ${importPath} (${toolInstallPath}) SUCCEEDED`); } catch (e) { - outputChannel.appendLine(`Installing ${toolImportPath} FAILED`); - result = `failed to install ${tool.name}(${toolImportPath}): ${e} ${output} `; + outputChannel.appendLine(`Installing ${importPath} FAILED`); + result = `failed to install ${tool.name}(${importPath}): ${e} ${output} `; } // Delete the temporary installation directory. @@ -316,7 +314,7 @@ Run "go get -v ${getImportPath(tool, goVersion)}" to install.`; } } -export async function promptForUpdatingTool(toolName: string, newVersion?: SemVer) { +export async function promptForUpdatingTool(toolName: string, newVersion?: SemVer, crashed?: boolean) { const tool = getTool(toolName); const toolVersion = { ...tool, version: newVersion }; // ToolWithVersion @@ -324,21 +322,28 @@ export async function promptForUpdatingTool(toolName: string, newVersion?: SemVe if (containsTool(declinedUpdates, tool)) { return; } - const goVersion = await getGoVersion(); - let updateMsg = `Your version of ${tool.name} appears to be out of date. Please update for an improved experience.`; + + // Adjust the prompt if it occurred because the tool crashed. + let updateMsg: string; + if (crashed === true) { + updateMsg = `${tool.name} has crashed, but you are using an outdated version. Please update to the latest version of ${tool.name}.`; + } else if (newVersion) { + updateMsg = `A new version of ${tool.name} (v${newVersion}) is available. Please update for an improved experience.`; + } else { + updateMsg = `Your version of ${tool.name} appears to be out of date. Please update for an improved experience.`; + } + let choices: string[] = ['Update']; if (toolName === `gopls`) { choices.push('Release Notes'); } - if (newVersion) { - updateMsg = `A new version of ${tool.name} (v${newVersion}) is available. Please update for an improved experience.`; - } while (choices.length > 0) { const selected = await vscode.window.showInformationMessage(updateMsg, ...choices); switch (selected) { case 'Update': choices = []; + const goVersion = await getGoVersion(); await installTools([toolVersion], goVersion); break; case 'Release Notes': diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index e23d2df533..763097c398 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -215,19 +215,19 @@ export interface BuildLanguageClientOption extends LanguageServerConfig { // used in building a new LanguageClient instance. Options specified // in LanguageServerConfig function buildLanguageClientOption(cfg: LanguageServerConfig): BuildLanguageClientOption { - // Reuse the same output channel for each instance of the server. - if (cfg.enabled) { - if (!serverOutputChannel) { - serverOutputChannel = vscode.window.createOutputChannel(cfg.serverName + ' (server)'); - } - if (!serverTraceChannel) { - serverTraceChannel = vscode.window.createOutputChannel(cfg.serverName); - } + // Reuse the same output channel for each instance of the server. + if (cfg.enabled) { + if (!serverOutputChannel) { + serverOutputChannel = vscode.window.createOutputChannel(cfg.serverName + ' (server)'); + } + if (!serverTraceChannel) { + serverTraceChannel = vscode.window.createOutputChannel(cfg.serverName); } - return Object.assign({ - outputChannel: serverOutputChannel, - traceOutputChannel: serverTraceChannel - }, cfg); + } + return Object.assign({ + outputChannel: serverOutputChannel, + traceOutputChannel: serverTraceChannel + }, cfg); } // buildLanguageClient returns a language client built using the given language server config. @@ -1128,6 +1128,17 @@ async function suggestGoplsIssueReport(msg: string, reason: errorKind) { return; } + // The user may have an outdated version of gopls, in which case we should + // just prompt them to update, not file an issue. + const tool = getTool('gopls'); + if (tool) { + const versionToUpdate = await shouldUpdateLanguageServer(tool, latestConfig); + if (versionToUpdate) { + promptForUpdatingTool(tool.name, versionToUpdate, true); + return; + } + } + // Show the user the output channel content to alert them to the issue. serverOutputChannel.show(); @@ -1165,8 +1176,8 @@ You will be asked to provide additional information and logs, so PLEASE READ THE errKind = 'initialization'; break; } + // Get the user's version in case the update prompt above failed. const usersGoplsVersion = await getLocalGoplsVersion(latestConfig); - // TODO(hakim): If gopls version is too old, ask users to update it. const settings = latestConfig.flags.join(' '); const title = `gopls: automated issue report (${errKind})`; const sanitizedLog = collectGoplsLog(); @@ -1258,7 +1269,7 @@ export function showServerOutputChannel() { } found = doc; // .log, as some decoration is better than none - vscode.workspace.openTextDocument({language: 'log', content: contents}); + vscode.workspace.openTextDocument({ language: 'log', content: contents }); } } if (found === undefined) { From 60835ca6524f16db87cfbb224b5ef66167f504df Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 24 Nov 2020 11:21:34 -0500 Subject: [PATCH 017/189] [release] .github/workflows: update to use env file instead of set-env Set-env is deprecated. Needs to be cherry-picked to the release branch too. Updates golang/vscode-go#962 Change-Id: Ic27238ce3f982abad3e4b6a14f7c2fb7eb75341f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/272828 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit f6c5b08cc429faa5cb0c048778ace4e8356063e5) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/272792 Reviewed-by: Robert Findley --- .github/workflows/release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c984375ec3..0e98de87b2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,17 +50,21 @@ jobs: exit 1 fi - echo ::set-env name=EXT_VERSION::"${TAGGED_VERSION}" + echo "EXT_VERSION=${TAGGED_VERSION}" >> $GITHUB_ENV WRITTEN_VERSION="$(cat package.json | jq '.version' -r)" - if [[ ${TAGGED_VERSION} == *"-"* ]]; then - echo ::set-env name=EXT_ISPREVIEW::1 + if [[ "${TAGGED_VERSION}" == *"-"* ]]; then + if [[ ! "${TAGGED_VERSION}" == "${WRITTEN_VERSION}"-rc.* ]]; then + echo "Prerelease Tag and Version in package.json are not compatible: '${TAGGED_VERSION}' vs '${WRITTEN_VERSION}'" + exit 1 + fi + echo "EXT_ISPREVIEW=1" >> $GITHUB_ENV else if [[ "${TAGGED_VERSION}" != "${WRITTEN_VERSION}" ]]; then echo "Release Tag and Version in package.json do not match: '${TAGGED_VERSION}' vs '${WRITTEN_VERSION}'" exit 1 fi - echo ::set-env name=EXT_ISPREVIEW::0 + echo "EXT_ISPREVIEW=0" >> $GITHUB_ENV fi - name: stamp version From 816f9ce1b5c94b4cfe52f487dc97d883a8e7242c Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 25 Nov 2020 12:32:52 -0500 Subject: [PATCH 018/189] [release] Update CHANGELOG date for release Change-Id: I98bf4dcb277254fe00ce636d8b6993e4f3058bb1 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/273188 Trust: Suzy Mueller Run-TryBot: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12257090b8..542227c4be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## v0.19.0 - 19 Nov, 2020 +## v0.19.0 - 25 Nov, 2020 A list of all issues and changes can be found in the [v0.19.0 milestone](https://github.com/golang/vscode-go/milestone/14). From aeea154369b880ab3c138ae4507410dcf1cc50fd Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 25 Nov 2020 12:31:08 -0500 Subject: [PATCH 019/189] [release] package.json: Add "template" property to go.addTags configuration Add the missing template property for addTags. Fixes golang/vscode-go#965 Change-Id: I930e405f0dd1fe0267c8a321549dca49258e2772 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/273187 Trust: Suzy Mueller Run-TryBot: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/273189 TryBot-Result: kokoro --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index db43babfb5..bf6c1efc82 100644 --- a/package.json +++ b/package.json @@ -1697,6 +1697,11 @@ ], "default": "snakecase", "description": "Transformation rule used by Go: Add Tags command to add tags" + }, + "template": { + "type": "string", + "default": "", + "description": "Custom format used by Go: Add Tags command for the tag value to be applied" } }, "additionalProperties": false, From 38dce0d6e8571f73a6edff260de56ea16f077299 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 24 Nov 2020 17:17:13 -0500 Subject: [PATCH 020/189] [release] package.json: skip godlvdap debug config in the stable version We want to do more polishing on the Go Delve DAP debug option. Until then, hide this in the stable version of the extension. I hoped that I could disable that from the quick pick option but I couldn't find how. (Not registering the debug config provider didn't do the job). I left goMain.ts untouched - it seems like it doesn't affect visibility of the configuration. This is a patch only applied to the release, and latest branches. Not the main branch where nightly is built from. Nightly will keep presenting the godlvdap option. Fixes golang/vscode-go#960 Change-Id: I1afe8104a4e1b0e654727ec1fa574acccbd43605 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/273046 Trust: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- package.json | 377 +-------------------------------------------------- 1 file changed, 1 insertion(+), 376 deletions(-) diff --git a/package.json b/package.json index bf6c1efc82..6130f36afb 100644 --- a/package.json +++ b/package.json @@ -783,382 +783,7 @@ } } } - } - }, - { - "type": "godlvdap", - "label": "Go Dlv Dap (Experimental)", - "program": "./dist/debugAdapter2.js", - "runtime": "node", - "languages": [ - "go" - ], - "configurationSnippets": [ - { - "label": "Go: Launch package", - "description": "Debug the package in the program attribute", - "body": { - "name": "${2:Launch Package}", - "type": "godlvdap", - "request": "launch", - "mode": "debug", - "program": "^\"\\${workspaceFolder}${1:}\"" - } - }, - { - "label": "Go: Launch file", - "description": "Debug the file in the program attribute", - "body": { - "name": "${2:Launch file}", - "type": "godlvdap", - "request": "launch", - "mode": "debug", - "program": "^\"${1:\\${file\\}}\"" - } - }, - { - "label": "Go: Launch test package", - "description": "Debug the test package in the program attribute", - "body": { - "name": "${2:Launch test package}", - "type": "godlvdap", - "request": "launch", - "mode": "test", - "program": "^\"\\${workspaceFolder}${1:}\"" - } - }, - { - "label": "Go: Launch test function", - "description": "Debug the test function in the args, ensure program attributes points to right package", - "body": { - "name": "${3:Launch test function}", - "type": "godlvdap", - "request": "launch", - "mode": "test", - "program": "^\"\\${workspaceFolder}${1:}\"", - "args": [ - "-test.run", - "${2:MyTestFunction}" - ] - } - }, - { - "label": "Go: Attach to local process", - "description": "Attach to an existing process by process ID", - "body": { - "name": "${1:Attach to Process}", - "type": "godlvdap", - "request": "attach", - "mode": "local", - "processId": 0 - } - }, - { - "label": "Go: Connect to server", - "description": "Connect to a remote headless debug server", - "body": { - "name": "${1:Connect to server}", - "type": "godlvdap", - "request": "attach", - "mode": "remote", - "remotePath": "^\"\\${workspaceFolder}\"", - "port": 2345, - "host": "127.0.0.1" - } - } - ], - "configurationAttributes": { - "launch": { - "required": [], - "properties": { - "program": { - "type": "string", - "description": "Path to the program folder (or any file within that folder) when in 'debug' or 'test' mode, and to the pre-built binary file to debug in 'exec' mode.", - "default": "${workspaceFolder}" - }, - "mode": { - "enum": [ - "auto", - "debug", - "test", - "exec" - ], - "description": "One of 'auto', 'debug', 'test', 'exec'.", - "default": "auto" - }, - "stopOnEntry": { - "type": "boolean", - "description": "Automatically stop program after launch.", - "default": false - }, - "args": { - "type": "array", - "description": "Command line arguments passed to the program.", - "items": { - "type": "string" - }, - "default": [] - }, - "showLog": { - "type": "boolean", - "description": "Show log output from the delve debugger.", - "default": false - }, - "cwd": { - "type": "string", - "description": "Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.", - "default": "." - }, - "env": { - "type": "object", - "description": "Environment variables passed to the program.", - "default": {} - }, - "buildFlags": { - "type": "string", - "description": "Build flags, to be passed to the Go compiler.", - "default": "" - }, - "init": { - "type": "string", - "description": "Init file, executed by the terminal client.", - "default": "" - }, - "remotePath": { - "type": "string", - "description": "Absolute path to the file being debugged on the remote machine in case of remote debugging.", - "default": "" - }, - "port": { - "type": "number", - "description": "The port that the delve debugger will be listening on.", - "default": 2345 - }, - "host": { - "type": "string", - "description": "The host name of the machine the delve debugger will be listening on.", - "default": "127.0.0.1" - }, - "trace": { - "type": "string", - "enum": [ - "log", - "verbose", - "error" - ], - "default": "error", - "description": "Various levels of logging shown in the debug console. When set to 'log' or 'verbose', the logs will also be written to a file." - }, - "envFile": { - "type": [ - "string", - "array" - ], - "items": { - "type": "string" - }, - "description": "Absolute path to a file containing environment variable definitions. Multiple files can be specified by provided an array of absolute paths", - "default": "${workspaceFolder}/.env" - }, - "backend": { - "type": "string", - "enum": [ - "default", - "native", - "lldb" - ], - "description": "Backend used by delve. Only available in delve version 0.12.2 and above." - }, - "output": { - "type": "string", - "description": "Output path for the binary of delve", - "default": "debug" - }, - "logOutput": { - "type": "string", - "enum": [ - "debugger", - "gdbwire", - "lldbout", - "debuglineerr", - "dap" - ], - "description": "Comma separated list of components that should produce debug output.", - "default": "debugger" - }, - "dlvLoadConfig": { - "type": "object", - "properties": { - "followPointers": { - "type": "boolean", - "description": "FollowPointers requests pointers to be automatically dereferenced", - "default": true - }, - "maxVariableRecurse": { - "type": "number", - "description": "MaxVariableRecurse is how far to recurse when evaluating nested types", - "default": 1 - }, - "maxStringLen": { - "type": "number", - "description": "MaxStringLen is the maximum number of bytes read from a string", - "default": 64 - }, - "maxArrayValues": { - "type": "number", - "description": "MaxArrayValues is the maximum number of elements read from an array, a slice or a map", - "default": 64 - }, - "maxStructFields": { - "type": "number", - "description": "MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields", - "default": -1 - } - }, - "description": "LoadConfig describes to delve, how to load values from target's memory", - "default": { - "followPointers": true, - "maxVariableRecurse": 1, - "maxStringLen": 64, - "maxArrayValues": 64, - "maxStructFields": -1 - } - }, - "stackTraceDepth": { - "type": "number", - "description": "Maximum depth of stack trace collected from Delve", - "default": 50 - }, - "showGlobalVariables": { - "type": "boolean", - "default": false, - "description": "Boolean value to indicate whether global package variables should be shown in the variables pane or not." - } - } - }, - "attach": { - "required": [], - "properties": { - "processId": { - "type": "number", - "description": "The ID of the process to be debugged." - }, - "mode": { - "enum": [ - "local", - "remote" - ], - "description": "Indicates local or remote debugging. Local maps to the dlv 'attach' command, remote maps to 'connect'.", - "default": "local" - }, - "showLog": { - "type": "boolean", - "description": "Show log output from the delve debugger.", - "default": false - }, - "cwd": { - "type": "string", - "description": "Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.", - "default": "${workspaceFolder}" - }, - "remotePath": { - "type": "string", - "description": "If remote debugging, the path to the source code on the remote machine, if different from the local machine.", - "default": "" - }, - "port": { - "type": "number", - "description": "The port that the delve debugger will be listening on.", - "default": 2345 - }, - "host": { - "type": "string", - "description": "The host name of the machine the delve debugger will be listening on.", - "default": "127.0.0.1" - }, - "trace": { - "type": "string", - "enum": [ - "log", - "verbose", - "error" - ], - "default": "error", - "description": "Various levels of logging shown in the debug console. When set to 'log' or 'verbose', the logs will also be written to a file." - }, - "backend": { - "type": "string", - "enum": [ - "default", - "native", - "lldb" - ], - "description": "Backend used by delve. Only available in delve version 0.12.2 and above." - }, - "logOutput": { - "type": "string", - "enum": [ - "debugger", - "gdbwire", - "lldbout", - "debuglineerr", - "dap", - "rpc" - ], - "description": "Comma separated list of components that should produce debug output.", - "default": "debugger" - }, - "dlvLoadConfig": { - "type": "object", - "properties": { - "followPointers": { - "type": "boolean", - "description": "FollowPointers requests pointers to be automatically dereferenced", - "default": true - }, - "maxVariableRecurse": { - "type": "number", - "description": "MaxVariableRecurse is how far to recurse when evaluating nested types", - "default": 1 - }, - "maxStringLen": { - "type": "number", - "description": "MaxStringLen is the maximum number of bytes read from a string", - "default": 64 - }, - "maxArrayValues": { - "type": "number", - "description": "MaxArrayValues is the maximum number of elements read from an array, a slice or a map", - "default": 64 - }, - "maxStructFields": { - "type": "number", - "description": "MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields", - "default": -1 - } - }, - "description": "LoadConfig describes to delve, how to load values from target's memory", - "default": { - "followPointers": true, - "maxVariableRecurse": 1, - "maxStringLen": 64, - "maxArrayValues": 64, - "maxStructFields": -1 - } - }, - "stackTraceDepth": { - "type": "number", - "description": "Maximum depth of stack trace collected from Delve", - "default": 50 - }, - "showGlobalVariables": { - "type": "boolean", - "default": false, - "description": "Boolean value to indicate whether global package variables should be shown in the variables pane or not." - } - } - } - } + } } ], "configuration": { From d96b8e9f2d7a478949fe37623a597b3f2fddd4d1 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 24 Nov 2020 18:02:58 -0500 Subject: [PATCH 021/189] [release] src/testUtils: adjust file path expansion regexp to capture subtest failures Looks like verbose mode handling (json mode) already handles subtest error messages as expected. Fixes golang/vscode-go#956 Change-Id: I086076f1ab5435bd51f0956ec74e62d59e323531 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/273048 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Peter Weinberger (cherry picked from commit 8ea68d8442e2b4fb1019d46d740e171027b41429) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276212 --- src/testUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testUtils.ts b/src/testUtils.ts index 8da17c7c30..2fc461c682 100644 --- a/src/testUtils.ts +++ b/src/testUtils.ts @@ -497,7 +497,7 @@ function processTestResultLineInStandardMode( outputChannel: vscode.OutputChannel) { // 1=ok/FAIL/?, 2=package, 3=time/(cached)/[no test files] const packageResultLineRE = /^(ok|FAIL|\?)\s+(\S+)\s+([0-9\.]+s|\(cached\)|\[no test files\])/; - const lineWithErrorRE = /^(\t|\s\s\s\s)\S/; + const lineWithErrorRE = /^\s+(\S+\.go):(\d+):/; return (line: string) => { testResultLines.push(line); From f663bea7cf7bc32448f6f7652a89705978c1cc6e Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 7 Dec 2020 14:43:19 -0500 Subject: [PATCH 022/189] [release] src/goLanguageServer: enable user survey in stable version. And, add gopls version and extension id to survey link to distinguish results from nightly and stable extensions. Adjust "showSurveyConfig' behavior for easier survey testing. 'Yes' try to prompt for survey, while 'Maybe' will try to run the survey prompt config update (which maybe results in prompting for survey). Fixes golang/vscode-go#910 Change-Id: I5490620c3c17c6c71de8a9b9cf5e2b6e9a7c6e55 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/275880 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit da0f1c60fed7e68be709b1b88e23ac1b45b61c73) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276216 --- src/goLanguageServer.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 763097c398..41a2162173 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -91,10 +91,6 @@ let defaultLanguageProviders: vscode.Disposable[] = []; // server. let restartCommand: vscode.Disposable; -// When enabled, users may be prompted to fill out the gopls survey. -// For now, we turn it on in the Nightly extension to test it. -const goplsSurveyOn: boolean = isNightly(); - // lastUserAction is the time of the last user-triggered change. // A user-triggered change is a didOpen, didChange, didSave, or didClose event. let lastUserAction: Date = new Date(); @@ -147,7 +143,7 @@ function scheduleGoplsSuggestions(tool: Tool) { setTimeout(survey, timeDay); const cfg = buildLanguageServerConfig(getGoConfig()); - if (!goplsSurveyOn || !cfg.enabled) { + if (!cfg.enabled) { return; } maybePromptForGoplsSurvey(); @@ -823,6 +819,9 @@ export const getLatestGoplsVersion = async (tool: Tool) => { // // If this command has already been executed, it returns the saved result. export const getLocalGoplsVersion = async (cfg: LanguageServerConfig) => { + if (!cfg) { + return null; + } if (cfg.version !== '') { return cfg.version; } @@ -1042,8 +1041,8 @@ Would you be willing to fill out a quick survey about your experience with gopls case 'Yes': cfg.lastDateAccepted = now; cfg.prompt = true; - - await vscode.env.openExternal(vscode.Uri.parse(`https://google.qualtrics.com/jfe/form/SV_ekAdHVcVcvKUojX`)); + const usersGoplsVersion = await getLocalGoplsVersion(latestConfig); + await vscode.env.openExternal(vscode.Uri.parse(`https://google.qualtrics.com/jfe/form/SV_ekAdHVcVcvKUojX?gopls=${usersGoplsVersion}&extid=${extensionId}`)); break; case 'Not now': cfg.prompt = true; @@ -1080,7 +1079,7 @@ function getSurveyConfig(): SurveyConfig { } return value; }); - return cfg; + return cfg || {}; } catch (err) { console.log(`Error parsing JSON from ${saved}: ${err}`); return {}; @@ -1092,9 +1091,12 @@ export async function showSurveyConfig() { outputChannel.appendLine(JSON.stringify(getSurveyConfig(), null, 2)); outputChannel.show(); - const selected = await vscode.window.showInformationMessage(`Maybe prompt for survey?`, 'Yes', 'No'); + const selected = await vscode.window.showInformationMessage(`Prompt for survey?`, 'Yes', 'Maybe', 'No'); switch (selected) { case 'Yes': + promptForSurvey(getSurveyConfig(), new Date()); + break; + case 'Maybe': maybePromptForGoplsSurvey(); break; default: From ffb1bae0ed80f4eb1f8b24f7bbb0deb416f6e152 Mon Sep 17 00:00:00 2001 From: Roman Kornev Date: Mon, 30 Nov 2020 21:27:56 +0000 Subject: [PATCH 023/189] [release] snippets: avoid using "var" as default name in snippets "var" is a reserved keyword. Some snippets using "var" as the default name produce Error: "expected 1 expression" Replace the usage with more general names like `v` Fixes golang/vscode-go#969 Change-Id: If335db938715a7c79e72e7e4d2fd0dc87507ca1d GitHub-Last-Rev: 835feb47392a39fdb25b933401f1a1909d541ecc GitHub-Pull-Request: golang/vscode-go#970 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/273746 Reviewed-by: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim Trust: Suzy Mueller Trust: Hyang-Ah Hana Kim (cherry picked from commit e8d462e3ae4a7ad44ac70640b14118e30c0a1ef3) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276213 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Robert Findley --- snippets/go.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/go.json b/snippets/go.json index 6f1632f169..79c7fa6410 100644 --- a/snippets/go.json +++ b/snippets/go.json @@ -67,7 +67,7 @@ }, "for range statement": { "prefix": "forr", - "body": "for ${1:_, }${2:var} := range ${3:var} {\n\t$0\n}", + "body": "for ${1:_, }${2:v} := range ${3:v} {\n\t$0\n}", "description": "Snippet for a for range loop" }, "channel declaration": { From 1c396a5a8310a9ec93fed50f7daab750753584d1 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 2 Dec 2020 12:19:51 -0500 Subject: [PATCH 024/189] [release] src/goDebug: fix noDebug mode for windows On windows, the executable file has to have '.exe' extension. Add the extension when building the program in noDebug mode. Updates golang/vscode-go#918 Change-Id: Icddf6c2dced50f885e1dd27fc685a14ea54d52e1 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/274872 Trust: Suzy Mueller Trust: Hyang-Ah Hana Kim Run-TryBot: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit e2d78f1d32c6367d6d9db9583d4a7027152ae58f) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276214 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Polina Sokolova --- src/debugAdapter/goDebug.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts index 2d52b328fe..a4a762894e 100644 --- a/src/debugAdapter/goDebug.ts +++ b/src/debugAdapter/goDebug.ts @@ -31,6 +31,7 @@ import { import { DebugProtocol } from 'vscode-debugprotocol'; import { parseEnvFiles } from '../utils/envUtils'; import { + correctBinname, envPath, expandFilePathInOutput, fixDriveCasingInWindows, @@ -482,8 +483,7 @@ export class Delve { if (mode === 'debug') { this.noDebug = true; const build = ['build']; - - const output = path.join(os.tmpdir(), 'out'); + const output = path.join(os.tmpdir(), correctBinname('out')); build.push(`-o=${output}`); const buildOptions: { [key: string]: any } = { cwd: dirname, env }; From 2a485790c72a4e1dfb1b61b81315e87c574814e7 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 2 Dec 2020 15:30:49 -0500 Subject: [PATCH 025/189] [release] src/goDebug: check for undefined launchArgs.packagePathToGoModMap Add a sanity check that launchArgs.packagePathToGoModPathMap is not undefined. Updates golang/vscode-go#982 Change-Id: Id7470268c6beaf3e7656e16a1d07fb7ea6d80cca Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/274932 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Quoc Truong (cherry picked from commit 650b8ae62efaacc67ea63989372ddf73b36a7f03) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276215 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Robert Findley --- src/debugAdapter/goDebug.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts index a4a762894e..84e36d7eb7 100644 --- a/src/debugAdapter/goDebug.ts +++ b/src/debugAdapter/goDebug.ts @@ -586,6 +586,9 @@ export class Delve { } const currentGOWorkspace = getCurrentGoWorkspaceFromGOPATH(env['GOPATH'], dirname); + if (!launchArgs.packagePathToGoModPathMap) { + launchArgs.packagePathToGoModPathMap = {}; + } dlvArgs.push(mode || 'debug'); if (mode === 'exec' || (mode === 'debug' && !isProgramDirectory)) { dlvArgs.push(program); From 5f38caadb956b15dcdc9798205c1c983cef1cb9a Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 8 Dec 2020 17:57:10 -0500 Subject: [PATCH 026/189] [release] CHANGELOG: v0.19.1 change Also update version number in package.json Change-Id: I3c0f22ab5b05834f8cb8fc684654df458506bb63 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276392 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Polina Sokolova --- CHANGELOG.md | 22 +++++++++++++++++++++- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 542227c4be..c29a0bdb47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,24 @@ -## v0.19.0 - 25 Nov, 2020 +## v0.19.1 - 9th Dec, 2020 + +A list of all issues and changes can be found in the [v0.19.1 milestone](https://github.com/golang/vscode-go/milestone/17?closed=1). + +### Fixes + +- Fixed `Run without Debugging` for Windows. This was a regression found in v0.19.0 ([Issue 918](https://github.com/golang/vscode-go/issues/918)). +- Fixed snippets that used the reserved keyword ('var') as variable names ([Issue 969](https://github.com/golang/vscode-go/issues/969)). +- Fixed a file path expansion bug in subtest failure messages ([Issue 956](https://github.com/golang/vscode-go/issues/956)). +- Fixed unhandled promise rejection error in debug adapter ([Issue 982](https://github.com/golang/vscode-go/issues/982)). + +### Enhancements + +- Disabled the experimental `godlvdap` debug configuration from the stable version. It is still available in [Go Nightly](https://marketplace.visualstudio.com/items?itemName=golang.go-nightly) ([Issue 960](https://github.com/golang/vscode-go/issues/960)). +- Enabled user survey ([Issue 910](https://github.com/golang/vscode-go/issues/910)). + +### Thanks + +Thank you for your contribution, @suzmue, @RomanKornev, @hyangah! + +## v0.19.0 - 25th Nov, 2020 A list of all issues and changes can be found in the [v0.19.0 milestone](https://github.com/golang/vscode-go/milestone/14). diff --git a/package-lock.json b/package-lock.json index 217b24b5fc..1a238ffa41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.19.0", + "version": "0.19.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6130f36afb..22cce849e6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.19.0", + "version": "0.19.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From dfc4e720596987766ae023f26c59ac9092e1c0dd Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 17 Dec 2020 18:49:15 -0500 Subject: [PATCH 027/189] [release] LICENSE: update LICENSE ran tools/license.sh Change-Id: Icf9e1ab3281088061c5053c81d6cf891a46c81e1 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279093 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- LICENSE | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index cb8385be7d..f535c3ecb6 100644 --- a/LICENSE +++ b/LICENSE @@ -363,6 +363,32 @@ SOFTWARE. ----- +The following software may be included in this product: call-bind, get-intrinsic. A copy of the source code may be downloaded from git+https://github.com/ljharb/call-bind.git (call-bind), git+https://github.com/ljharb/get-intrinsic.git (get-intrinsic). This software contains the following license and notice below: + +MIT License + +Copyright (c) 2020 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + The following software may be included in this product: caseless. A copy of the source code may be downloaded from https://github.com/mikeal/caseless. This software contains the following license and notice below: Apache License @@ -632,7 +658,7 @@ SOFTWARE. ----- -The following software may be included in this product: es-get-iterator, side-channel, which-boxed-primitive. A copy of the source code may be downloaded from git+https://github.com/ljharb/es-get-iterator.git (es-get-iterator), git+https://github.com/ljharb/side-channel.git (side-channel), git+https://github.com/ljharb/which-boxed-primitive.git (which-boxed-primitive). This software contains the following license and notice below: +The following software may be included in this product: es-get-iterator, side-channel, which-boxed-primitive. A copy of the source code may be downloaded from git+https://github.com/ljharb/es-get-iterator.git (es-get-iterator), git+https://github.com/ljharb/side-channel.git (side-channel), git+https://github.com/inspect-js/which-boxed-primitive.git (which-boxed-primitive). This software contains the following license and notice below: MIT License @@ -658,7 +684,7 @@ SOFTWARE. ----- -The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, is-typed-array, which-typed-array. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/ljharb/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/ljharb/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/ljharb/is-typed-array.git (is-typed-array), git://github.com/inspect-js/which-typed-array.git (which-typed-array). This software contains the following license and notice below: +The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, is-typed-array, which-typed-array. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/ljharb/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/ljharb/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/inspect-js/is-typed-array.git (is-typed-array), git://github.com/inspect-js/which-typed-array.git (which-typed-array). This software contains the following license and notice below: The MIT License (MIT) @@ -1217,7 +1243,7 @@ PERFORMANCE OF THIS SOFTWARE. ----- -The following software may be included in this product: is-arguments, is-negative-zero, is-regex, object-is. A copy of the source code may be downloaded from git://github.com/ljharb/is-arguments.git (is-arguments), git://github.com/ljharb/is-negative-zero.git (is-negative-zero), git://github.com/ljharb/is-regex.git (is-regex), git://github.com/es-shims/object-is.git (object-is). This software contains the following license and notice below: +The following software may be included in this product: is-arguments, is-negative-zero, is-regex, object-is. A copy of the source code may be downloaded from git://github.com/inspect-js/is-arguments.git (is-arguments), git://github.com/inspect-js/is-negative-zero.git (is-negative-zero), git://github.com/ljharb/is-regex.git (is-regex), git://github.com/es-shims/object-is.git (object-is). This software contains the following license and notice below: The MIT License (MIT) @@ -1382,7 +1408,7 @@ SOFTWARE. ----- -The following software may be included in this product: json-stringify-safe, minimatch, once, semver, wrappy. A copy of the source code may be downloaded from git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver (semver), https://github.com/npm/wrappy (wrappy). This software contains the following license and notice below: +The following software may be included in this product: json-stringify-safe, lru-cache, minimatch, once, semver, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver (semver), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below: The ISC License From be919de7b79da33e53ff43732500d7185b15aa8f Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 21 Dec 2020 12:35:53 -0500 Subject: [PATCH 028/189] [release] CHANGELOG.md: Change logs for v0.20.0 Change-Id: Ibe8bb31805c2d7441f3ea3365bf189e1cc794d4a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279418 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Trust: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- CHANGELOG.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c29a0bdb47..d8a986da09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,46 @@ +## v0.20.0 - 22nd Dec, 2020 + +A list of all issues and changes can be found in the [v0.20.0 milestone](https://github.com/golang/vscode-go/milestone/18?closed=1). + +> 📣   Announcement: We plan to enable the language server, `gopls`, by default early next year. ([Issue 1037](https://github.com/golang/vscode-go/issues/1037)) +> +> Please test and provide us your feedback on the `#vscode-dev` [Gophers Slack](https://gophers.slack.com/) channel. + +### Enhancements +- Debugging + - The new `substitutePath` config property allows users to translate their symlinked directories to the actual paths, and + the local paths to the remote paths. See [Launch Configurations](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#launch-configurations) + and [Remote Debugging](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#remote-debugging) for details. + - Quick pick menu for creating `launch.json` was added. ([Issue 131](https://github.com/golang/vscode-go/issues/131)) + - Report that `next` is automatically cancelled by delve if interrupted, for example, because breakpoint is set. See [Issue 787](https://github.com/golang/vscode-go/issues/787) for details. ([CL 261078](https://go-review.googlesource.com/c/vscode-go/+/261078)) +- The new `tyf` snippet for `type name func()` was added. ([Issue 1002](https://github.com/golang/vscode-go/issues/1002)) +- Include the `gopls` settings section definition based on `gopls` v0.6.0. ([Issue 197](https://github.com/golang/vscode-go/issues/197), [CL 278355](https://go-review.googlesource.com/c/vscode-go/+/278355)) +- `go.buildFlags` and `go.buildTags` are propagated to `gopls` unless `"gopls": {"buildFlags": ..}` is set. ([Issue 155](https://github.com/golang/vscode-go/issues/155)) +- The new `go.toolsManagement.checkForUpdates` setting allows users to completely disable version checks. +This deprecates `go.useGoProxyToCheckForToolUpdates`. ([Issue 963](https://github.com/golang/vscode-go/issues/963)) + +### Fixes +- Added a workaround for [the VSCode `PATH` setup issue](https://github.com/microsoft/vscode/issues/108003). When `go` isn't +found from `PATH`, the extension will check `/usr/local/bin` too ([Issue 971](https://github.com/golang/vscode-go/issues/971)). +- Fixed language client crashes or duplicate language features on the guest side of a VS Live Share session. +The initial fix added in v0.19.0 for VS Live Share wasn't sufficient. (Issue [605](https://github.com/golang/vscode-go/issues/605), [1024](https://github.com/golang/vscode-go/issues/1024)) +- Stop requiring to install legacy tools when the language server is used. ([Issue 51](https://github.com/golang/vscode-go/issues/51)) +- Update `gopls` if the existing version in the system is older than the minimum required version when the extension enables `gopls` automatically. ([Issue 938](https://github.com/golang/vscode-go/issues/938)) +- Show language server start progress and allow only one outstanding language server restart request. ([Issue 1011](https://github.com/golang/vscode-go/issues/1011)) +- Fixed a gocode-gomod installation bug that caused to ignore `GOBIN` setting. ([CL 275877](https://go-review.googlesource.com/c/vscode-go/+/275877)) +- Marked settings that are not applicable when using the language server. ([Issue 155](https://github.com/golang/vscode-go/issues/155)) + +### Code Health +- Deprecated unused settings such as `go.overwriteGoplsMiddleware` and marked deprecated settings. +- Improved stability of debug functionality tests on windows. +- Improve the automated gopls issue template message. It includes the extension name and version. +- Prompt users to file an issue for feedback when they choose to opt out of gopls. +- CI test workflow now runs `vsce package` to detect packaging errors early. + +### Thanks +Thank you for your contribution, @hyangah, @suzmue, and @programmer04! + + ## v0.19.1 - 9th Dec, 2020 A list of all issues and changes can be found in the [v0.19.1 milestone](https://github.com/golang/vscode-go/milestone/17?closed=1). From 4ddeb55a0c761778add4b0f568ad6681aa214530 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 22 Dec 2020 13:48:43 -0500 Subject: [PATCH 029/189] [release] README.md: place gopls by default announcement And stop recommending GOPATH manipulation. Change-Id: Ic4d31c0e637ff79aa4d985cdbb37e76b1af5e85e Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279713 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler TryBot-Result: kokoro (cherry picked from commit 5eae646114db63ff33b8e53fd7999866f7854a94) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279714 Reviewed-by: Suzy Mueller Trust: Suzy Mueller --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 22dbea02f0..e54f47eed0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,10 @@ This extension provides rich language support for the [Go programming language]( Take a look at the [Changelog](CHANGELOG.md) to learn about new features. -> This is the **new** home for the VS Code Go extension. We just migrated from [Microsoft/vscode-go](https://github.com/Microsoft/vscode-go). Learn more about our move on the [Go blog](https://blog.golang.org/vscode-go). +> 📣 We plan to enable the language server ([`gopls`](docs/gopls.md)) by default in early 2021. The language server +> provides language features like intellisense, formatting, refactoring, analysis and many more. +> We recommend switching to the language server now (`"go.useLanguageServer": true`) to confirm it works well for you. +> Please [file a new issue](https://github.com/golang/vscode-go/issues/new/choose) if you notice bugs or missing features. ## Overview @@ -37,7 +40,8 @@ If you are unsure whether you have installed Go, open the Command Palette in VS ### Set up your environment -Read about [Go code organization](https://golang.org/doc/code.html) to learn how to configure your environment. This extension works in both [GOPATH](docs/gopath.md) and [module](docs/modules.md) modes. We suggest using modules, as they are quickly becoming the new standard in the Go community. +Read about [Go code organization](https://golang.org/doc/code.html) to learn how to configure your environment. This extension works in both [GOPATH](docs/gopath.md) and [module](docs/modules.md) modes. +We suggest using modules, as they are the new standard and become default from go 1.16 (to be released in early 2021). Here are some additional resources for learning about how to set up your Go project: @@ -47,7 +51,6 @@ Here are some additional resources for learning about how to set up your Go proj **NOTE: If you are using modules, we recommend using the Go [language server](#language-server), which is explained below.** -More advanced users may be interested in using different `GOPATH`s or Go versions per-project. You can learn about the different `GOPATH` manipulation options in the [`GOPATH` documentation](docs/gopath.md). Take a look at the other [customization](#customization) options as well. ### Install the extension From 4763006020bd9ce541c2427cf23a525d197cac9c Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 25 Dec 2020 20:02:19 -0500 Subject: [PATCH 030/189] [release] src/utils/pathUtils: return the default go path only if exists https://go-review.googlesource.com/c/vscode-go/+/276493 meant to add /usr/local/bin/go to the default path to search, but introduced a bug - we shouldn't return the path if the go binary doesn't exist. TODO: This function got complicated over time and deserves proper testing. For golang/vscode-go#971 Fixes golang/vscode-go#1065 Change-Id: I3ddf90983a1f66d6d76a3f9a50eb528a93904f3c Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279727 Trust: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler (cherry picked from commit dd9c54fa42eeeed478a112d5c26ac4bdaf4d7501) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/280592 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller TryBot-Result: kokoro --- src/utils/pathUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/pathUtils.ts b/src/utils/pathUtils.ts index 235ca8b698..0f693cb804 100644 --- a/src/utils/pathUtils.ts +++ b/src/utils/pathUtils.ts @@ -104,8 +104,8 @@ export function getBinPathWithPreferredGopathGorootWithExplanation( for (const p of defaultPathsForGo) { if (executableFileExists(p)) { binPathCache[toolName] = p; + return {binPath: p, why: 'default'}; } - return {binPath: p, why: 'default'}; } return {binPath: ''}; } From d9eab141b3fdf5868ff9d1fa4d97d63c8605dee0 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 28 Dec 2020 11:25:47 -0500 Subject: [PATCH 031/189] [release] CHANGELOG.md: describe v0.20.1 change Change-Id: If201de51ff76c5edf7796edc1fbdfecd6958528f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/280594 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler TryBot-Result: kokoro --- CHANGELOG.md | 5 +++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8a986da09..f6cdd2e95e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v0.20.1 - 29th Dec, 2020 + +### Fixes +- Fixed a bug that caused incorrect fallback to a common `go` installation path when `go` couldn't be found from the regular PATH ([Issue 1065](https://github.com/golang/vscode-go/issues/1065)) + ## v0.20.0 - 22nd Dec, 2020 A list of all issues and changes can be found in the [v0.20.0 milestone](https://github.com/golang/vscode-go/milestone/18?closed=1). diff --git a/package-lock.json b/package-lock.json index eee8d10b49..60cc3d834a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.20.0", + "version": "0.20.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c311d06bb5..6597929723 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.20.0", + "version": "0.20.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From bd63db50030fa4b328ddc4fe9b76911c3ed478e8 Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Sun, 27 Dec 2020 02:18:02 -0500 Subject: [PATCH 032/189] [release] tools/goplssetting: handle changes in gopls setting structure This CL handles the various changes in my current stack of gopls CLs and it shouldn't be merged until CL 280355 is merged. It handles the new gopls settings hierarchies, maps keyed by enums, and changes to default values. I was struggling to work with the method writing out the lines directly, so I switched to a JSON struct. This works fine in most cases, except when writing out the default values. I think gopls should probably produce interface{} for default values, but that will need to be dealt with later. For now, I added a relatively basic work-around. Change-Id: Ie4b69074f1bf02023fa39488ebc1c5c9660a03fc Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/279728 Run-TryBot: Rebecca Stambler TryBot-Result: kokoro Trust: Rebecca Stambler Trust: Hyang-Ah Hana Kim Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit de64eaa241f501fbf3c8561bd1380a1349f3105e) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/282372 Run-TryBot: Hyang-Ah Hana Kim --- docs/settings.md | 204 +++++++------ package.json | 496 +++++++++++++++++++++++-------- src/goLanguageServer.ts | 26 +- test/gopls/configuration.test.ts | 25 +- tools/generate.go | 5 +- tools/goplssetting/main.go | 279 ++++++++++++----- tools/goplssetting/main_test.go | 17 +- 7 files changed, 718 insertions(+), 334 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 5d6b5773a9..15c2ccf360 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -79,7 +79,7 @@ Default: `false` ### `go.buildFlags` -Flags to `go build`/`go test` used during build-on-save or running tests. (e.g. ["-ldflags='-s'"]) This is propagated to the language server if `gopls.buildFlags` is not specified. +Flags to `go build`/`go test` used during build-on-save or running tests. (e.g. ["-ldflags='-s'"]) This is propagated to the language server if `gopls.build.buildFlags` is not specified. ### `go.buildOnSave` @@ -91,7 +91,7 @@ Default: `package` ### `go.buildTags` -The Go build tags to use for all commands, that support a `-tags '...'` argument. When running tests, go.testTags will be used instead if it was set. This is propagated to the language server if `gopls.buildFlags` is not specified. +The Go build tags to use for all commands, that support a `-tags '...'` argument. When running tests, go.testTags will be used instead if it was set. This is propagated to the language server if `gopls.build.buildFlags` is not specified. Default: `` @@ -576,43 +576,18 @@ Default: `package` Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings. -#### `allowImplicitNetworkAccess` +#### `build.allowImplicitNetworkAccess` (Experimental) allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module downloads rather than requiring user action. This option will eventually be removed. -#### `allowModfileModifications` +#### `build.allowModfileModifications` (Experimental) allowModfileModifications disables -mod=readonly, allowing imports from out-of-scope modules. This option will eventually be removed. -#### `analyses` -analyses specify analyses that the user would like to enable or disable. -A map of the names of analysis passes that should be enabled/disabled. -A full list of analyzers that gopls uses can be found [here](analyzers.md) - -Example Usage: -```json5 -... -"analyses": { - "unreachable": false, // Disable the unreachable analyzer. - "unusedparams": true // Enable the unusedparams analyzer. -} -... -``` - - -#### `annotations` -(Experimental) annotations suppress various kinds of optimization diagnostics -that would be reported by the gc_details command. - * noNilcheck suppresses display of nilchecks. - * noEscape suppresses escape choices. - * noInline suppresses inlining choices. - * noBounds suppresses bounds checking diagnostics. - - -#### `buildFlags` +#### `build.buildFlags` buildFlags is the set of flags passed on to the build system when invoked. It is applied to queries like `go list`, which is used when discovering files. The most common use is to set `-tags`. @@ -620,32 +595,7 @@ The most common use is to set `-tags`. If unspecified, values of `go.buildFlags, go.buildTags` will be propagated. -#### `codelenses` -codelenses overrides the enabled/disabled state of code lenses. See the "Code Lenses" -section of settings.md for the list of supported lenses. - -Example Usage: -```json5 -"gopls": { -... - "codelens": { - "generate": false, // Don't show the `go generate` lens. - "gc_details": true // Show a code lens toggling the display of gc's choices. - } -... -} -``` - - -#### `completionBudget` -(For Debugging) completionBudget is the soft latency goal for completion requests. Most -requests finish in a couple milliseconds, but in some cases deep -completions can take much longer. As we use up our budget we -dynamically reduce the search scope to ensure we return timely -results. Zero means unlimited. - - -#### `directoryFilters` +#### `build.directoryFilters` directoryFilters can be used to exclude unwanted directories from the workspace. By default, all directories are included. Filters are an operator, `+` to include and `-` to exclude, followed by a path prefix @@ -659,11 +609,11 @@ Include only project_a: `-` (exclude everything), `+project_a` Include only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules` -#### `env` +#### `build.env` env adds environment variables to external commands run by `gopls`, most notably `go list`. -#### `expandWorkspaceToModule` +#### `build.expandWorkspaceToModule` (Experimental) expandWorkspaceToModule instructs `gopls` to adjust the scope of the workspace to find the best available module root. `gopls` first looks for a go.mod file in any parent directory of the workspace folder, expanding @@ -672,16 +622,7 @@ found, gopls will check if there is exactly one child directory containing a go.mod file, narrowing the scope to that directory if it exists. -#### `experimentalDiagnosticsDelay` -(Experimental) experimentalDiagnosticsDelay controls the amount of time that gopls waits -after the most recent file modification before computing deep diagnostics. -Simple diagnostics (parsing and type-checking) are always run immediately -on recently modified packages. - -This option must be set to a valid duration string, for example `"250ms"`. - - -#### `experimentalPackageCacheKey` +#### `build.experimentalPackageCacheKey` (Experimental) experimentalPackageCacheKey controls whether to use a coarser cache key for package type information to increase cache hits. This setting removes the user's environment, build flags, and working directory from the cache @@ -691,65 +632,129 @@ by an experiment because caching behavior is subtle and difficult to comprehensively test. -#### `experimentalWorkspaceModule` +#### `build.experimentalWorkspaceModule` (Experimental) experimentalWorkspaceModule opts a user into the experimental support for multi-module workspaces. -#### `gofumpt` +#### `formatting.gofumpt` gofumpt indicates if we should run gofumpt formatting. -#### `hoverKind` -hoverKind controls the information that appears in the hover text. -SingleLine and Structured are intended for use only by authors of editor plugins. +#### `formatting.local` +local is the equivalent of the `goimports -local` flag, which puts +imports beginning with this string after third-party packages. It should +be the prefix of the import path whose imports should be grouped +separately. -#### `importShortcut` -importShortcut specifies whether import statements should link to -documentation or go to definitions. +#### `ui.codelenses` +codelenses overrides the enabled/disabled state of code lenses. See the +"Code Lenses" section of the +[Settings page](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) +for the list of supported lenses. +Example Usage: -#### `linkTarget` -linkTarget controls where documentation links go. -It might be one of: +```json5 +"gopls": { +... + "codelens": { + "generate": false, // Don't show the `go generate` lens. + "gc_details": true // Show a code lens toggling the display of gc's choices. + } +... +} +``` -* `"godoc.org"` -* `"pkg.go.dev"` -If company chooses to use its own `godoc.org`, its address can be used as well. +#### `ui.completion.completionBudget` +(For Debugging) completionBudget is the soft latency goal for completion requests. Most +requests finish in a couple milliseconds, but in some cases deep +completions can take much longer. As we use up our budget we +dynamically reduce the search scope to ensure we return timely +results. Zero means unlimited. -#### `linksInHover` -linksInHover toggles the presence of links to documentation in hover. +#### `ui.completion.matcher` +(Advanced) matcher sets the algorithm that is used when calculating completion +candidates. -#### `local` -local is the equivalent of the `goimports -local` flag, which puts imports beginning with this string after 3rd-party packages. -It should be the prefix of the import path whose imports should be grouped separately. +#### `ui.completion.usePlaceholders` +placeholders enables placeholders for function parameters or struct +fields in completion responses. -#### `matcher` -matcher sets the algorithm that is used when calculating completion candidates. +#### `ui.diagnostic.analyses` +analyses specify analyses that the user would like to enable or disable. +A map of the names of analysis passes that should be enabled/disabled. +A full list of analyzers that gopls uses can be found +[here](https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md). +Example Usage: -#### `semanticTokens` -(Experimental) semanticTokens controls whether the LSP server will send -semantic tokens to the client. +```json5 +... +"analyses": { + "unreachable": false, // Disable the unreachable analyzer. + "unusedparams": true // Enable the unusedparams analyzer. +} +... +``` + + +#### `ui.diagnostic.annotations` +(Experimental) annotations specifies the various kinds of optimization diagnostics +that should be reported by the gc_details command. + + +#### `ui.diagnostic.experimentalDiagnosticsDelay` +(Experimental) experimentalDiagnosticsDelay controls the amount of time that gopls waits +after the most recent file modification before computing deep diagnostics. +Simple diagnostics (parsing and type-checking) are always run immediately +on recently modified packages. + +This option must be set to a valid duration string, for example `"250ms"`. -#### `staticcheck` +#### `ui.diagnostic.staticcheck` (Experimental) staticcheck enables additional analyses from staticcheck.io. -#### `symbolMatcher` -symbolMatcher sets the algorithm that is used when finding workspace symbols. +#### `ui.documentation.hoverKind` +hoverKind controls the information that appears in the hover text. +SingleLine and Structured are intended for use only by authors of editor plugins. -#### `symbolStyle` -symbolStyle controls how symbols are qualified in symbol responses. +#### `ui.documentation.linkTarget` +linkTarget controls where documentation links go. +It might be one of: + +* `"godoc.org"` +* `"pkg.go.dev"` + +If company chooses to use its own `godoc.org`, its address can be used as well. + + +#### `ui.documentation.linksInHover` +linksInHover toggles the presence of links to documentation in hover. + + +#### `ui.navigation.importShortcut` +importShortcut specifies whether import statements should link to +documentation or go to definitions. + + +#### `ui.navigation.symbolMatcher` +(Advanced) symbolMatcher sets the algorithm that is used when finding workspace symbols. + + +#### `ui.navigation.symbolStyle` +(Advanced) symbolStyle controls how symbols are qualified in symbol responses. Example Usage: + ```json5 "gopls": { ... @@ -759,8 +764,9 @@ Example Usage: ``` -#### `usePlaceholders` -placeholders enables placeholders for function parameters or struct fields in completion responses. +#### `ui.semanticTokens` +(Experimental) semanticTokens controls whether the LSP server will send +semantic tokens to the client. #### `verboseOutput` diff --git a/package.json b/package.json index 6597929723..0a68a9acf7 100644 --- a/package.json +++ b/package.json @@ -847,13 +847,13 @@ "type": "string" }, "default": [], - "description": "Flags to `go build`/`go test` used during build-on-save or running tests. (e.g. [\"-ldflags='-s'\"]) This is propagated to the language server if `gopls.buildFlags` is not specified.", + "description": "Flags to `go build`/`go test` used during build-on-save or running tests. (e.g. [\"-ldflags='-s'\"]) This is propagated to the language server if `gopls.build.buildFlags` is not specified.", "scope": "resource" }, "go.buildTags": { "type": "string", "default": "", - "description": "The Go build tags to use for all commands, that support a `-tags '...'` argument. When running tests, go.testTags will be used instead if it was set. This is propagated to the language server if `gopls.buildFlags` is not specified.", + "description": "The Go build tags to use for all commands, that support a `-tags '...'` argument. When running tests, go.testTags will be used instead if it was set. This is propagated to the language server if `gopls.build.buildFlags` is not specified.", "scope": "resource" }, "go.testTags": { @@ -1689,90 +1689,408 @@ "type": "object", "markdownDescription": "Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings.", "scope": "resource", - "additionalProperties": false, "properties": { - "buildFlags": { + "build.allowImplicitNetworkAccess": { + "type": "boolean", + "markdownDescription": "(Experimental) allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module\ndownloads rather than requiring user action. This option will eventually\nbe removed.\n", + "default": false, + "scope": "resource" + }, + "build.allowModfileModifications": { + "type": "boolean", + "markdownDescription": "(Experimental) allowModfileModifications disables -mod=readonly, allowing imports from\nout-of-scope modules. This option will eventually be removed.\n", + "default": false, + "scope": "resource" + }, + "build.buildFlags": { "type": "array", "markdownDescription": "buildFlags is the set of flags passed on to the build system when invoked.\nIt is applied to queries like `go list`, which is used when discovering files.\nThe most common use is to set `-tags`.\n\nIf unspecified, values of `go.buildFlags, go.buildTags` will be propagated.\n", - "default": [], "scope": "resource" }, - "env": { + "build.directoryFilters": { + "type": "array", + "markdownDescription": "directoryFilters can be used to exclude unwanted directories from the\nworkspace. By default, all directories are included. Filters are an\noperator, `+` to include and `-` to exclude, followed by a path prefix\nrelative to the workspace folder. They are evaluated in order, and\nthe last filter that applies to a path controls whether it is included.\nThe path prefix can be empty, so an initial `-` excludes everything.\n\nExamples:\nExclude node_modules: `-node_modules`\nInclude only project_a: `-` (exclude everything), `+project_a`\nInclude only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`\n", + "scope": "resource" + }, + "build.env": { "type": "object", "markdownDescription": "env adds environment variables to external commands run by `gopls`, most notably `go list`.\n", - "default": {}, "scope": "resource" }, - "hoverKind": { + "build.expandWorkspaceToModule": { + "type": "boolean", + "markdownDescription": "(Experimental) expandWorkspaceToModule instructs `gopls` to adjust the scope of the\nworkspace to find the best available module root. `gopls` first looks for\na go.mod file in any parent directory of the workspace folder, expanding\nthe scope to that directory if it exists. If no viable parent directory is\nfound, gopls will check if there is exactly one child directory containing\na go.mod file, narrowing the scope to that directory if it exists.\n", + "default": true, + "scope": "resource" + }, + "build.experimentalPackageCacheKey": { + "type": "boolean", + "markdownDescription": "(Experimental) experimentalPackageCacheKey controls whether to use a coarser cache key\nfor package type information to increase cache hits. This setting removes\nthe user's environment, build flags, and working directory from the cache\nkey, which should be a safe change as all relevant inputs into the type\nchecking pass are already hashed into the key. This is temporarily guarded\nby an experiment because caching behavior is subtle and difficult to\ncomprehensively test.\n", + "default": true, + "scope": "resource" + }, + "build.experimentalWorkspaceModule": { + "type": "boolean", + "markdownDescription": "(Experimental) experimentalWorkspaceModule opts a user into the experimental support\nfor multi-module workspaces.\n", + "default": false, + "scope": "resource" + }, + "formatting.gofumpt": { + "type": "boolean", + "markdownDescription": "gofumpt indicates if we should run gofumpt formatting.\n", + "default": false, + "scope": "resource" + }, + "formatting.local": { "type": "string", - "markdownDescription": "hoverKind controls the information that appears in the hover text.\nSingleLine and Structured are intended for use only by authors of editor plugins.\n", + "markdownDescription": "local is the equivalent of the `goimports -local` flag, which puts\nimports beginning with this string after third-party packages. It should\nbe the prefix of the import path whose imports should be grouped\nseparately.\n", + "default": "", + "scope": "resource" + }, + "ui.codelenses": { + "type": "object", + "markdownDescription": "codelenses overrides the enabled/disabled state of code lenses. See the\n\"Code Lenses\" section of the\n[Settings page](https://github.com/golang/tools/blob/master/gopls/doc/settings.md)\nfor the list of supported lenses.\n\nExample Usage:\n\n```json5\n\"gopls\": {\n...\n \"codelens\": {\n \"generate\": false, // Don't show the `go generate` lens.\n \"gc_details\": true // Show a code lens toggling the display of gc's choices.\n }\n...\n}\n```\n", + "scope": "resource", + "properties": { + "gc_details": { + "type": "boolean", + "markdownDescription": "gc_details controls calculation of gc annotations.\n", + "default": false + }, + "generate": { + "type": "boolean", + "markdownDescription": "generate runs `go generate` for a given directory.\n", + "default": true + }, + "regenerate_cgo": { + "type": "boolean", + "markdownDescription": "regenerate_cgo regenerates cgo definitions.\n", + "default": true + }, + "test": { + "type": "boolean", + "markdownDescription": "test runs `go test` for a specific test function.\n", + "default": false + }, + "tidy": { + "type": "boolean", + "markdownDescription": "tidy runs `go mod tidy` for a module.\n", + "default": true + }, + "upgrade_dependency": { + "type": "boolean", + "markdownDescription": "upgrade_dependency upgrades a dependency.\n", + "default": true + }, + "vendor": { + "type": "boolean", + "markdownDescription": "vendor runs `go mod vendor` for a module.\n", + "default": true + } + } + }, + "ui.completion.completionBudget": { + "type": "string", + "markdownDescription": "(For Debugging) completionBudget is the soft latency goal for completion requests. Most\nrequests finish in a couple milliseconds, but in some cases deep\ncompletions can take much longer. As we use up our budget we\ndynamically reduce the search scope to ensure we return timely\nresults. Zero means unlimited.\n", + "default": "100ms", + "scope": "resource" + }, + "ui.completion.matcher": { + "type": "string", + "markdownDescription": "(Advanced) matcher sets the algorithm that is used when calculating completion\ncandidates.\n", "enum": [ - "FullDocumentation", - "NoDocumentation", - "SingleLine", - "Structured", - "SynopsisDocumentation" + "CaseInsensitive", + "CaseSensitive", + "Fuzzy" ], "markdownEnumDescriptions": [ "", "", - "", - "`\"Structured\"` is an experimental setting that returns a structured hover format.\nThis format separates the signature from the documentation, so that the client\ncan do more manipulation of these fields.\n\nThis should only be used by clients that support this behavior.\n", "" ], - "default": "FullDocumentation", + "default": "Fuzzy", "scope": "resource" }, - "usePlaceholders": { + "ui.completion.usePlaceholders": { "type": "boolean", - "markdownDescription": "placeholders enables placeholders for function parameters or struct fields in completion responses.\n", + "markdownDescription": "placeholders enables placeholders for function parameters or struct\nfields in completion responses.\n", "default": false, "scope": "resource" }, - "linkTarget": { - "type": "string", - "markdownDescription": "linkTarget controls where documentation links go.\nIt might be one of:\n\n* `\"godoc.org\"`\n* `\"pkg.go.dev\"`\n\nIf company chooses to use its own `godoc.org`, its address can be used as well.\n", - "default": "pkg.go.dev", - "scope": "resource" + "ui.diagnostic.analyses": { + "type": "object", + "markdownDescription": "analyses specify analyses that the user would like to enable or disable.\nA map of the names of analysis passes that should be enabled/disabled.\nA full list of analyzers that gopls uses can be found\n[here](https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md).\n\nExample Usage:\n\n```json5\n...\n\"analyses\": {\n \"unreachable\": false, // Disable the unreachable analyzer.\n \"unusedparams\": true // Enable the unusedparams analyzer.\n}\n...\n```\n", + "scope": "resource", + "properties": { + "asmdecl": { + "type": "boolean", + "markdownDescription": "report mismatches between assembly files and Go declarations", + "default": true + }, + "assign": { + "type": "boolean", + "markdownDescription": "check for useless assignments\n\nThis checker reports assignments of the form x = x or a[i] = a[i].\nThese are almost always useless, and even when they aren't they are\nusually a mistake.", + "default": true + }, + "atomic": { + "type": "boolean", + "markdownDescription": "check for common mistakes using the sync/atomic package\n\nThe atomic checker looks for assignment statements of the form:\n\n\tx = atomic.AddUint64(&x, 1)\n\nwhich are not atomic.", + "default": true + }, + "atomicalign": { + "type": "boolean", + "markdownDescription": "check for non-64-bits-aligned arguments to sync/atomic functions", + "default": true + }, + "bools": { + "type": "boolean", + "markdownDescription": "check for common mistakes involving boolean operators", + "default": true + }, + "buildtag": { + "type": "boolean", + "markdownDescription": "check that +build tags are well-formed and correctly located", + "default": true + }, + "cgocall": { + "type": "boolean", + "markdownDescription": "detect some violations of the cgo pointer passing rules\n\nCheck for invalid cgo pointer passing.\nThis looks for code that uses cgo to call C code passing values\nwhose types are almost always invalid according to the cgo pointer\nsharing rules.\nSpecifically, it warns about attempts to pass a Go chan, map, func,\nor slice to C, either directly, or via a pointer, array, or struct.", + "default": true + }, + "composites": { + "type": "boolean", + "markdownDescription": "check for unkeyed composite literals\n\nThis analyzer reports a diagnostic for composite literals of struct\ntypes imported from another package that do not use the field-keyed\nsyntax. Such literals are fragile because the addition of a new field\n(even if unexported) to the struct will cause compilation to fail.\n\nAs an example,\n\n\terr = &net.DNSConfigError{err}\n\nshould be replaced by:\n\n\terr = &net.DNSConfigError{Err: err}\n", + "default": true + }, + "copylocks": { + "type": "boolean", + "markdownDescription": "check for locks erroneously passed by value\n\nInadvertently copying a value containing a lock, such as sync.Mutex or\nsync.WaitGroup, may cause both copies to malfunction. Generally such\nvalues should be referred to through a pointer.", + "default": true + }, + "deepequalerrors": { + "type": "boolean", + "markdownDescription": "check for calls of reflect.DeepEqual on error values\n\nThe deepequalerrors checker looks for calls of the form:\n\n reflect.DeepEqual(err1, err2)\n\nwhere err1 and err2 are errors. Using reflect.DeepEqual to compare\nerrors is discouraged.", + "default": true + }, + "errorsas": { + "type": "boolean", + "markdownDescription": "report passing non-pointer or non-error values to errors.As\n\nThe errorsas analysis reports calls to errors.As where the type\nof the second argument is not a pointer to a type implementing error.", + "default": true + }, + "fieldalignment": { + "type": "boolean", + "markdownDescription": "find structs that would take less memory if their fields were sorted\n\nThis analyzer find structs that can be rearranged to take less memory, and provides\na suggested edit with the optimal order.\n", + "default": false + }, + "fillreturns": { + "type": "boolean", + "markdownDescription": "suggested fixes for \"wrong number of return values (want %d, got %d)\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"wrong number of return values (want %d, got %d)\". For example:\n\tfunc m() (int, string, *bool, error) {\n\t\treturn\n\t}\nwill turn into\n\tfunc m() (int, string, *bool, error) {\n\t\treturn 0, \"\", nil, nil\n\t}\n\nThis functionality is similar to https://github.com/sqs/goreturns.\n", + "default": true + }, + "fillstruct": { + "type": "boolean", + "markdownDescription": "note incomplete struct initializations\n\nThis analyzer provides diagnostics for any struct literals that do not have\nany fields initialized. Because the suggested fix for this analysis is\nexpensive to compute, callers should compute it separately, using the\nSuggestedFix function below.\n", + "default": true + }, + "httpresponse": { + "type": "boolean", + "markdownDescription": "check for mistakes using HTTP responses\n\nA common mistake when using the net/http package is to defer a function\ncall to close the http.Response Body before checking the error that\ndetermines whether the response is valid:\n\n\tresp, err := http.Head(url)\n\tdefer resp.Body.Close()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\t// (defer statement belongs here)\n\nThis checker helps uncover latent nil dereference bugs by reporting a\ndiagnostic for such mistakes.", + "default": true + }, + "ifaceassert": { + "type": "boolean", + "markdownDescription": "detect impossible interface-to-interface type assertions\n\nThis checker flags type assertions v.(T) and corresponding type-switch cases\nin which the static type V of v is an interface that cannot possibly implement\nthe target interface T. This occurs when V and T contain methods with the same\nname but different signatures. Example:\n\n\tvar v interface {\n\t\tRead()\n\t}\n\t_ = v.(io.Reader)\n\nThe Read method in v has a different signature than the Read method in\nio.Reader, so this assertion cannot succeed.\n", + "default": true + }, + "loopclosure": { + "type": "boolean", + "markdownDescription": "check references to loop variables from within nested functions\n\nThis analyzer checks for references to loop variables from within a\nfunction literal inside the loop body. It checks only instances where\nthe function literal is called in a defer or go statement that is the\nlast statement in the loop body, as otherwise we would need whole\nprogram analysis.\n\nFor example:\n\n\tfor i, v := range s {\n\t\tgo func() {\n\t\t\tprintln(i, v) // not what you might expect\n\t\t}()\n\t}\n\nSee: https://golang.org/doc/go_faq.html#closures_and_goroutines", + "default": true + }, + "lostcancel": { + "type": "boolean", + "markdownDescription": "check cancel func returned by context.WithCancel is called\n\nThe cancellation function returned by context.WithCancel, WithTimeout,\nand WithDeadline must be called or the new context will remain live\nuntil its parent context is cancelled.\n(The background context is never cancelled.)", + "default": true + }, + "nilfunc": { + "type": "boolean", + "markdownDescription": "check for useless comparisons between functions and nil\n\nA useless comparison is one like f == nil as opposed to f() == nil.", + "default": true + }, + "nonewvars": { + "type": "boolean", + "markdownDescription": "suggested fixes for \"no new vars on left side of :=\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"no new vars on left side of :=\". For example:\n\tz := 1\n\tz := 2\nwill turn into\n\tz := 1\n\tz = 2\n", + "default": true + }, + "noresultvalues": { + "type": "boolean", + "markdownDescription": "suggested fixes for \"no result values expected\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"no result values expected\". For example:\n\tfunc z() { return nil }\nwill turn into\n\tfunc z() { return }\n", + "default": true + }, + "printf": { + "type": "boolean", + "markdownDescription": "check consistency of Printf format strings and arguments\n\nThe check applies to known functions (for example, those in package fmt)\nas well as any detected wrappers of known functions.\n\nA function that wants to avail itself of printf checking but is not\nfound by this analyzer's heuristics (for example, due to use of\ndynamic calls) can insert a bogus call:\n\n\tif false {\n\t\t_ = fmt.Sprintf(format, args...) // enable printf checking\n\t}\n\nThe -funcs flag specifies a comma-separated list of names of additional\nknown formatting functions or methods. If the name contains a period,\nit must denote a specific function using one of the following forms:\n\n\tdir/pkg.Function\n\tdir/pkg.Type.Method\n\t(*dir/pkg.Type).Method\n\nOtherwise the name is interpreted as a case-insensitive unqualified\nidentifier such as \"errorf\". Either way, if a listed name ends in f, the\nfunction is assumed to be Printf-like, taking a format string before the\nargument list. Otherwise it is assumed to be Print-like, taking a list\nof arguments with no format string.\n", + "default": true + }, + "shadow": { + "type": "boolean", + "markdownDescription": "check for possible unintended shadowing of variables\n\nThis analyzer check for shadowed variables.\nA shadowed variable is a variable declared in an inner scope\nwith the same name and type as a variable in an outer scope,\nand where the outer variable is mentioned after the inner one\nis declared.\n\n(This definition can be refined; the module generates too many\nfalse positives and is not yet enabled by default.)\n\nFor example:\n\n\tfunc BadRead(f *os.File, buf []byte) error {\n\t\tvar err error\n\t\tfor {\n\t\t\tn, err := f.Read(buf) // shadows the function variable 'err'\n\t\t\tif err != nil {\n\t\t\t\tbreak // causes return of wrong value\n\t\t\t}\n\t\t\tfoo(buf)\n\t\t}\n\t\treturn err\n\t}\n", + "default": false + }, + "shift": { + "type": "boolean", + "markdownDescription": "check for shifts that equal or exceed the width of the integer", + "default": true + }, + "simplifycompositelit": { + "type": "boolean", + "markdownDescription": "check for composite literal simplifications\n\nAn array, slice, or map composite literal of the form:\n\t[]T{T{}, T{}}\nwill be simplified to:\n\t[]T{{}, {}}\n\nThis is one of the simplifications that \"gofmt -s\" applies.", + "default": true + }, + "simplifyrange": { + "type": "boolean", + "markdownDescription": "check for range statement simplifications\n\nA range of the form:\n\tfor x, _ = range v {...}\nwill be simplified to:\n\tfor x = range v {...}\n\nA range of the form:\n\tfor _ = range v {...}\nwill be simplified to:\n\tfor range v {...}\n\nThis is one of the simplifications that \"gofmt -s\" applies.", + "default": true + }, + "simplifyslice": { + "type": "boolean", + "markdownDescription": "check for slice simplifications\n\nA slice expression of the form:\n\ts[a:len(s)]\nwill be simplified to:\n\ts[a:]\n\nThis is one of the simplifications that \"gofmt -s\" applies.", + "default": true + }, + "sortslice": { + "type": "boolean", + "markdownDescription": "check the argument type of sort.Slice\n\nsort.Slice requires an argument of a slice type. Check that\nthe interface{} value passed to sort.Slice is actually a slice.", + "default": true + }, + "stdmethods": { + "type": "boolean", + "markdownDescription": "check signature of methods of well-known interfaces\n\nSometimes a type may be intended to satisfy an interface but may fail to\ndo so because of a mistake in its method signature.\nFor example, the result of this WriteTo method should be (int64, error),\nnot error, to satisfy io.WriterTo:\n\n\ttype myWriterTo struct{...}\n func (myWriterTo) WriteTo(w io.Writer) error { ... }\n\nThis check ensures that each method whose name matches one of several\nwell-known interface methods from the standard library has the correct\nsignature for that interface.\n\nChecked method names include:\n\tFormat GobEncode GobDecode MarshalJSON MarshalXML\n\tPeek ReadByte ReadFrom ReadRune Scan Seek\n\tUnmarshalJSON UnreadByte UnreadRune WriteByte\n\tWriteTo\n", + "default": true + }, + "stringintconv": { + "type": "boolean", + "markdownDescription": "check for string(int) conversions\n\nThis checker flags conversions of the form string(x) where x is an integer\n(but not byte or rune) type. Such conversions are discouraged because they\nreturn the UTF-8 representation of the Unicode code point x, and not a decimal\nstring representation of x as one might expect. Furthermore, if x denotes an\ninvalid code point, the conversion cannot be statically rejected.\n\nFor conversions that intend on using the code point, consider replacing them\nwith string(rune(x)). Otherwise, strconv.Itoa and its equivalents return the\nstring representation of the value in the desired base.\n", + "default": true + }, + "structtag": { + "type": "boolean", + "markdownDescription": "check that struct field tags conform to reflect.StructTag.Get\n\nAlso report certain struct tags (json, xml) used with unexported fields.", + "default": true + }, + "testinggoroutine": { + "type": "boolean", + "markdownDescription": "report calls to (*testing.T).Fatal from goroutines started by a test.\n\nFunctions that abruptly terminate a test, such as the Fatal, Fatalf, FailNow, and\nSkip{,f,Now} methods of *testing.T, must be called from the test goroutine itself.\nThis checker detects calls to these functions that occur within a goroutine\nstarted by the test. For example:\n\nfunc TestFoo(t *testing.T) {\n go func() {\n t.Fatal(\"oops\") // error: (*T).Fatal called from non-test goroutine\n }()\n}\n", + "default": true + }, + "tests": { + "type": "boolean", + "markdownDescription": "check for common mistaken usages of tests and examples\n\nThe tests checker walks Test, Benchmark and Example functions checking\nmalformed names, wrong signatures and examples documenting non-existent\nidentifiers.\n\nPlease see the documentation for package testing in golang.org/pkg/testing\nfor the conventions that are enforced for Tests, Benchmarks, and Examples.", + "default": true + }, + "undeclaredname": { + "type": "boolean", + "markdownDescription": "suggested fixes for \"undeclared name: <>\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"undeclared name: <>\". It will insert a new statement:\n\"<> := \".", + "default": true + }, + "unmarshal": { + "type": "boolean", + "markdownDescription": "report passing non-pointer or non-interface values to unmarshal\n\nThe unmarshal analysis reports calls to functions such as json.Unmarshal\nin which the argument type is not a pointer or an interface.", + "default": true + }, + "unreachable": { + "type": "boolean", + "markdownDescription": "check for unreachable code\n\nThe unreachable analyzer finds statements that execution can never reach\nbecause they are preceded by an return statement, a call to panic, an\ninfinite loop, or similar constructs.", + "default": true + }, + "unsafeptr": { + "type": "boolean", + "markdownDescription": "check for invalid conversions of uintptr to unsafe.Pointer\n\nThe unsafeptr analyzer reports likely incorrect uses of unsafe.Pointer\nto convert integers to pointers. A conversion from uintptr to\nunsafe.Pointer is invalid if it implies that there is a uintptr-typed\nword in memory that holds a pointer value, because that word will be\ninvisible to stack copying and to the garbage collector.", + "default": true + }, + "unusedparams": { + "type": "boolean", + "markdownDescription": "check for unused parameters of functions\n\nThe unusedparams analyzer checks functions to see if there are\nany parameters that are not being used.\n\nTo reduce false positives it ignores:\n- methods\n- parameters that do not have a name or are underscored\n- functions in test files\n- functions with empty bodies or those with just a return stmt", + "default": false + }, + "unusedresult": { + "type": "boolean", + "markdownDescription": "check for unused results of calls to some functions\n\nSome functions like fmt.Errorf return a result and have no side effects,\nso it is always a mistake to discard the result. This analyzer reports\ncalls to certain functions in which the result of the call is ignored.\n\nThe set of functions may be controlled using flags.", + "default": true + } + } + }, + "ui.diagnostic.annotations": { + "type": "object", + "markdownDescription": "(Experimental) annotations specifies the various kinds of optimization diagnostics\nthat should be reported by the gc_details command.\n", + "scope": "resource", + "properties": { + "bounds": { + "type": "boolean", + "markdownDescription": "`\"bounds\"` controls bounds checking diagnostics.\n", + "default": true + }, + "escape": { + "type": "boolean", + "markdownDescription": "`\"escape\"` controls diagnostics about escape choices.\n", + "default": true + }, + "inline": { + "type": "boolean", + "markdownDescription": "`\"inline\"` controls diagnostics about inlining choices.\n", + "default": true + }, + "nil": { + "type": "boolean", + "markdownDescription": "`\"nil\"` controls nil checks.\n", + "default": true + } + } }, - "local": { + "ui.diagnostic.experimentalDiagnosticsDelay": { "type": "string", - "markdownDescription": "local is the equivalent of the `goimports -local` flag, which puts imports beginning with this string after 3rd-party packages.\nIt should be the prefix of the import path whose imports should be grouped separately.\n", - "default": "", + "markdownDescription": "(Experimental) experimentalDiagnosticsDelay controls the amount of time that gopls waits\nafter the most recent file modification before computing deep diagnostics.\nSimple diagnostics (parsing and type-checking) are always run immediately\non recently modified packages.\n\nThis option must be set to a valid duration string, for example `\"250ms\"`.\n", + "default": "250ms", "scope": "resource" }, - "gofumpt": { + "ui.diagnostic.staticcheck": { "type": "boolean", - "markdownDescription": "gofumpt indicates if we should run gofumpt formatting.\n", + "markdownDescription": "(Experimental) staticcheck enables additional analyses from staticcheck.io.\n", "default": false, "scope": "resource" }, - "analyses": { - "type": "object", - "markdownDescription": "analyses specify analyses that the user would like to enable or disable.\nA map of the names of analysis passes that should be enabled/disabled.\nA full list of analyzers that gopls uses can be found [here](analyzers.md)\n\nExample Usage:\n```json5\n...\n\"analyses\": {\n \"unreachable\": false, // Disable the unreachable analyzer.\n \"unusedparams\": true // Enable the unusedparams analyzer.\n}\n...\n```\n", - "default": {}, + "ui.documentation.hoverKind": { + "type": "string", + "markdownDescription": "hoverKind controls the information that appears in the hover text.\nSingleLine and Structured are intended for use only by authors of editor plugins.\n", + "enum": [ + "FullDocumentation", + "NoDocumentation", + "SingleLine", + "Structured", + "SynopsisDocumentation" + ], + "markdownEnumDescriptions": [ + "", + "", + "", + "`\"Structured\"` is an experimental setting that returns a structured hover format.\nThis format separates the signature from the documentation, so that the client\ncan do more manipulation of these fields.\n\nThis should only be used by clients that support this behavior.\n", + "" + ], + "default": "FullDocumentation", "scope": "resource" }, - "codelenses": { - "type": "object", - "markdownDescription": "codelenses overrides the enabled/disabled state of code lenses. See the \"Code Lenses\"\nsection of settings.md for the list of supported lenses.\n\nExample Usage:\n```json5\n\"gopls\": {\n...\n \"codelens\": {\n \"generate\": false, // Don't show the `go generate` lens.\n \"gc_details\": true // Show a code lens toggling the display of gc's choices.\n }\n...\n}\n```\n", - "default": { - "gc_details": false, - "generate": true, - "regenerate_cgo": true, - "tidy": true, - "upgrade_dependency": true, - "vendor": true - }, + "ui.documentation.linkTarget": { + "type": "string", + "markdownDescription": "linkTarget controls where documentation links go.\nIt might be one of:\n\n* `\"godoc.org\"`\n* `\"pkg.go.dev\"`\n\nIf company chooses to use its own `godoc.org`, its address can be used as well.\n", + "default": "pkg.go.dev", "scope": "resource" }, - "linksInHover": { + "ui.documentation.linksInHover": { "type": "boolean", "markdownDescription": "linksInHover toggles the presence of links to documentation in hover.\n", "default": true, "scope": "resource" }, - "importShortcut": { + "ui.navigation.importShortcut": { "type": "string", "markdownDescription": "importShortcut specifies whether import statements should link to\ndocumentation or go to definitions.\n", "enum": [ @@ -1788,9 +2106,9 @@ "default": "Both", "scope": "resource" }, - "matcher": { + "ui.navigation.symbolMatcher": { "type": "string", - "markdownDescription": "matcher sets the algorithm that is used when calculating completion candidates.\n", + "markdownDescription": "(Advanced) symbolMatcher sets the algorithm that is used when finding workspace symbols.\n", "enum": [ "CaseInsensitive", "CaseSensitive", @@ -1804,25 +2122,9 @@ "default": "Fuzzy", "scope": "resource" }, - "symbolMatcher": { + "ui.navigation.symbolStyle": { "type": "string", - "markdownDescription": "symbolMatcher sets the algorithm that is used when finding workspace symbols.\n", - "enum": [ - "CaseInsensitive", - "CaseSensitive", - "Fuzzy" - ], - "markdownEnumDescriptions": [ - "", - "", - "" - ], - "default": "Fuzzy", - "scope": "resource" - }, - "symbolStyle": { - "type": "string", - "markdownDescription": "symbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n```json5\n\"gopls\": {\n...\n \"symbolStyle\": \"dynamic\",\n...\n}\n```\n", + "markdownDescription": "(Advanced) symbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n\n```json5\n\"gopls\": {\n...\n \"symbolStyle\": \"dynamic\",\n...\n}\n```\n", "enum": [ "Dynamic", "Full", @@ -1836,77 +2138,17 @@ "default": "Dynamic", "scope": "resource" }, - "directoryFilters": { - "type": "array", - "markdownDescription": "directoryFilters can be used to exclude unwanted directories from the\nworkspace. By default, all directories are included. Filters are an\noperator, `+` to include and `-` to exclude, followed by a path prefix\nrelative to the workspace folder. They are evaluated in order, and\nthe last filter that applies to a path controls whether it is included.\nThe path prefix can be empty, so an initial `-` excludes everything.\n\nExamples:\nExclude node_modules: `-node_modules`\nInclude only project_a: `-` (exclude everything), `+project_a`\nInclude only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`\n", - "default": [], - "scope": "resource" - }, - "annotations": { - "type": "object", - "markdownDescription": "(Experimental) annotations suppress various kinds of optimization diagnostics\nthat would be reported by the gc_details command.\n * noNilcheck suppresses display of nilchecks.\n * noEscape suppresses escape choices.\n * noInline suppresses inlining choices.\n * noBounds suppresses bounds checking diagnostics.\n", - "default": {}, - "scope": "resource" - }, - "staticcheck": { - "type": "boolean", - "markdownDescription": "(Experimental) staticcheck enables additional analyses from staticcheck.io.\n", - "default": false, - "scope": "resource" - }, - "semanticTokens": { + "ui.semanticTokens": { "type": "boolean", "markdownDescription": "(Experimental) semanticTokens controls whether the LSP server will send\nsemantic tokens to the client.\n", "default": false, "scope": "resource" }, - "expandWorkspaceToModule": { - "type": "boolean", - "markdownDescription": "(Experimental) expandWorkspaceToModule instructs `gopls` to adjust the scope of the\nworkspace to find the best available module root. `gopls` first looks for\na go.mod file in any parent directory of the workspace folder, expanding\nthe scope to that directory if it exists. If no viable parent directory is\nfound, gopls will check if there is exactly one child directory containing\na go.mod file, narrowing the scope to that directory if it exists.\n", - "default": true, - "scope": "resource" - }, - "experimentalWorkspaceModule": { - "type": "boolean", - "markdownDescription": "(Experimental) experimentalWorkspaceModule opts a user into the experimental support\nfor multi-module workspaces.\n", - "default": false, - "scope": "resource" - }, - "experimentalDiagnosticsDelay": { - "type": "string", - "markdownDescription": "(Experimental) experimentalDiagnosticsDelay controls the amount of time that gopls waits\nafter the most recent file modification before computing deep diagnostics.\nSimple diagnostics (parsing and type-checking) are always run immediately\non recently modified packages.\n\nThis option must be set to a valid duration string, for example `\"250ms\"`.\n", - "default": "250ms", - "scope": "resource" - }, - "experimentalPackageCacheKey": { - "type": "boolean", - "markdownDescription": "(Experimental) experimentalPackageCacheKey controls whether to use a coarser cache key\nfor package type information to increase cache hits. This setting removes\nthe user's environment, build flags, and working directory from the cache\nkey, which should be a safe change as all relevant inputs into the type\nchecking pass are already hashed into the key. This is temporarily guarded\nby an experiment because caching behavior is subtle and difficult to\ncomprehensively test.\n", - "default": true, - "scope": "resource" - }, - "allowModfileModifications": { - "type": "boolean", - "markdownDescription": "(Experimental) allowModfileModifications disables -mod=readonly, allowing imports from\nout-of-scope modules. This option will eventually be removed.\n", - "default": false, - "scope": "resource" - }, - "allowImplicitNetworkAccess": { - "type": "boolean", - "markdownDescription": "(Experimental) allowImplicitNetworkAccess disables GOPROXY=off, allowing implicit module\ndownloads rather than requiring user action. This option will eventually\nbe removed.\n", - "default": false, - "scope": "resource" - }, "verboseOutput": { "type": "boolean", "markdownDescription": "(For Debugging) verboseOutput enables additional debug logging.\n", "default": false, "scope": "resource" - }, - "completionBudget": { - "type": "string", - "markdownDescription": "(For Debugging) completionBudget is the soft latency goal for completion requests. Most\nrequests finish in a couple milliseconds, but in some cases deep\ncompletions can take much longer. As we use up our budget we\ndynamically reduce the search scope to ensure we return timely\nresults. Zero means unlimited.\n", - "default": "100ms", - "scope": "resource" } } } diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 9d4db9d0b8..e34a462ffa 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -52,7 +52,7 @@ import { GoSignatureHelpProvider } from './goSignature'; import { outputChannel, updateLanguageServerIconGoStatusBar } from './goStatus'; import { GoCompletionItemProvider } from './goSuggest'; import { GoWorkspaceSymbolProvider } from './goSymbol'; -import { getTool, Tool, ToolAtVersion } from './goTools'; +import { getTool, Tool } from './goTools'; import { GoTypeDefinitionProvider } from './goTypeDefinition'; import { getFromGlobalState, updateGlobalState } from './stateUtils'; import { @@ -552,7 +552,7 @@ export function filterGoplsDefaultConfigValues(workspaceConfig: any, resource: v // passGoConfigToGoplsConfigValues passes some of the relevant 'go.' settings to gopls settings. // This assumes `goplsWorkspaceConfig` is an output of filterGoplsDefaultConfigValues, // so it is modifiable and doesn't contain properties that are not explicitly set. -// - go.buildTags and go.buildFlags are passed as gopls.buildFlags +// - go.buildTags and go.buildFlags are passed as gopls.build.buildFlags // if goplsWorkspaceConfig doesn't explicitly set it yet. // Exported for testing. export function passGoConfigToGoplsConfigValues(goplsWorkspaceConfig: any, goWorkspaceConfig: any): any { @@ -560,18 +560,16 @@ export function passGoConfigToGoplsConfigValues(goplsWorkspaceConfig: any, goWor goplsWorkspaceConfig = {}; } - // If gopls.buildFlags is set, don't touch it. - if (goplsWorkspaceConfig.buildFlags === undefined) { - const buildFlags = [] as string[]; - if (goWorkspaceConfig?.buildFlags) { - buildFlags.push(...goWorkspaceConfig?.buildFlags); - } - if (goWorkspaceConfig?.buildTags && buildFlags.indexOf('-tags') === -1) { - buildFlags.push('-tags', goWorkspaceConfig?.buildTags); - } - if (buildFlags.length > 0) { - goplsWorkspaceConfig.buildFlags = buildFlags; - } + const buildFlags = [] as string[]; + if (goWorkspaceConfig?.buildFlags) { + buildFlags.push(...goWorkspaceConfig?.buildFlags); + } + if (goWorkspaceConfig?.buildTags && buildFlags.indexOf('-tags') === -1) { + buildFlags.push('-tags', goWorkspaceConfig?.buildTags); + } + // If gopls.build.buildFlags is set, don't touch it. + if (buildFlags.length > 0 && goplsWorkspaceConfig['build.buildFlags'] === undefined) { + goplsWorkspaceConfig['build.buildFlags'] = buildFlags; } return goplsWorkspaceConfig; } diff --git a/test/gopls/configuration.test.ts b/test/gopls/configuration.test.ts index 5d68043b6e..daccdfb7d7 100644 --- a/test/gopls/configuration.test.ts +++ b/test/gopls/configuration.test.ts @@ -103,13 +103,13 @@ suite('gopls configuration tests', () => { name: 'pass go config buildFlags to gopls config', goplsConfig: {}, goConfig: { buildFlags: ['-modfile', 'gopls.mod', '-tags', 'tag1,tag2', '-modcacherw'] }, - want: { buildFlags: ['-modfile', 'gopls.mod', '-tags', 'tag1,tag2', '-modcacherw']} + want: { 'build.buildFlags': ['-modfile', 'gopls.mod', '-tags', 'tag1,tag2', '-modcacherw'] } }, { name: 'pass go config buildTags to gopls config', goplsConfig: {}, goConfig: { buildTags: 'tag1,tag2' }, - want: { buildFlags: ['-tags', 'tag1,tag2']} + want: { 'build.buildFlags': ['-tags', 'tag1,tag2'] } }, { name: 'do not pass go config buildTags if buildFlags already have tags', @@ -118,34 +118,35 @@ suite('gopls configuration tests', () => { buildFlags: ['-tags', 'tag0'], buildTags: 'tag1,tag2' }, - want: { buildFlags: ['-tags', 'tag0']} + want: { 'build.buildFlags': ['-tags', 'tag0'] } }, { name: 'do not mutate other gopls config but gopls.buildFlags', goplsConfig: { - env: {GOPROXY: 'direct'} + 'build.env': { GOPROXY: 'direct' } }, goConfig: { buildFlags: ['-modfile', 'gopls.mod', '-tags', 'tag1,tag2', '-modcacherw'] }, want: { - env: { GOPROXY : 'direct' }, - buildFlags: ['-modfile', 'gopls.mod', '-tags', 'tag1,tag2', '-modcacherw']} + 'build.env': { GOPROXY: 'direct' }, + 'build.buildFlags': ['-modfile', 'gopls.mod', '-tags', 'tag1,tag2', '-modcacherw'] + } }, { name: 'do not mutate misconfigured gopls.buildFlags', goplsConfig: { - buildFlags: '-modfile gopls.mod', // misconfiguration + 'build.buildFlags': '-modfile gopls.mod', // misconfiguration }, goConfig: { buildFlags: '-modfile go.mod -tags tag1 -modcacherw', }, - want: { buildFlags: '-modfile gopls.mod' } + want: { 'build.buildFlags': '-modfile gopls.mod' } }, { name: 'do not overwrite gopls config if it is explicitly set', goplsConfig: { - env: {GOPROXY: 'direct'}, - buildFlags: [], // empty + 'build.env': { GOPROXY: 'direct' }, + 'build.buildFlags': [], // empty }, goConfig: { // expect only non-conflicting flags (tags, modcacherw) passing. @@ -153,8 +154,8 @@ suite('gopls configuration tests', () => { buildTags: 'tag3', }, want: { - env: {GOPROXY: 'direct'}, - buildFlags: [], + 'build.env': { GOPROXY: 'direct' }, + 'build.buildFlags': [], } // gopls.buildFlags untouched. }, diff --git a/tools/generate.go b/tools/generate.go index 940d1ebaed..3352f7ce9c 100644 --- a/tools/generate.go +++ b/tools/generate.go @@ -3,6 +3,8 @@ // See LICENSE in the project root for license information. // Command generate is used to generate documentation from the package.json. +// To run: +// go run tools/generate.go -w package main import ( @@ -100,6 +102,7 @@ func main() { } else { base := filepath.Join("docs", filepath.Base(filename)) fmt.Printf(`%s have changed in the package.json, but documentation in %s was not updated. +To update the settings, run "go run tools/generate.go -w". `, strings.TrimSuffix(base, ".md"), base) os.Exit(1) // causes CI to break. } @@ -156,7 +159,7 @@ func main() { keys = append(keys, k) } sort.Strings(keys) - b.WriteString(fmt.Sprintf("\n\nDefault:{
\n")) + b.WriteString("\n\nDefault:{
\n") for _, k := range keys { v := x[k] output := fmt.Sprintf("%v", v) diff --git a/tools/goplssetting/main.go b/tools/goplssetting/main.go index e10955f133..fc465ba8b5 100644 --- a/tools/goplssetting/main.go +++ b/tools/goplssetting/main.go @@ -5,7 +5,7 @@ // This command updates the gopls.* configurations in vscode-go package.json. // // Usage: from the project root directory, -// $ go run tools/goplssetting -in ./package.json -out ./package.json +// $ go run tools/goplssetting/main.go -in ./package.json -out ./package.json package main import ( @@ -13,12 +13,12 @@ import ( "encoding/json" "flag" "fmt" - "io" "io/ioutil" "log" "os" "os/exec" "sort" + "strconv" "strings" ) @@ -68,19 +68,21 @@ func run(orgPkgJSON string) ([]byte, error) { if err != nil { return nil, err } - options, err := extractOptions(api) if err != nil { return nil, err } - + b, err := asVSCodeSettings(options) + if err != nil { + return nil, err + } f, err := ioutil.TempFile(workDir, "gopls.settings") if err != nil { return nil, err } - - writeAsVSCodeSettings(f, options) - + if _, err := f.Write(b); err != nil { + return nil, err + } if err := f.Close(); err != nil { return nil, err } @@ -122,12 +124,17 @@ func extractOptions(api *APIJSON) ([]*OptionJSON, error) { } } sort.SliceStable(options, func(i, j int) bool { - return priority(options[i].section) < priority(options[j].section) + pi := priority(options[i].OptionJSON) + pj := priority(options[j].OptionJSON) + if pi == pj { + return options[i].Name < options[j].Name + } + return pi < pj }) opts := []*OptionJSON{} for _, v := range options { - if name := sectionName(v.section); name != "" { + if name := statusName(v.OptionJSON); name != "" { v.OptionJSON.Doc = name + " " + v.OptionJSON.Doc } opts = append(opts, v.OptionJSON) @@ -135,28 +142,43 @@ func extractOptions(api *APIJSON) ([]*OptionJSON, error) { return opts, nil } -func priority(section string) int { - switch section { - case "User": - return 0 - case "Experimental": +func priority(opt *OptionJSON) int { + switch toStatus(opt.Status) { + case Experimental: return 10 - case "Debugging": + case Debug: return 100 } return 1000 } -func sectionName(section string) string { - switch section { - case "Experimental": +func statusName(opt *OptionJSON) string { + switch toStatus(opt.Status) { + case Experimental: return "(Experimental)" - case "Debugging": + case Advanced: + return "(Advanced)" + case Debug: return "(For Debugging)" } return "" } +func toStatus(s string) Status { + switch s { + case "experimental": + return Experimental + case "debug": + return Debug + case "advanced": + return Advanced + case "": + return None + default: + panic(fmt.Sprintf("unexpected status: %s", s)) + } +} + // rewritePackageJSON rewrites the input package.json by running `jq` // to update all existing gopls settings with the ones from the newSettings // file. @@ -173,65 +195,138 @@ func rewritePackageJSON(newSettings, inFile string) ([]byte, error) { return stdout.Bytes(), nil } -// convertToVSCodeSettings converts the options to the vscode setting format. -func writeAsVSCodeSettings(f io.Writer, options []*OptionJSON) { - line := func(format string, args ...interface{}) { - fmt.Fprintf(f, format, args...) - fmt.Fprintln(f) - } - - line(`{`) - line(`"gopls": {`) - line(` "type": "object",`) - line(` "markdownDescription": "Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings.",`) - line(` "scope": "resource",`) - line(` "additionalProperties": false,`) - line(` "properties": {`) - for i, o := range options { - line(` "%v" : {`, o.Name) - - typ := propertyType(o.Type) - line(` "type": %q,`, typ) - // TODO: consider 'additionalProperties' if gopls api-json outputs acceptable peoperties. - - doc := o.Doc - if mappedTo, ok := associatedToExtensionProperties[o.Name]; ok { - doc = fmt.Sprintf("%v\nIf unspecified, values of `%v` will be propagated.\n", doc, strings.Join(mappedTo, ", ")) - } - line(` "markdownDescription": %q,`, doc) +// asVSCodeSettings converts the given options to match the VS Code settings +// format. +func asVSCodeSettings(options []*OptionJSON) ([]byte, error) { + seen := map[string][]*OptionJSON{} + for _, opt := range options { + seen[opt.Hierarchy] = append(seen[opt.Hierarchy], opt) + } + for _, v := range seen { + sort.Slice(v, func(i, j int) bool { + return v[i].Name < v[j].Name + }) + } + properties, err := collectProperties(seen) + if err != nil { + return nil, err + } + return json.Marshal(map[string]*Object{ + "gopls": { + Type: "object", + MarkdownDescription: "Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings.", + Scope: "resource", + AdditionalProperties: false, + Properties: properties, + }, + }) +} - var enums, enumDocs []string - for _, v := range o.EnumValues { - enums = append(enums, v.Value) - enumDocs = append(enumDocs, fmt.Sprintf("%q", v.Doc)) +func collectProperties(m map[string][]*OptionJSON) (map[string]*Object, error) { + var sorted []string + var containsEmpty bool + for k := range m { + if k == "" { + containsEmpty = true + continue } - if len(enums) > 0 { - line(` "enum": [%v],`, strings.Join(enums, ",")) - line(` "markdownEnumDescriptions": [%v],`, strings.Join(enumDocs, ",")) + sorted = append(sorted, k) + } + sort.Strings(sorted) + if containsEmpty { + sorted = append(sorted, "") + } + properties := map[string]*Object{} + for _, hierarchy := range sorted { + for _, opt := range m[hierarchy] { + doc := opt.Doc + if mappedTo, ok := associatedToExtensionProperties[opt.Name]; ok { + doc = fmt.Sprintf("%v\nIf unspecified, values of `%v` will be propagated.\n", doc, strings.Join(mappedTo, ", ")) + } + obj := &Object{ + MarkdownDescription: doc, + // TODO: are all gopls settings in the resource scope? + Scope: "resource", + // TODO: consider 'additionalProperties' if gopls api-json + // outputs acceptable properties. + // TODO: deprecation attribute + } + // Handle any enum types. + if opt.Type == "enum" { + for _, v := range opt.EnumValues { + unquotedName, err := strconv.Unquote(v.Value) + if err != nil { + return nil, err + } + obj.Enum = append(obj.Enum, unquotedName) + obj.MarkdownEnumDescriptions = append(obj.MarkdownEnumDescriptions, v.Doc) + } + } + // Handle any objects whose keys are enums. + if len(opt.EnumKeys.Keys) > 0 { + if obj.Properties == nil { + obj.Properties = map[string]*Object{} + } + for _, k := range opt.EnumKeys.Keys { + unquotedName, err := strconv.Unquote(k.Name) + if err != nil { + return nil, err + } + obj.Properties[unquotedName] = &Object{ + Type: propertyType(opt.EnumKeys.ValueType), + MarkdownDescription: k.Doc, + Default: formatDefault(k.Default), + } + } + } + obj.Type = propertyType(opt.Type) + obj.Default = formatOptionDefault(opt) + + key := opt.Name + if hierarchy != "" { + key = hierarchy + "." + key + } + properties[key] = obj } + } + return properties, nil +} - if len(o.Default) > 0 { - line(` "default": %v,`, o.Default) +func formatOptionDefault(opt *OptionJSON) interface{} { + // Each key will have its own default value, instead of one large global + // one. (Alternatively, we can build the default from the keys.) + if len(opt.EnumKeys.Keys) > 0 { + return nil + } + def := opt.Default + switch opt.Type { + case "enum", "string", "time.Duration": + unquote, err := strconv.Unquote(def) + if err == nil { + def = unquote } + } + return formatDefault(def) +} - // TODO: are all gopls settings in the resource scope? - line(` "scope": "resource"`) - // TODO: deprecation attribute - - // "%v" : { - if i == len(options)-1 { - line(` }`) - } else { - line(` },`) - } +// formatDefault converts a string-based default value to an actual value that +// can be marshaled to JSON. Right now, gopls generates default values as +// strings, but perhaps that will change. +func formatDefault(def string) interface{} { + switch def { + case "{}", "[]": + return nil + case "true": + return true + case "false": + return false + default: + return def } - line(` }`) // "properties": { - line(` }`) // "gopls": { - line(`}`) // { } var associatedToExtensionProperties = map[string][]string{ - "buildFlags": []string{"go.buildFlags", "go.buildTags"}, + "buildFlags": {"go.buildFlags", "go.buildTags"}, } func propertyType(t string) string { @@ -262,20 +357,56 @@ func check(err error) { os.Exit(1) } +// Object represents a VS Code settings object. +type Object struct { + Type string `json:"type,omitempty"` + MarkdownDescription string `json:"markdownDescription,omitempty"` + AdditionalProperties bool `json:"additionalProperties,omitempty"` + Enum []string `json:"enum,omitempty"` + MarkdownEnumDescriptions []string `json:"markdownEnumDescriptions,omitempty"` + Default interface{} `json:"default,omitempty"` + Scope string `json:"scope,omitempty"` + Properties map[string]*Object `json:"properties,omitempty"` +} + +type Status int + +const ( + Experimental = Status(iota) + Debug + Advanced + None +) + // APIJSON is the output json type of `gopls api-json`. // Types copied from golang.org/x/tools/internal/lsp/source/options.go. type APIJSON struct { - Options map[string][]*OptionJSON - Commands []*CommandJSON - Lenses []*LensJSON + Options map[string][]*OptionJSON + Commands []*CommandJSON + Lenses []*LensJSON + Analyzers []*AnalyzerJSON } type OptionJSON struct { Name string Type string Doc string + EnumKeys EnumKeys EnumValues []EnumValue Default string + Status string + Hierarchy string +} + +type EnumKeys struct { + ValueType string + Keys []EnumKey +} + +type EnumKey struct { + Name string + Doc string + Default string } type EnumValue struct { @@ -294,3 +425,9 @@ type LensJSON struct { Title string Doc string } + +type AnalyzerJSON struct { + Name string + Doc string + Default bool +} diff --git a/tools/goplssetting/main_test.go b/tools/goplssetting/main_test.go index a135f2c090..7147347907 100644 --- a/tools/goplssetting/main_test.go +++ b/tools/goplssetting/main_test.go @@ -60,7 +60,6 @@ func TestWriteAsVSCodeSettings(t *testing.T) { }, out: `"completionBudget": { "type": "string", - "markdownDescription": "", "default": "100ms", "scope": "resource" }`, @@ -74,10 +73,8 @@ func TestWriteAsVSCodeSettings(t *testing.T) { }, out: `"analyses":{ "type": "object", - "markdownDescription": "", - "default": {}, "scope": "resource" - }`, + }`, }, { name: "enum", @@ -102,7 +99,6 @@ func TestWriteAsVSCodeSettings(t *testing.T) { }, out: `"matcher": { "type": "string", - "markdownDescription": "", "enum": [ "CaseInsensitive", "CaseSensitive", "Fuzzy" ], "markdownEnumDescriptions": [ "","","" ], "default": "Fuzzy", @@ -114,15 +110,16 @@ func TestWriteAsVSCodeSettings(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { options := []*OptionJSON{tc.in} - buf := &bytes.Buffer{} - writeAsVSCodeSettings(buf, options) - if got, want := normalize(t, buf.String()), normalize(t, ` - { + b, err := asVSCodeSettings(options) + if err != nil { + t.Fatal(err) + } + if got, want := normalize(t, string(b)), normalize(t, ` + { "gopls": { "type": "object", "markdownDescription": "Configure the default Go language server ('gopls'). In most cases, configuring this section is unnecessary. See [the documentation](https://github.com/golang/tools/blob/master/gopls/doc/settings.md) for all available settings.", "scope": "resource", - "additionalProperties": false, "properties": { `+tc.out+` } From 98d8a1a942d9b59454f39145e5e64e9155cf9618 Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 7 Jan 2021 22:19:03 -0500 Subject: [PATCH 033/189] [release] CHANGELOG.md: v0.20.2 This is a patch release to sync the gopls settings with the latest gopls release v0.6.2. Change-Id: Icc7c6d17b604ae15ad9e4185fdc4ce5d04145182 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/282536 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler TryBot-Result: kokoro --- CHANGELOG.md | 5 +++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6cdd2e95e..9086c6d4c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v0.20.2 - 8th Jan, 2021 + +### Enhancement +- Updated [`"gopls"` settings](https://github.com/golang/vscode-go/blob/705272cba4001b8caf71a1542f376daa2e0be089/docs/settings.md#gopls-1) to match gopls v0.6.2. ([CL 279728](https://go-review.googlesource.com/c/vscode-go/+/279728)) + ## v0.20.1 - 29th Dec, 2020 ### Fixes diff --git a/package-lock.json b/package-lock.json index 60cc3d834a..151a58518f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.20.1", + "version": "0.20.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0a68a9acf7..e622a26f1c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.20.1", + "version": "0.20.2", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 913cd43d507078a02304b98df1fa3c30a3ab3b07 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 15 Jan 2021 14:44:36 -0500 Subject: [PATCH 034/189] [release] package.json: remove 'preview' attribute Release branch should host the source for the stable version. This patch will remain only in release & latest branches. Change-Id: Ib4fa0ed46fbce2e55e8b1eb8266625bbc5723ff2 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/284094 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 6b3466e644..8076ae0d0d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "go", "displayName": "Go", "version": "0.21.0", - "preview": true, "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From ddb4e6f1ecae0bd34e689452c9ecdbac8f95688f Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 15 Jan 2021 15:35:54 -0500 Subject: [PATCH 035/189] [release] test/integration: increase installation test timeout We are observing occasional failures from test timeout Change-Id: Icb45338e60fb9a4b8da3d69c0cbd877d5fdb7e9b Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/284194 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- test/integration/install.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/install.test.ts b/test/integration/install.test.ts index 879aa19157..d2104e4e9c 100644 --- a/test/integration/install.test.ts +++ b/test/integration/install.test.ts @@ -22,7 +22,7 @@ import { correctBinname } from '../../src/utils/pathUtils'; suite('Installation Tests', function () { // Disable timeout when we are running slow tests. - let timeout = 10000; + let timeout = 60000; if (shouldRunSlowTests()) { timeout = 0; } From d0d360ab0101129195e5b1f374ce8becd3dd0bf9 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 15 Jan 2021 14:45:38 -0500 Subject: [PATCH 036/189] [release] package.json: do not claim .tmpl files in stable version https://go-review.googlesource.com/c/vscode-go/+/281392 is a prep work for template support. However, the handling is not available in gopls yet, and LSP registration is activated only in the preview mode (per https://go-review.googlesource.com/c/vscode-go/+/283639) This CL is the remaining task from cl/283639 to disable the experimental feature from the stable release. We will revert this change when gopls is ready to handle templates. Update golang/vscode-go#609 Change-Id: I72d04b11f14fde25b7ad64e6a9a82f7c20e32b4c Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/284095 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- package.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/package.json b/package.json index 8076ae0d0d..a6428c5708 100644 --- a/package.json +++ b/package.json @@ -131,15 +131,6 @@ "aliases": [ "Go Checksum File" ] - }, - { - "id": "tmpl", - "extensions": [ - ".tmpl" - ], - "aliases": [ - "Go Template File" - ] } ], "grammars": [ From e988b144709e93387507d432fa4c14436dfe0e27 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 19 Jan 2021 15:19:19 -0500 Subject: [PATCH 037/189] [release] src/config: fix initConfig and WrappedConfiguration workspaceIsTrusted is a function, not a variable. Make sure the properties to be overriden by WrappedConfiguration are what we want, by not copying them in the constructor. Change-Id: Ia88c31651005f0bb6c95e8316b955f4fcb63d8dc Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/284586 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller (cherry picked from commit a267ffff876d81fa1918e31d6aca7a79280022b5) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/284794 TryBot-Result: kokoro --- src/config.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/config.ts b/src/config.ts index 9203e7c35a..6e367b0b1f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -16,7 +16,7 @@ const SECURITY_SENSITIVE_CONFIG: string[] = [ // the user has to explicitly opt in to trust the workspace. export async function initConfig(ctx: vscode.ExtensionContext) { const isTrusted = getFromWorkspaceState(WORKSPACE_IS_TRUSTED_KEY, false); - if (isTrusted !== defaultConfig.workspaceIsTrusted) { + if (isTrusted !== defaultConfig.workspaceIsTrusted()) { defaultConfig.toggleWorkspaceIsTrusted(); } ctx.subscriptions.push( @@ -81,7 +81,6 @@ export class Configuration { if (section !== 'go' || this._workspaceIsTrusted) { return cfg; } - return new WrappedConfiguration(cfg); } @@ -103,7 +102,9 @@ class WrappedConfiguration implements vscode.WorkspaceConfiguration { // set getters for direct setting access (e.g. cfg.gopath), but don't overwrite _wrapped. const desc = Object.getOwnPropertyDescriptors(_wrapped); for (const prop in desc) { - if (typeof prop === 'string' && prop !== '_wrapped') { + // TODO(hyangah): find a better way to exclude WrappedConfiguration's members. + // These methods are defined by WrappedConfiguration. + if (typeof prop === 'string' && !['get', 'has', 'inspect', 'update', '_wrapped'].includes(prop)) { const d = desc[prop]; if (SECURITY_SENSITIVE_CONFIG.includes(prop)) { const inspect = this._wrapped.inspect(prop); From 560cd9e629524a8710a68d960e60847532770bf2 Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 20 Jan 2021 17:16:59 -0500 Subject: [PATCH 038/189] [release] src/util.ts: handle inactive languageClient goLanguageServer's languageClient can be a valid language client, but isn't started yet. So, check if the diagnostic info is available and if there is any diagnostic for the given file uri before trying to start deduping. This addresses the exception thrown when the extension tries to access the undefined diagnostics. Another issue is the buildLanguageClient currently creates a non-nill languageClient object even when the language client doesn't need to be enabled. But that change is too subtle to be included in a patch release, so we don't address here. Fixes golang/vscode-go#1104 Change-Id: Id923719462b68972a79e3f7c32f54edba7462e46 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285092 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit 7f568957363ec5c4c263b6575e132d99d728c720) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285255 --- src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index 04a7369961..c84cc1e0e4 100644 --- a/src/util.ts +++ b/src/util.ts @@ -904,7 +904,7 @@ export function handleDiagnosticErrors( } // If there are errors from the language client that are on the current file, ignore the warnings co-inciding // with them. - if (languageClient) { + if (languageClient && languageClient.diagnostics?.has(fileUri)) { newDiagnostics = deDupeDiagnostics(languageClient.diagnostics.get(fileUri).slice(), newDiagnostics); } diagnosticCollection.set(fileUri, newDiagnostics); From 5435f957186d5c76594658cdc9121d00df8eb6b2 Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 21 Jan 2021 16:07:35 -0500 Subject: [PATCH 039/189] [release] package.json: update version to v0.21.1 Change-Id: I86c061fc174f3e660b8b021afa423d369a193e1d Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285260 Trust: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 86e08ec381..3c4c072c48 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.21.0", + "version": "0.21.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a6428c5708..dd3ff045b5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.21.0", + "version": "0.21.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 392e7d77d2443db174182878b8c1600bd26cac14 Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 21 Jan 2021 14:28:46 -0500 Subject: [PATCH 040/189] [release] CHANGELOG.md: v0.21.1 changelog Change-Id: Ifd6a5200aff8bc15609924f8a35d5fe8c099c9fa Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285257 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit 0a4362f7ed996eb9aedab495accc8b176a3c9b42) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285259 --- CHANGELOG.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18cd0914d3..528f564bf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,18 @@ -## v0.21.0 - 20th Jan, 2021 - > 📣   Announcement: > > * The language server, `gopls`, will be enabled by default in the next release. ([Issue 1037](https://github.com/golang/vscode-go/issues/1037)). Please test and provide us your feedback on the `#vscode-dev` [Gophers Slack](https://gophers.slack.com/) channel. > > * Some workspace or folder-level settings that affect tools location will not be used by default until users explicitly opt in by running `Go: Toggle Workspace Trust Flag`. See [Issue 1094](https://github.com/golang/vscode-go/issues/1094) for more information. +## v0.21.1 - 21st Jan, 2021 +A list of all issues and changes can be found in the [v0.21.1 milestone](https://github.com/golang/vscode-go/milestone/22?closed=1). + +### Fixes +- Fixed the `Cannot get property 'get' of undefined` error. ([Issue 1104](https://github.com/golang/vscode-go/issues/1104)) +- Restored the `"go.languageServerExperimentalFeatures"` setting for users who depend on this to run custom vet analyzers. ([Issue 1110](https://github.com/golang/vscode-go/issues/1110)) + +## v0.21.0 - 20th Jan, 2021 + A list of all issues and changes can be found in the [v0.21.0 milestone](https://github.com/golang/vscode-go/milestone/16?closed=1). ### Enhancements - The new `dlvFlags` debug attribute is available for conveniently supply extra flags to `dlv`. ([Issue 978](https://github.com/golang/vscode-go/issues/978)) From ea221fb13dab732a41e21c9310360848cab0c878 Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 21 Jan 2021 09:41:15 -0500 Subject: [PATCH 041/189] [release] src/goLanguageServer: partial revert of cl/280601 This partially reverts commit 4c91c3874bccaf659af616627ba1deefc3a35667. In https://go-review.googlesource.com/c/vscode-go/+/280601, we tried to remove the languageServerExperimentalFeatures setting because gopls's diagnostics feature is no longer in its experimental state and that was the only flag left in this setting. However, we learned some users depend on this flag because the extension turns off buildOnSave and vetOnSave features when gopls's diagnostics is used and they need to run custom vet analyzers. This is not ideal and the extension shouldn't prevent users from running their custom analyzers. That needs more investigation and experiment. For now, we rollback the change, but place the deprecation notice. Update golang/vscode-go#50 Fixes golang/vscode-go#1110 Change-Id: I376692b152d3011aaa8da7a1b5121ba33e2188b6 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285253 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit fbd2fc4f132461fc4ed62e0fe6e48a0b68f55a56) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285256 --- docs/settings.md | 19 +++++++++++++++++-- package.json | 19 +++++++++++++++++-- src/goCheck.ts | 2 +- src/goLanguageServer.ts | 14 ++++++++++++++ src/goMain.ts | 22 +++++++++++++++------- test/gopls/update.test.ts | 3 +++ 6 files changed, 67 insertions(+), 12 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 6d34ef7779..d99bc74ab5 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -76,7 +76,7 @@ Flags to `go build`/`go test` used during build-on-save or running tests. (e.g. ### `go.buildOnSave` -Compiles code on file save using 'go build -i' or 'go test -c -i'. Options are 'workspace', 'package', or 'off'. +Compiles code on file save using 'go build' or 'go test -c'. Options are 'workspace', 'package', or 'off'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting. Allowed Values:`[package workspace off]` @@ -324,6 +324,21 @@ If true, then `-i` flag will be passed to `go build` everytime the code is compi Default: `false` +### `go.languageServerExperimentalFeatures` + +Temporary flag to enable/disable diagnostics from the language server. This setting will be deprecated soon. Please see and response to [Issue 50](https://github.com/golang/vscode-go/issues/50). + +| Properties | Description | +| --- | --- | +| `diagnostics` | If true, the language server will provide build, vet errors and the extension will ignore the `buildOnSave`, `vetOnSave` settings. | +| | | + + +Default:{
+  `"diagnostics": true`,
+ } + + ### `go.languageServerFlags` Flags like -rpc.trace and -logfile to be used while running the language server. @@ -515,7 +530,7 @@ Flags to pass to `go tool vet` (e.g. ["-all", "-shadow"]) ### `go.vetOnSave` -Vets code on file save using 'go tool vet'. Not applicable when using the language server. +Vets code on file save using 'go tool vet'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting. Allowed Values:`[package workspace off]` diff --git a/package.json b/package.json index dd3ff045b5..2328d7991e 100644 --- a/package.json +++ b/package.json @@ -865,7 +865,7 @@ "off" ], "default": "package", - "description": "Compiles code on file save using 'go build -i' or 'go test -c -i'. Options are 'workspace', 'package', or 'off'.", + "description": "Compiles code on file save using 'go build' or 'go test -c'. Options are 'workspace', 'package', or 'off'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.", "scope": "resource" }, "go.buildFlags": { @@ -939,7 +939,7 @@ "off" ], "default": "package", - "description": "Vets code on file save using 'go tool vet'. Not applicable when using the language server.", + "description": "Vets code on file save using 'go tool vet'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.", "scope": "resource" }, "go.vetFlags": { @@ -1253,6 +1253,21 @@ "default": [], "description": "Flags like -rpc.trace and -logfile to be used while running the language server." }, + "go.languageServerExperimentalFeatures": { + "type": "object", + "properties": { + "diagnostics": { + "type": "boolean", + "default": true, + "description": "If true, the language server will provide build, vet errors and the extension will ignore the `buildOnSave`, `vetOnSave` settings." + } + }, + "additionalProperties": false, + "default": { + "diagnostics": true + }, + "markdownDescription": "Temporary flag to enable/disable diagnostics from the language server. This setting will be deprecated soon. Please see and response to [Issue 50](https://github.com/golang/vscode-go/issues/50)." + }, "go.trace.server": { "type": "string", "enum": [ diff --git a/src/goCheck.ts b/src/goCheck.ts index 3ac85576ea..327a5f8be1 100644 --- a/src/goCheck.ts +++ b/src/goCheck.ts @@ -60,7 +60,7 @@ export function check(fileUri: vscode.Uri, goConfig: vscode.WorkspaceConfigurati // If a user has enabled diagnostics via a language server, // then we disable running build or vet to avoid duplicate errors and warnings. const lspConfig = buildLanguageServerConfig(goConfig); - const disableBuildAndVet = lspConfig.enabled; + const disableBuildAndVet = lspConfig.enabled && lspConfig.features.diagnostics; let testPromise: Thenable; const testConfig: TestConfig = { diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 1282f2042f..2351925f5a 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -27,6 +27,7 @@ import { Message, ProvideCodeLensesSignature, ProvideCompletionItemsSignature, + ProvideDocumentLinksSignature, ResponseError, RevealOutputChannelOn } from 'vscode-languageclient'; @@ -74,6 +75,9 @@ export interface LanguageServerConfig { enabled: boolean; flags: string[]; env: any; + features: { + diagnostics: boolean; + }; checkForUpdates: string; } @@ -105,6 +109,7 @@ let lastUserAction: Date = new Date(); // startLanguageServerWithFallback starts the language server, if enabled, // or falls back to the default language providers. export async function startLanguageServerWithFallback(ctx: vscode.ExtensionContext, activation: boolean) { + for (const folder of vscode.workspace.workspaceFolders || []) { if (folder.uri.scheme === 'vsls') { outputChannel.appendLine(`Language service on the guest side is disabled. ` + @@ -400,10 +405,14 @@ export async function buildLanguageClient(cfg: BuildLanguageClientOption): Promi diagnostics: vscode.Diagnostic[], next: HandleDiagnosticsSignature ) => { + if (!cfg.features.diagnostics) { + return null; + } // Deduplicate diagnostics with those found by the other tools. removeDuplicateDiagnostics(vetDiagnosticCollection, uri, diagnostics); removeDuplicateDiagnostics(buildDiagnosticCollection, uri, diagnostics); removeDuplicateDiagnostics(lintDiagnosticCollection, uri, diagnostics); + return next(uri, diagnostics); }, provideCompletionItem: async ( @@ -716,6 +725,11 @@ export function buildLanguageServerConfig(goConfig: vscode.WorkspaceConfiguratio modtime: null, enabled: goConfig['useLanguageServer'] === true, flags: goConfig['languageServerFlags'] || [], + features: { + // TODO: We should have configs that match these names. + // Ultimately, we should have a centralized language server config rather than separate fields. + diagnostics: goConfig['languageServerExperimentalFeatures']['diagnostics'], + }, env: toolExecutionEnvironment(), checkForUpdates: getCheckForToolsUpdatesConfig(goConfig), }; diff --git a/src/goMain.ts b/src/goMain.ts index 4c0d474560..940d2d151d 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -126,19 +126,27 @@ export async function activate(ctx: vscode.ExtensionContext) { // Present a warning about the deprecation of the go.documentLink setting. const experimentalFeatures = getGoConfig()['languageServerExperimentalFeatures']; if (experimentalFeatures) { - // TODO(rstambler): Eventually notify about deprecation of all of the settings. + // TODO(golang/vscode-go#50): Eventually notify about deprecation of + // all of the settings. See golang/vscode-go#1109 too. + // The `diagnostics` setting is still used as a workaround for running custom vet. if (experimentalFeatures['documentLink'] === false) { vscode.window.showErrorMessage(`The 'go.languageServerExperimentalFeature.documentLink' setting is now deprecated. - Please use 'gopls.importShortcut' instead. - See https://github.com/golang/tools/blob/master/gopls/doc/settings.md#importshortcut-enum for more details.`); +Please use 'gopls.importShortcut' instead. +See https://github.com/golang/tools/blob/master/gopls/doc/settings.md#importshortcut-enum for more details.`); } - if (experimentalFeatures['diagnostics'] === false) { - vscode.window.showErrorMessage(`The 'go.languageServerExperimentalFeature.diagnostics' setting is now deprecated. + const promptKey = 'promptedLanguageServerExperimentalFeatureDeprecation'; + const prompted = getFromGlobalState(promptKey, false); + if (!prompted && experimentalFeatures['diagnostics'] === false) { + const msg = `The 'go.languageServerExperimentalFeature.diagnostics' setting will be deprecated soon. If you would like additional configuration for diagnostics from gopls, please see and response to -https://github.com/golang/vscode-go/issues/50.`); +https://github.com/golang/vscode-go/issues/50.`; + const selected = await vscode.window.showInformationMessage(msg, `Don't show again`); + switch (selected) { + case `Don't show again`: + updateGlobalState(promptKey, true); + } } } - updateGoVarsFromConfig().then(async () => { suggestUpdates(ctx); offerToInstallLatestGoVersion(); diff --git a/test/gopls/update.test.ts b/test/gopls/update.test.ts index ecefa756a0..d279fdbb73 100644 --- a/test/gopls/update.test.ts +++ b/test/gopls/update.test.ts @@ -175,6 +175,9 @@ suite('gopls update tests', () => { version: '', checkForUpdates: 'proxy', env: {}, + features: { + diagnostics: true, + }, flags: [], modtime: new Date(), serverName: 'gopls', From cebe687e73200181d89def669a1eedd029d900a6 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 22 Jan 2021 13:47:03 -0500 Subject: [PATCH 042/189] [release] Update README.md and CHANGELOG.md I intend to keep this announcement change only in the release branch until the release date. We will cherry-pick this to the master branch. Change-Id: If318853c6801aed8f43e6a9e01ef4ac3e638181c Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/285893 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler --- CHANGELOG.md | 16 +++++++++++----- README.md | 6 +++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 528f564bf8..d586d47918 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ -> 📣   Announcement: -> -> * The language server, `gopls`, will be enabled by default in the next release. ([Issue 1037](https://github.com/golang/vscode-go/issues/1037)). Please test and provide us your feedback on the `#vscode-dev` [Gophers Slack](https://gophers.slack.com/) channel. -> -> * Some workspace or folder-level settings that affect tools location will not be used by default until users explicitly opt in by running `Go: Toggle Workspace Trust Flag`. See [Issue 1094](https://github.com/golang/vscode-go/issues/1094) for more information. +## v0.22.0 - 26th Jan, 2021 + +- The language server, `gopls`, is enabled by default. ([Issue 1037](https://github.com/golang/vscode-go/issues/1037)) + +### Enhancements +- Added the new Go welcome page. ([Issue 949](https://github.com/golang/vscode-go/issues/949)) +- Updated documentation. (troubleshooting, customization, settings guide) +- Updated the hardcoded latest gopls version to 0.6.4. + +### Thanks +Thank you for your contribution, @suzmue, @stamblerre, @findleyr, @heschik, @hyangah! ## v0.21.1 - 21st Jan, 2021 A list of all issues and changes can be found in the [v0.21.1 milestone](https://github.com/golang/vscode-go/milestone/22?closed=1). diff --git a/README.md b/README.md index 45ad02ae76..f323bf98ae 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ [The VS Code Go extension](https://marketplace.visualstudio.com/items?itemName=golang.go) provides rich language support for the [Go programming language](https://golang.org/). -> 📣 We will enable the language server ([`gopls`]) by default in the end of Jan 2021. -> We recommend switching to the language server now (`"go.useLanguageServer": true`) to confirm it works well for you. -> Please [file a new issue](https://github.com/golang/vscode-go/issues/new/choose) if you notice bugs or missing features. +> 📣 Gopls, the official Go language server, is now enabled in VS Code by default. +> Gopls replaces several legacy tools to provide IDE features while editing Go code. +> See [issue 1037](https://github.com/golang/vscode-go/issues/1037) for more information. ## Quick Start From 9acd4d8653ed5eb61eb3312e01b75f2a0cf529eb Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Tue, 26 Jan 2021 13:37:05 -0500 Subject: [PATCH 043/189] [release] src/welcome: correct link to Gophers Slack The link should be an invite, since people without accounts won't be able to see the channel. Change-Id: If3554e4cd7b8ee694e06ff650101a5c003d20761 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/286892 Trust: Rebecca Stambler Run-TryBot: Rebecca Stambler TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 63d2287a5944e4b4d4040163bcd3643994728f44) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/286913 --- src/welcome.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/welcome.ts b/src/welcome.ts index 5bd08f9d34..5c5f462ede 100644 --- a/src/welcome.ts +++ b/src/welcome.ts @@ -159,7 +159,7 @@ setting, we recommend removing that setting now.`; -->
  • Release notes
  • GitHub
  • -
  • Slack
  • +
  • Slack
  • From a7d4839e0eb5225d39cb06642b1a4d9becfcb5fc Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 28 Jan 2021 16:41:59 -0500 Subject: [PATCH 044/189] [release] build: run docker with SYS_PTRACE capability Debug tests need to launch dlv and that needs ptrace. SYS_PTRACE is not in the default capability list so, add it. https://docs.docker.com/engine/reference/run/ Change-Id: I3c53e0dd956b731726c5bbf7853d3f30d258dd26 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/287712 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Robert Findley TryBot-Result: kokoro (cherry picked from commit ad3a7d2bf3c6815d77b3ebff1d349e8ca1efe3ee) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/287798 --- build/all.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/all.bash b/build/all.bash index afd0706f71..2a8316341b 100755 --- a/build/all.bash +++ b/build/all.bash @@ -60,7 +60,8 @@ run_test() { run_test_in_docker() { echo "**** Building the docker image ***" docker build -t vscode-test-env -f ./build/Dockerfile . - docker run --workdir=/workspace -v "$(pwd):/workspace" vscode-test-env ci + # For debug tests, we need ptrace. + docker run --cap-add SYS_PTRACE --workdir=/workspace -v "$(pwd):/workspace" vscode-test-env ci } prepare_nightly() { From 2f2f2a2b0b9053e6910f06e7de9e110ed621158d Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Fri, 29 Jan 2021 12:10:55 -0500 Subject: [PATCH 045/189] [release] goLanguageServer: add extra information to automated error reports Keep track of the total number of times the language server has been started and how many times it has been manually restarted by the user. Total start count will account for the first start + any automated restarts + any manual restarts. Also, add the initialization to the automated error report. Change-Id: If10b65a27d362dbf9a7c7815623670fbfdf6a360 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/287952 Trust: Rebecca Stambler Run-TryBot: Rebecca Stambler TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 5d48c070847753e645218597644915663b6d74d7) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288132 --- src/goLanguageServer.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 93422054c6..33441b9c64 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -94,6 +94,10 @@ let languageServerStartInProgress = false; let serverTraceChannel: vscode.OutputChannel; let crashCount = 0; +// Some metrics for automated issue reports: +let manualRestartCount = 0; +let totalStartCount = 0; + // defaultLanguageProviders is the list of providers currently registered. let defaultLanguageProviders: vscode.Disposable[] = []; @@ -224,6 +228,8 @@ async function startLanguageServer(ctx: vscode.ExtensionContext, config: Languag await suggestGoplsIssueReport( `Looks like you're about to manually restart the language server.`, errorKind.manualRestart); + + manualRestartCount++; restartLanguageServer(); }); ctx.subscriptions.push(restartCommand); @@ -234,6 +240,7 @@ async function startLanguageServer(ctx: vscode.ExtensionContext, config: Languag disposeDefaultProviders(); languageServerDisposable = languageClient.start(); + totalStartCount++; ctx.subscriptions.push(languageServerDisposable); return true; } @@ -312,7 +319,7 @@ export async function buildLanguageClient(cfg: BuildLanguageClientOption): Promi vscode.window.showErrorMessage( `The language server is not able to serve any features. Initialization failed: ${error}. ` ); - suggestGoplsIssueReport(`The gopls server failed to initialize.`, errorKind.initializationFailure); + suggestGoplsIssueReport(`The gopls server failed to initialize`, errorKind.initializationFailure, error); return false; }, errorHandler: { @@ -1261,7 +1268,7 @@ enum errorKind { } // suggestGoplsIssueReport prompts users to file an issue with gopls. -async function suggestGoplsIssueReport(msg: string, reason: errorKind) { +async function suggestGoplsIssueReport(msg: string, reason: errorKind, initializationError?: WebRequest.ResponseError) { // Don't prompt users who manually restart to file issues until gopls/v1.0. if (reason === errorKind.manualRestart) { return; @@ -1337,6 +1344,9 @@ gopls version: ${usersGoplsVersion} gopls flags: ${settings} extension version: ${extInfo.version} environment: ${extInfo.appName} +initialization error: ${initializationError} +manual restart count: ${manualRestartCount} +total start count: ${totalStartCount} ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW. From b5f15f589b9571ad79f201ee16c8d07d3f57fa81 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 29 Jan 2021 16:20:19 -0500 Subject: [PATCH 046/189] [release] src/goMain: linkify documentLink deprecation warning message vscode show*Message API does not have full markdown formatting support but allows the use of links. Use it so users can access the info easily. Change-Id: I4eff7c128bdf97ba4ff0375e957daa77ed4f9369 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288133 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler (cherry picked from commit bc53fd8ee162ef0595ec63bb33e23cfaed86bcaf) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288212 TryBot-Result: kokoro --- src/goMain.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/goMain.ts b/src/goMain.ts index fe7d445d00..54a0166ebf 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -128,15 +128,14 @@ export async function activate(ctx: vscode.ExtensionContext) { // The `diagnostics` setting is still used as a workaround for running custom vet. if (experimentalFeatures['documentLink'] === false) { vscode.window.showErrorMessage(`The 'go.languageServerExperimentalFeature.documentLink' setting is now deprecated. -Please use ' "gopls": {"ui.navigation.importShortcut": "Definition" }' instead. -See https://github.com/golang/vscode-go/blob/master/docs/settings.md#uinavigationimportshortcut for more details.`); +Please use '"gopls": {"ui.navigation.importShortcut": "Definition" }' instead. +See [the settings doc](https://github.com/golang/vscode-go/blob/master/docs/settings.md#uinavigationimportshortcut) for more details.`); } const promptKey = 'promptedLanguageServerExperimentalFeatureDeprecation'; const prompted = getFromGlobalState(promptKey, false); if (!prompted && experimentalFeatures['diagnostics'] === false) { const msg = `The 'go.languageServerExperimentalFeature.diagnostics' setting will be deprecated soon. -If you would like additional configuration for diagnostics from gopls, please see and response to -https://github.com/golang/vscode-go/issues/50.`; +If you would like additional configuration for diagnostics from gopls, please see and response to [Issue 50](https://github.com/golang/vscode-go/issues/50).`; const selected = await vscode.window.showInformationMessage(msg, `Don't show again`); switch (selected) { case `Don't show again`: From 33a0c8543d4c2358601ab770fd8be488ba98ddb6 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 1 Feb 2021 10:37:23 -0500 Subject: [PATCH 047/189] [release] README.md: add the new video material Change-Id: If08fdf03491ead9160eccb37c5ff56ad2341d10a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288492 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler (cherry picked from commit 05251dd6e2df55d213c08e08b63bf0468eeac96c) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289230 TryBot-Result: kokoro --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ed7a0388d..05b76df0d2 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ extension, as well as how to [customize](#customization) them. Take a look at guidance. If you are new to Go, [this article](https://golang.org/doc/code.html) provides -the overview on Go code organization and basic `go` commands. Watch [this video -from the Go Open Source Live conference] for an explanation of how to build -your first Go application using VS Code Go. +the overview on Go code organization and basic `go` commands. Watch ["Getting +started with VS Code Go"] for an explanation of how to build your first Go +application using VS Code Go. ## Features @@ -168,7 +168,7 @@ conduct-related issue, please mail conduct@golang.org. [Managing extensions in VS Code]: https://code.visualstudio.com/docs/editor/extension-gallery [VS Code Go extension]: https://marketplace.visualstudio.com/items?itemName=golang.go [Go installation guide]: https://golang.org/doc/install -[this video from the Go Open Source Live conference]: https://opensourcelive.withgoogle.com/events/go/watch?talk=session3 +["Getting started with VS Code Go"]: https://youtu.be/1MXIGYrMk80 [IntelliSense]: https://github.com/golang/vscode-go/blob/master/docs/features.md#intellisense [code navigation]: https://github.com/golang/vscode-go/blob/master/docs/features.md#code-navigation [code editing]: https://github.com/golang/vscode-go/blob/master/docs/features.md#code-editing From 9b537762c5946f288e6d3247c265257fb81ec0ef Mon Sep 17 00:00:00 2001 From: Hana Date: Sun, 31 Jan 2021 10:36:25 -0500 Subject: [PATCH 048/189] [release] src/goLanguageServer: block until the language client is ready According to https://github.com/microsoft/vscode-languageserver-node#breaking-changes, we need to wait until the client is actually ready before attempting to make any request including shutdown. Change-Id: Icfa4c9069ad448156794a7d14ba9036a14bdfd55 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288372 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Trust: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler (cherry picked from commit 55b2284a36381359f06b305e246c7bad1b3b929c) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289232 --- src/goLanguageServer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 33441b9c64..de0a1c5782 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -242,6 +242,7 @@ async function startLanguageServer(ctx: vscode.ExtensionContext, config: Languag languageServerDisposable = languageClient.start(); totalStartCount++; ctx.subscriptions.push(languageServerDisposable); + await languageClient.onReady(); return true; } From 0aeab66fb62825ca2e69706f2250dc37f35625e8 Mon Sep 17 00:00:00 2001 From: Hana Date: Sat, 30 Jan 2021 17:03:20 -0500 Subject: [PATCH 049/189] [release] src/goLanguageServer: protect language restart with mutex We have used the languageServerStartInProgress flag to prevent issuing another language start request while the previous language start up process is in progress and is blocked. This prevented the race of multiple language start calls. However, this can cause important language client restart request to be skipped. Consider this scenario: - user modifies the setting to enable gopls and that triggers a call to startLanguageServerWithFallback. While this is waiting on startLanguageServer that will run with cfg.enabled = true. - user modifies the stting to disable gopls, and that triggers another call to startLanguageServerWithFallback. - the second startLanguageServerWithFallback will skip startLanguageServer because languageServerStartInProgress is true. - As a result, we will fail to disable the language server. This change fixes the issue by using a new Mutex to protect startLanguageServer. With the change, the second call won't skip startLanguageServer, but will be resumed when the previous startLanguageServer call is finished. This change also fixes the bug in src/goStatus that produced incorrect language server status icon when language server is disabled. Fixes golang/vscode-go#1132 Change-Id: I4435d41b843032ff8f675ea95aac002d9ba79b4b Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288352 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Trust: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler (cherry picked from commit 1ad5c33383f743d0a41ff0e401fdcab58ffcd056) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289234 --- src/goLanguageServer.ts | 38 ++++++++++++-------------- src/goStatus.ts | 2 -- src/utils/mutex.ts | 41 ++++++++++++++++++++++++++++ test/unit/mutex.test.ts | 60 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+), 23 deletions(-) create mode 100644 src/utils/mutex.ts create mode 100644 test/unit/mutex.test.ts diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index de0a1c5782..b25e46f756 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -64,6 +64,7 @@ import { getWorkspaceFolderPath, removeDuplicateDiagnostics } from './util'; +import { Mutex } from './utils/mutex'; import { getToolFromToolPath } from './utils/pathUtils'; export interface LanguageServerConfig { @@ -88,9 +89,9 @@ let languageServerDisposable: vscode.Disposable; let latestConfig: LanguageServerConfig; export let serverOutputChannel: vscode.OutputChannel; export let languageServerIsRunning = false; -// TODO: combine languageServerIsRunning & languageServerStartInProgress -// as one languageServerStatus variable. -let languageServerStartInProgress = false; + +const languageServerStartMutex = new Mutex(); + let serverTraceChannel: vscode.OutputChannel; let crashCount = 0; @@ -121,11 +122,6 @@ export async function startLanguageServerWithFallback(ctx: vscode.ExtensionConte } } - if (!activation && languageServerStartInProgress) { - console.log('language server restart is already in progress...'); - return; - } - const goConfig = getGoConfig(); const cfg = buildLanguageServerConfig(goConfig); @@ -145,21 +141,21 @@ export async function startLanguageServerWithFallback(ctx: vscode.ExtensionConte } } } + const unlock = await languageServerStartMutex.lock(); + try { + const started = await startLanguageServer(ctx, cfg); - languageServerStartInProgress = true; - - const started = await startLanguageServer(ctx, cfg); - - // If the server has been disabled, or failed to start, - // fall back to the default providers, while making sure not to - // re-register any providers. - if (!started && defaultLanguageProviders.length === 0) { - registerDefaultProviders(ctx); + // If the server has been disabled, or failed to start, + // fall back to the default providers, while making sure not to + // re-register any providers. + if (!started && defaultLanguageProviders.length === 0) { + registerDefaultProviders(ctx); + } + languageServerIsRunning = started; + updateLanguageServerIconGoStatusBar(started, goConfig['useLanguageServer'] === true); + } finally { + unlock(); } - - languageServerIsRunning = started; - updateLanguageServerIconGoStatusBar(started, goConfig['useLanguageServer'] === true); - languageServerStartInProgress = false; } // scheduleGoplsSuggestions sets timeouts for the various gopls-specific diff --git a/src/goStatus.ts b/src/goStatus.ts index 1c8f5cd7db..f1e1aa5796 100644 --- a/src/goStatus.ts +++ b/src/goStatus.ts @@ -129,10 +129,8 @@ export function updateLanguageServerIconGoStatusBar(started: boolean, enabled: b let text = goEnvStatusbarItem.text; let icon = ''; if (text.endsWith(languageServerIcon)) { - icon = languageServerIcon; text = text.substring(0, text.length - languageServerIcon.length); } else if (text.endsWith(languageServerErrorIcon)) { - icon = languageServerErrorIcon; text = text.substring(0, text.length - languageServerErrorIcon.length); } diff --git a/src/utils/mutex.ts b/src/utils/mutex.ts new file mode 100644 index 0000000000..6c69deea60 --- /dev/null +++ b/src/utils/mutex.ts @@ -0,0 +1,41 @@ +/*--------------------------------------------------------- + * Copyright 2021 The Go Authors. All rights reserved. + * Licensed under the MIT License. See LICENSE in the project root for license information. + *--------------------------------------------------------*/ + +'use strict'; + +/* Mutex provides mutex feature by building a promise chain. + + const m = new Mutex(); + + const unlock = await m.lock(); + try { + // critical section + } finally { + unlock(); + } +*/ +export class Mutex { + private mutex = Promise.resolve(); + + public lock(): PromiseLike<() => void> { + // Based on https://spin.atomicobject.com/2018/09/10/javascript-concurrency/ + + let x: (unlock: () => void) => void; + + // add to the promise chain of this mutex. + // When all the prior promises in the chain are resolved, + // x, which will be the resolve callback of promise B, + // will run and cause to unblock the waiter of promise B. + this.mutex = this.mutex.then(() => { + return new Promise(x); // promise A + }); + + return new Promise((resolve) => { // promise B + x = resolve; + }); + // the returned Promise will resolve when all the previous + // promises chained in this.mutex resolve. + } +} diff --git a/test/unit/mutex.test.ts b/test/unit/mutex.test.ts new file mode 100644 index 0000000000..9972034de4 --- /dev/null +++ b/test/unit/mutex.test.ts @@ -0,0 +1,60 @@ +/*--------------------------------------------------------- + * Copyright 2021 The Go Authors. All rights reserved. + * Licensed under the MIT License. See LICENSE in the project root for license information. + *--------------------------------------------------------*/ + +import * as assert from 'assert'; +import { Mutex } from '../../src/utils/mutex'; + +suite('Mutex Tests', () => { + test('works for basic concurrent access', async () => { + const m = new Mutex(); + + let cnt = 0; + const worker = async (delay: number, count: number) => { + for (let i = 0; i < count; i++) { + const unlock = await m.lock(); + try { + const cntCopy = cnt; + await sleep(delay); + cnt = cntCopy + 1; + } finally { + unlock(); + } + } + }; + + await Promise.all([worker(3, 5), worker(1, 10)]); + assert.strictEqual(cnt, 15); + }); + + test('works when lock holders throw errors', async () => { + const m = new Mutex(); + + let cnt = 0; + const worker = async (delay: number) => { + const unlock = await m.lock(); + try { + const cntCopy = cnt; + await sleep(delay); + cnt = cntCopy + 1; + throw new Error('ooops'); + } finally { + unlock(); + } + }; + + const safeWorker = async (delay: number) => { + try { + await worker(delay); + } catch (e) { + // swallow the exception + } + }; + + await Promise.all([safeWorker(3), safeWorker(2), safeWorker(1), safeWorker(0)]); + assert.strictEqual(cnt, 4); + }); +}); + +function sleep(ms: number) { return new Promise((resolve) => setTimeout(resolve, ms)); } From f796ab1d971a025ed18c0c42f7e009039baa43b0 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 29 Jan 2021 16:26:08 -0500 Subject: [PATCH 050/189] [release] package.json: add dlv to alternateTools value list And remove legacy tools from the list For golang/vscode-go#1144 Change-Id: I66c365de267344c5852b7fbaa6e243389ee9ea96 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/288134 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Trust: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler (cherry picked from commit 3c08fecea4c3949205dbcd8a4fa105cb7506e677) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289231 --- docs/settings.md | 3 +-- package.json | 11 +++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 1efe15dcc7..0779751939 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -51,12 +51,11 @@ Default: Alternate tools or alternate paths for the same tools used by the Go extension. Provide either absolute path or the name of the binary in GOPATH/bin, GOROOT/bin or PATH. Useful when you want to use wrapper script for the Go tools or versioned tools from https://gopkg.in. When specified as a workspace setting, the setting is used only when the workspace is marked trusted with "Go: Toggle Workspace Trust Flag". | Properties | Description | | --- | --- | +| `dlv` | Alternate tool to use instead of the dlv binary or alternate path to use for the dlv binary.
    Default: `"dlv"` | | `go` | Alternate tool to use instead of the go binary or alternate path to use for the go binary.
    Default: `"go"` | | `go-outline` | Alternate tool to use instead of the go-outline binary or alternate path to use for the go-outline binary.
    Default: `"go-outline"` | -| `gocode` | Alternate tool to use instead of the gocode binary or alternate path to use for the gocode binary.
    Default: `"gocode"` | | `gopkgs` | Alternate tool to use instead of the gopkgs binary or alternate path to use for the gopkgs binary.
    Default: `"gopkgs"` | | `gopls` | Alternate tool to use instead of the gopls binary or alternate path to use for the gopls binary.
    Default: `"gopls"` | -| `guru` | Alternate tool to use instead of the guru binary or alternate path to use for the guru binary.
    Default: `"guru"` | ### `go.autocompleteUnimportedPackages` Include unimported packages in auto-complete suggestions. Not applicable when using the language server. diff --git a/package.json b/package.json index 7fac64001a..5949b0e64a 100644 --- a/package.json +++ b/package.json @@ -1688,11 +1688,6 @@ "default": "go", "description": "Alternate tool to use instead of the go binary or alternate path to use for the go binary." }, - "gocode": { - "type": "string", - "default": "gocode", - "description": "Alternate tool to use instead of the gocode binary or alternate path to use for the gocode binary." - }, "gopkgs": { "type": "string", "default": "gopkgs", @@ -1708,10 +1703,10 @@ "default": "go-outline", "description": "Alternate tool to use instead of the go-outline binary or alternate path to use for the go-outline binary." }, - "guru": { + "dlv": { "type": "string", - "default": "guru", - "description": "Alternate tool to use instead of the guru binary or alternate path to use for the guru binary." + "default": "dlv", + "description": "Alternate tool to use instead of the dlv binary or alternate path to use for the dlv binary." } }, "additionalProperties": true From 88a972d11291c23a05cace71b1d6aff7dc9b4343 Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 3 Feb 2021 12:04:47 -0500 Subject: [PATCH 051/189] [release] src/goMain: use a hard-coded version string for welcome page state This is to show the welcome page to users who just install v0.22.1 without installing v0.22.0, while preventing from showing it to users who upgrade from v0.22.0. Updates golang/vscode-go#1179 Change-Id: I77b26fb0249847556adcac08a05a6d6f75377ee5 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289191 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Robert Findley TryBot-Result: kokoro (cherry picked from commit 6841fe054a966cd5ad92930b7eda7a97d13af633) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289235 --- src/goMain.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/goMain.ts b/src/goMain.ts index 54a0166ebf..68efce9245 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -578,15 +578,16 @@ function showGoWelcomePage(ctx: vscode.ExtensionContext) { // Update this list of versions when there is a new version where we want to // show the welcome page on update. const showVersions: string[] = ['0.22.0']; - + // TODO(hyangah): use the content hash instead of hard-coded string. + // https://github.com/golang/vscode-go/issue/1179 + let goExtensionVersion = 'v0.22.0'; let goExtensionVersionKey = 'go.extensionVersion'; if (isInPreviewMode()) { + goExtensionVersion = '0.0.0'; goExtensionVersionKey = 'go.nightlyExtensionVersion'; } - const goExtension = vscode.extensions.getExtension(extensionId)!; - const goExtensionVersion = goExtension.packageJSON.version; - const savedGoExtensionVersion = getFromGlobalState(goExtensionVersionKey, '0.0.0'); + const savedGoExtensionVersion = getFromGlobalState(goExtensionVersionKey, ''); if (shouldShowGoWelcomePage(showVersions, goExtensionVersion, savedGoExtensionVersion)) { WelcomePanel.createOrShow(ctx.extensionUri); From 1aefe8e3ed16f147621cc431af3533887f9f34ed Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 27 Jan 2021 14:40:58 -0500 Subject: [PATCH 052/189] [release] package-lock.json: update ini Used npm audit fix Related issue: https://npmjs.com/advisories/1589 Change-Id: I4896fcaee631566d884388a7925e43a399e39283 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/287293 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller Trust: Hyang-Ah Hana Kim (cherry picked from commit 30b736797f16b3181ad6bba7a7478f71e2c834cd) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289233 Reviewed-by: Rebecca Stambler --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c4c072c48..fa335095eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2386,9 +2386,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "interpret": { From acad49d98b2bfc7433ec4d8ee5dba71e6261d272 Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Wed, 3 Feb 2021 12:42:24 -0500 Subject: [PATCH 053/189] [release] goLanguageServer: disable the language server with SSH URIs This is another case, like VSLS, where the language server should be running remotely. Fixes golang/vscode-go#1171 Change-Id: Ic4d2ceac8f1b72cb6742540092e8c32f58a6efd9 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289197 Run-TryBot: Rebecca Stambler TryBot-Result: kokoro Trust: Rebecca Stambler Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 2c40d20815ec28a13ef0c385a1e296105c4ca071) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289329 --- src/goLanguageServer.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index b25e46f756..6ae66f3ad1 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -115,10 +115,14 @@ let lastUserAction: Date = new Date(); export async function startLanguageServerWithFallback(ctx: vscode.ExtensionContext, activation: boolean) { for (const folder of vscode.workspace.workspaceFolders || []) { - if (folder.uri.scheme === 'vsls') { - outputChannel.appendLine(`Language service on the guest side is disabled. ` + - `The server-side language service will provide the language features.`); - return; + switch (folder.uri.scheme) { + case 'vsls': + outputChannel.appendLine(`Language service on the guest side is disabled. ` + + `The server-side language service will provide the language features.`); + return; + case 'ssh': + outputChannel.appendLine(`The language server is not supported for SSH. Disabling it.`); + return; } } @@ -272,7 +276,7 @@ export async function buildLanguageClient(cfg: BuildLanguageClientOption): Promi const goplsWorkspaceConfig = await adjustGoplsWorkspaceConfiguration(cfg, getGoplsConfig(), 'gopls', undefined); const documentSelector = [ - // Filter out unsupported document types, e.g. vsls, git. + // Filter out unsupported document types, e.g. vsls, git, ssh. // https://docs.microsoft.com/en-us/visualstudio/liveshare/reference/extensions#visual-studio-code-1 // // - files From 86e3e208d1a13b1e85e88975c0041f6db4c83ae3 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 29 Jan 2021 17:24:18 -0500 Subject: [PATCH 054/189] [release] CHANGELOG.md: v0.22.1 Change-Id: I1535f1779f069e63a4a421494c75fae722a3533e Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/287953 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler TryBot-Result: kokoro --- CHANGELOG.md | 14 ++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d586d47918..ab0a2ce465 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## v0.22.1 - 4th Feb, 2021 + +### Enhancements +- Added error details to automated error reports. ([CL 287952](https://go-review.googlesource.com/c/vscode-go/+/287952)) +- Used clickable links in `"go.languageServerExperimentalFeatures"` setting deprecation error messages. ([CL 288133](https://go-review.googlesource.com/c/vscode-go/+/288133)) + +### Fixes +- Fixed a race during language client restarts. ([CL 288372](https://go-review.googlesource.com/c/vscode-go/+/288372), [CL 288352](https://go-review.googlesource.com/c/vscode-go/+/288352)) +- Disabled the language server when using workspace folders over ssh. ([Issue 1171](https://github.com/golang/vscode-go/issues/1171)) +- Added `dlv` to the `"go.alternateTools"` example value list. ([CL 289231](https://go-review.googlesource.com/c/vscode-go/+/289231)) + +### Code Health +- Bumped `ini` to 1.3.8 to address a vulnerability report from `npm audit`. + ## v0.22.0 - 26th Jan, 2021 - The language server, `gopls`, is enabled by default. ([Issue 1037](https://github.com/golang/vscode-go/issues/1037)) diff --git a/package-lock.json b/package-lock.json index fa335095eb..704d26dfb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.21.1", + "version": "0.22.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5949b0e64a..9a3a6c5849 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.22.0", + "version": "0.22.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 5236c4964e857a4bb11a5247e9b76539d6dcfabb Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 3 Feb 2021 16:32:44 -0500 Subject: [PATCH 055/189] [release] src/goLanguageServer: add platfom info in the automated issue report Change-Id: I74fa5d8205102251bc6403f7a73691439f4e9944 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289369 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler TryBot-Result: kokoro --- src/goLanguageServer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 6ae66f3ad1..bab6bf1cdb 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -1344,7 +1344,7 @@ Failed to auto-collect gopls trace: ${failureReason}. gopls version: ${usersGoplsVersion} gopls flags: ${settings} extension version: ${extInfo.version} -environment: ${extInfo.appName} +environment: ${extInfo.appName} ${process.platform} initialization error: ${initializationError} manual restart count: ${manualRestartCount} total start count: ${totalStartCount} From 345c29775827f0f7f31f27c4cdc05276a0552c55 Mon Sep 17 00:00:00 2001 From: Abhishek Patra Date: Thu, 4 Feb 2021 13:59:02 +0000 Subject: [PATCH 056/189] [release] package.json: fix typos Change-Id: I801e41417f6da2da7881b98cc36dbebf56a34cfd GitHub-Last-Rev: 8a69c0efb76331aef456b7a743e02c65566d2c6f GitHub-Pull-Request: golang/vscode-go#1187 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289609 Trust: Robert Findley Trust: Peter Weinberger Trust: Hyang-Ah Hana Kim Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit eb53a534fb0e684798ea778537a8b63833d4dc76) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289671 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler --- docs/settings.md | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 0779751939..30b346bd2d 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -66,7 +66,7 @@ Default: `false` Flags to `go build`/`go test` used during build-on-save or running tests. (e.g. ["-ldflags='-s'"]) This is propagated to the language server if `gopls.build.buildFlags` is not specified. ### `go.buildOnSave` -Compiles code on file save using 'go build' or 'go test -c'. Options are 'workspace', 'package', or 'off'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.
    +Compiles code on file save using 'go build' or 'go test -c'. Options are 'workspace', 'package', or 'off'. Not applicable when using the language server's diagnostics. See 'go.languageServerExperimentalFeatures.diagnostics' setting.
    Allowed Options: `package`, `workspace`, `off` Default: `"package"` @@ -444,7 +444,7 @@ Default: `true` Flags to pass to `go tool vet` (e.g. ["-all", "-shadow"]) ### `go.vetOnSave` -Vets code on file save using 'go tool vet'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.
    +Vets code on file save using 'go tool vet'. Not applicable when using the language server's diagnostics. See 'go.languageServerExperimentalFeatures.diagnostics' setting.
    Allowed Options: `package`, `workspace`, `off` Default: `"package"` diff --git a/package.json b/package.json index 9a3a6c5849..c82586a080 100644 --- a/package.json +++ b/package.json @@ -865,7 +865,7 @@ "off" ], "default": "package", - "description": "Compiles code on file save using 'go build' or 'go test -c'. Options are 'workspace', 'package', or 'off'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.", + "description": "Compiles code on file save using 'go build' or 'go test -c'. Options are 'workspace', 'package', or 'off'. Not applicable when using the language server's diagnostics. See 'go.languageServerExperimentalFeatures.diagnostics' setting.", "scope": "resource" }, "go.buildFlags": { @@ -939,7 +939,7 @@ "off" ], "default": "package", - "description": "Vets code on file save using 'go tool vet'. Not applicable when using the language server's diagnostics is used. See 'go.languageServerExperimentalFeatures.diagnostics' setting.", + "description": "Vets code on file save using 'go tool vet'. Not applicable when using the language server's diagnostics. See 'go.languageServerExperimentalFeatures.diagnostics' setting.", "scope": "resource" }, "go.vetFlags": { From 7b7056393a8fe5f6f8178f7afe889b1a9b3e4ceb Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 4 Feb 2021 19:48:20 -0500 Subject: [PATCH 057/189] [release] test/runTest: use vscode 1.52.1 This is temporary to unblock our CI. Updates golang/vscode-go#1190 Updates microsoft/vscode#115794 Change-Id: Icc642d692688695c00763fda3525488e0febb9ec Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289770 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller Trust: Hyang-Ah Hana Kim (cherry picked from commit df04ba23a2b06b8f08f841a9cd017132b97ec8ff) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289971 Reviewed-by: Rebecca Stambler --- test/runTest.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/runTest.ts b/test/runTest.ts index 0d27244535..dd42247f87 100644 --- a/test/runTest.ts +++ b/test/runTest.ts @@ -18,6 +18,7 @@ async function main() { // Download VS Code, unzip it and run the integration test await runTests({ + version: '1.52.1', extensionDevelopmentPath, extensionTestsPath, launchArgs: [ @@ -36,6 +37,7 @@ async function main() { // tslint:disable-next-line:max-line-length // https://github.com/microsoft/vscode/blob/890f62dfd9f3e70198931f788c5c332b3e8b7ad7/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.ts#L281 await runTests({ + version: '1.52.1', extensionDevelopmentPath, extensionTestsPath: path.resolve(__dirname, './gopls/index'), launchArgs: [ From b33ce83fec61c25890510138ceeef6c1ccb3c9ac Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 4 Feb 2021 12:14:21 -0500 Subject: [PATCH 058/189] [release] src/goMain: correct showGoWelcomePage hard-coded version string Remove the 'v' prefix. Change-Id: I251055122f07c94a154f59bbda0cc7520db5cfd4 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289698 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Robert Findley (cherry picked from commit f2fcdb172bd9e986e1a66fe73a1f8442e12c604f) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289677 TryBot-Result: kokoro Reviewed-by: Rebecca Stambler --- src/goMain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/goMain.ts b/src/goMain.ts index 68efce9245..3788344c9e 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -580,7 +580,7 @@ function showGoWelcomePage(ctx: vscode.ExtensionContext) { const showVersions: string[] = ['0.22.0']; // TODO(hyangah): use the content hash instead of hard-coded string. // https://github.com/golang/vscode-go/issue/1179 - let goExtensionVersion = 'v0.22.0'; + let goExtensionVersion = '0.22.0'; let goExtensionVersionKey = 'go.extensionVersion'; if (isInPreviewMode()) { goExtensionVersion = '0.0.0'; From ea76c49b1d0e58c9b5558a04d21c4f5afed50298 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 5 Feb 2021 09:28:29 -0500 Subject: [PATCH 059/189] [release] src/goMain: fix the exception caused by invalid version string https://go-review.googlesource.com/c/vscode-go/+/289191 made showGoWelcomePage pass an empty string to shouldShowGoWelcomePage and causes it to fail. Do the null check on the coerced semver. Change-Id: Ibc5d9684e153571e7e6507f533367a128952c9ac Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/289969 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Trust: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller (cherry picked from commit feee65b4e865ff395e0a6b1de2bb29e3155ec91c) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/290109 Reviewed-by: Rebecca Stambler --- src/goMain.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/goMain.ts b/src/goMain.ts index 3788344c9e..8e6f203eb3 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -603,6 +603,9 @@ export function shouldShowGoWelcomePage(showVersions: string[], newVersion: stri } const coercedNew = semver.coerce(newVersion); const coercedOld = semver.coerce(oldVersion); + if (!coercedNew || !coercedOld) { + return true; + } // Both semver.coerce(0.22.0) and semver.coerce(0.22.0-rc.1) will be 0.22.0. return semver.gte(coercedNew, coercedOld) && showVersions.includes(coercedNew.toString()); } From e36509753811a260e48f13525bd2c43db0875a16 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 8 Feb 2021 10:08:59 -0500 Subject: [PATCH 060/189] CHANGELOG.md: update v0.22.1 release date It was delayed due to last minute CI issues Change-Id: If2e801b9c849f1df70349f70b30dfd98af257c64 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/290391 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab0a2ce465..126a46fa47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## v0.22.1 - 4th Feb, 2021 +## v0.22.1 - 8th Feb, 2021 ### Enhancements - Added error details to automated error reports. ([CL 287952](https://go-review.googlesource.com/c/vscode-go/+/287952)) @@ -12,6 +12,9 @@ ### Code Health - Bumped `ini` to 1.3.8 to address a vulnerability report from `npm audit`. +### Thanks +Thank you for your contribution, @stamblerre, @hyangah, @patrasap0908! + ## v0.22.0 - 26th Jan, 2021 - The language server, `gopls`, is enabled by default. ([Issue 1037](https://github.com/golang/vscode-go/issues/1037)) From 0fdaaeb49f1915b754de814ec5b04cd7268bd284 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 2 Mar 2021 11:15:48 -0500 Subject: [PATCH 061/189] [release] CHANGELOG.md: v0.23.0 release note Change-Id: If3e3656f17fe3e857a97d75b2fc9a485a53128cc Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/297890 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler --- .vscode/changelog.code-snippets | 6 ++-- CHANGELOG.md | 55 +++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/.vscode/changelog.code-snippets b/.vscode/changelog.code-snippets index ea473d9179..cadf1b405a 100644 --- a/.vscode/changelog.code-snippets +++ b/.vscode/changelog.code-snippets @@ -11,7 +11,7 @@ "prefix": "pr", "scope": "markdown", "body": [ - "[PR $1](https://github.com/Microsoft/vscode-go/pull/$1)" + "[PR $1](https://github.com/golang/vscode-go/pull/$1)" ], "description": "Pull Request Number" }, @@ -19,7 +19,7 @@ "prefix": "bug", "scope": "markdown", "body": [ - "Fixes [Bug $1](https://github.com/Microsoft/vscode-go/issues/$1) with [PR $2](https://github.com/Microsoft/vscode-go/pull/$2)" + "Fixes [Bug $1](https://github.com/golang/vscode-go/issues/$1) with [PR $2](https://github.com/golang/vscode-go/pull/$2)" ], "description": "Bug Number" }, @@ -27,7 +27,7 @@ "prefix": "feature", "scope": "markdown", "body": [ - "[Feature Request $1](https://github.com/Microsoft/vscode-go/issues/$1) implemented with [PR $2](https://github.com/Microsoft/vscode-go/pull/$2)" + "[Feature Request $1](https://github.com/golang/vscode-go/issues/$1) implemented with [PR $2](https://github.com/golang/vscode-go/pull/$2)" ], "description": "Feature Request Number" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 126a46fa47..58b557cd7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,58 @@ +## v0.23.0 - 4th Mar, 2021 + +Delve DAP is a new debug adapter embedded in `dlv`, the Go debugger. +It is written in Go, understands Go's data types and runtime better, +and is under active development. In this release, we added back +access to Delve DAP. Delve DAP is still in the experimental stage +and we appreciate any feedback and bug reports! + +A list of all issues and changes can be found in the +[v0.23.0 milestone](https://github.com/golang/vscode-go/milestone/21?closed=1) +and the [changes since v0.22.1](https://github.com/golang/vscode-go/compare/v0.22.1...v0.23.0) + +### Enhancements + +* Improved debugging workflow of attaching to local process. +([Issue 183](https://github.com/golang/vscode-go/issues/183)) +By setting `processId` to the command name of the process, `${command:pickProcess}`, or +`${command:pickGoProcess}` a quick pick menu will show a list of processes to choose from. +* Enabled access to Delve DAP again. Simplified the Delve DAP launch workflow +and removed the intermediate Node.JS adapter. +If `"debugAdapter": "dlv-dap"` is specified in launch.json configurations, +the extension will use Delve DAP for the debug session. When using Delve DAP, +install the dev version of `dlv` built from master +(`cd; GO111MODULE=on go get github.com/go-delve/delve/cmd/dlv@master`) +to pick up the latest bug fixes and feature improvement. +([Issue 23](https://github.com/golang/vscode-go/issues/23), +[822](https://github.com/golang/vscode-go/issues/822), +[844](https://github.com/golang/vscode-go/issues/844)) +* Added an opt-in "Always Update" setting for `gopls` auto-update. +([Issue 1095](https://github.com/golang/vscode-go/issues/1095)) +* `Go: Reset Global State` and `Go: Reset Workspace State` commands are +available for easier extension state reset. +* Enabled survey to collect feedback from users who disabled `gopls`. +* Added a new setting (`"go.disableConcurrentTests"`) that prevents concurrent `go test` invocation. +([Issue 1089](https://github.com/golang/vscode-go/issues/1089)) + +### Fixes +* [Issue 1113](https://github.com/golang/vscode-go/issues/1113): error message when debugee terminates fast. +* [Issue 179](https://github.com/golang/vscode-go/issues/179): disable stackTrace error pop-ups during debugging. +* [CL 290289](https://go-review.googlesource.com/c/vscode-go/+/290289): check incorrect gopls flag usage before automated gopls crash report. +* [Issue 948](https://github.com/golang/vscode-go/issues/948): show lint tool's name as the lint diagnostic collection name. +* [Issue 1252](https://github.com/golang/vscode-go/issues/1252): search `C:\Program Files\Go\bin`, +`C:\Program Files (x86)\Go\bin\go.exe`, the new default Go installation path in Windows. + +### Code Health + +* Migrated to use `gts` to enforce consistent coding style. ([Issue 1227](https://github.com/golang/vscode-go/issues/1227)) +* Preview mode features are available in both Nightly and the dev version. +* Enabled integration test in Go module mode. +* Enabled Delve DAP integration test. +* Removed the `latest` branch. +### Thanks + +Thanks for your contributions, @Charliekenney23, @eneuschild, @suzmue, @stamblerre, @pjweinbgo, @polinasok! + ## v0.22.1 - 8th Feb, 2021 ### Enhancements From 01ac55f86c18b092874bf9fd5fbfec31701c8811 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 2 Mar 2021 11:52:31 -0500 Subject: [PATCH 062/189] [release] LICENSE: update for v0.23.0 No dependency on yargs-parser. Updated tools/license.sh to accept more license combinations. BSD-2-Clause, MIT, Apache-2.0, CC-By-3.0, CC0-1.0 are acceptable with notices. They are also included in the js-green-licenses default configuration. https://github.com/google/js-green-licenses#configurations Change-Id: I02e39a5e9f091497ca24992cb8dfec458de98a10 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/297892 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler --- LICENSE | 32 +++----------------------------- tools/license.sh | 5 +++++ 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/LICENSE b/LICENSE index f535c3ecb6..1d1d9f3024 100644 --- a/LICENSE +++ b/LICENSE @@ -28,32 +28,6 @@ THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY B ----- -The following software may be included in this product: @types/yargs-parser. A copy of the source code may be downloaded from https://github.com/DefinitelyTyped/DefinitelyTyped.git. This software contains the following license and notice below: - -MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE - ------ - The following software may be included in this product: ajv. A copy of the source code may be downloaded from https://github.com/ajv-validator/ajv.git. This software contains the following license and notice below: The MIT License (MIT) @@ -658,7 +632,7 @@ SOFTWARE. ----- -The following software may be included in this product: es-get-iterator, side-channel, which-boxed-primitive. A copy of the source code may be downloaded from git+https://github.com/ljharb/es-get-iterator.git (es-get-iterator), git+https://github.com/ljharb/side-channel.git (side-channel), git+https://github.com/inspect-js/which-boxed-primitive.git (which-boxed-primitive). This software contains the following license and notice below: +The following software may be included in this product: es-get-iterator, has-bigints, side-channel, unbox-primitive, which-boxed-primitive. A copy of the source code may be downloaded from git+https://github.com/ljharb/es-get-iterator.git (es-get-iterator), git+https://github.com/ljharb/has-bigints.git (has-bigints), git+https://github.com/ljharb/side-channel.git (side-channel), git+https://github.com/ljharb/unbox-primitive.git (unbox-primitive), git+https://github.com/inspect-js/which-boxed-primitive.git (which-boxed-primitive). This software contains the following license and notice below: MIT License @@ -1063,7 +1037,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ----- -The following software may be included in this product: has-symbols. A copy of the source code may be downloaded from git://github.com/ljharb/has-symbols.git. This software contains the following license and notice below: +The following software may be included in this product: has-symbols. A copy of the source code may be downloaded from git://github.com/inspect-js/has-symbols.git. This software contains the following license and notice below: MIT License @@ -1243,7 +1217,7 @@ PERFORMANCE OF THIS SOFTWARE. ----- -The following software may be included in this product: is-arguments, is-negative-zero, is-regex, object-is. A copy of the source code may be downloaded from git://github.com/inspect-js/is-arguments.git (is-arguments), git://github.com/inspect-js/is-negative-zero.git (is-negative-zero), git://github.com/ljharb/is-regex.git (is-regex), git://github.com/es-shims/object-is.git (object-is). This software contains the following license and notice below: +The following software may be included in this product: is-arguments, is-negative-zero, is-regex, object-is. A copy of the source code may be downloaded from git://github.com/inspect-js/is-arguments.git (is-arguments), git://github.com/inspect-js/is-negative-zero.git (is-negative-zero), git://github.com/inspect-js/is-regex.git (is-regex), git://github.com/es-shims/object-is.git (object-is). This software contains the following license and notice below: The MIT License (MIT) diff --git a/tools/license.sh b/tools/license.sh index 8750bca752..282a7c1ca7 100755 --- a/tools/license.sh +++ b/tools/license.sh @@ -43,9 +43,14 @@ NG=$(echo "${ALL_LICENSES}" | jq ' "(MIT OR Apache-2.0)": 1, "(MIT AND Zlib)": 1, "(MIT AND BSD-3-Clause)": 1, + "(BSD-2-Clause OR MIT OR Apache-2.0)": 1, + "CC-BY-3.0": 1, + "CC0-1.0": 1, + "(MIT OR CC0-1.0)": 1, } as $allowed_licenses | { "json-schema@0.2.3": 1, + "buffers@0.1.1": 1, # MIT } as $allow_list | .[] | select(.license | in($allowed_licenses) | not) | select((.name+"@"+.version) | in($allow_list) | not) ') From a3de25432f078815744ad9f4e475a76bf07cebed Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 4 Mar 2021 12:14:30 -0500 Subject: [PATCH 063/189] [release] CHANGELOG.md: do not highlight dlv-dap yet We need to do some more polishing. Change-Id: Ia78d11a59e34ac12c0169401f8b3f76634419170 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/298789 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Polina Sokolova TryBot-Result: kokoro --- CHANGELOG.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58b557cd7b..a0f2640ff8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,5 @@ ## v0.23.0 - 4th Mar, 2021 -Delve DAP is a new debug adapter embedded in `dlv`, the Go debugger. -It is written in Go, understands Go's data types and runtime better, -and is under active development. In this release, we added back -access to Delve DAP. Delve DAP is still in the experimental stage -and we appreciate any feedback and bug reports! - A list of all issues and changes can be found in the [v0.23.0 milestone](https://github.com/golang/vscode-go/milestone/21?closed=1) and the [changes since v0.22.1](https://github.com/golang/vscode-go/compare/v0.22.1...v0.23.0) From 35dafc6a705a27325a424c87649233aecab99628 Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Thu, 25 Feb 2021 11:08:23 -0800 Subject: [PATCH 064/189] [release] welcome: remove gopls announcement from the welcome page Change-Id: Ie3543235964d4932d841eb437d3f70c83c2d43cb Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/296509 Trust: Rebecca Stambler Run-TryBot: Rebecca Stambler TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 9fe63c5568e2871c33c9036ec92f4f86f64e4002) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/298790 Reviewed-by: Rebecca Stambler Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim --- src/welcome.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/welcome.ts b/src/welcome.ts index 41e66be26f..f62679dd4e 100644 --- a/src/welcome.ts +++ b/src/welcome.ts @@ -163,16 +163,6 @@ setting, we recommend removing that setting now.`; -
    - announce -

    - Heads up! Gopls, the official Go language server, is now enabled in VS Code by default. - Gopls replaces several legacy tools to provide IDE features while editing Go code. - See issue 1037 for more - information. ${alreadyDisabledGopls} -

    -
    -
    From 9a653de7427d9ab836ba92360659dad8db673d03 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 9 Mar 2021 21:12:51 -0500 Subject: [PATCH 065/189] [release] package-lock.json: npm audit fix npm audit fix npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. changed 1 package, and audited 896 packages in 6s Change-Id: Iab4456496ee356407a70736baa5679f34c94040f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/300151 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit bf643069aecdcd323cd4a869cd17527581c1334b) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/300569 --- package-lock.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index ea15ac73ae..c35ef240d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2591,18 +2591,18 @@ } }, "node_modules/elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "dependencies": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, "node_modules/elliptic/node_modules/bn.js": { @@ -12215,18 +12215,18 @@ } }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" }, "dependencies": { "bn.js": { From 22c28cd3203b8b31d89ffabf054df56ddd4dc2b6 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Mon, 8 Mar 2021 10:30:18 -0500 Subject: [PATCH 066/189] [release] src/goDebugFactory: wait for dlv dap server to start in factory When we start dlv dap, we want to make sure it has started before sending the info back to vscode so it will be able to connect. Wait for the 'DAP server listening at' message before returning the host. Display the error for the user otherwise. Fixes golang/vscode-go#1270 Change-Id: Id710b67ceaa87b1f6dff84d8108ac61dfbe15707 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/300071 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/300609 Trust: Hyang-Ah Hana Kim --- src/goDebugFactory.ts | 89 +++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 28 deletions(-) diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index c6b8e1652d..5ebdef0d08 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -68,14 +68,11 @@ export async function startDapServer( } else { configuration.port = await getPort(); } - const dlvDapServer = spawnDlvDapServerProcess(configuration); - // Wait to give dlv-dap a chance to start before returning. - return await new Promise<{ port: number; host: string; dlvDapServer: ChildProcessWithoutNullStreams }>((resolve) => - setTimeout(() => resolve({ port: configuration.port, host: configuration.host, dlvDapServer }), 500) - ); + const dlvDapServer = await spawnDlvDapServerProcess(configuration); + return { dlvDapServer, port: configuration.port, host: configuration.host }; } -function spawnDlvDapServerProcess(launchArgs: DebugConfiguration) { +async function spawnDlvDapServerProcess(launchArgs: DebugConfiguration): Promise { const launchArgsEnv = launchArgs.env || {}; const env = Object.assign({}, process.env, launchArgsEnv); @@ -114,30 +111,66 @@ function spawnDlvDapServerProcess(launchArgs: DebugConfiguration) { appendToDebugConsole(`Running: ${dlvPath} ${dlvArgs.join(' ')}`); const dir = parseProgramArgSync(launchArgs).dirname; - const p = spawn(dlvPath, dlvArgs, { - cwd: dir, - env - }); - p.stderr.on('data', (chunk) => { - appendToDebugConsole(chunk.toString()); - }); - p.stdout.on('data', (chunk) => { - appendToDebugConsole(chunk.toString()); - }); - p.on('close', (code) => { - if (code) { - appendToDebugConsole(`Process exiting with code: ${code} signal: ${p.killed}`); - } else { - appendToDebugConsole(`Process exited normally: ${p.killed}`); - } - }); - p.on('error', (err) => { - if (err) { - appendToDebugConsole(`Error: ${err}`); - } + return await new Promise((resolve, reject) => { + const p = spawn(dlvPath, dlvArgs, { + cwd: dir, + env + }); + let started = false; + const timeoutToken: NodeJS.Timer = setTimeout( + () => reject(new Error('timed out while waiting for DAP server to start')), + 5_000 + ); + + const stopWaitingForServerToStart = (err?: string) => { + clearTimeout(timeoutToken); + started = true; + if (err) { + killProcessTree(p); // We do not need to wait for p to actually be killed. + reject(new Error(err)); + } else { + resolve(p); + } + }; + + p.stdout.on('data', (chunk) => { + if (!started) { + if (chunk.toString().startsWith('DAP server listening at:')) { + stopWaitingForServerToStart(); + } else { + stopWaitingForServerToStart( + `Expected 'DAP server listening at:' from debug adapter got '${chunk.toString()}'` + ); + } + } + appendToDebugConsole(chunk.toString()); + }); + p.stderr.on('data', (chunk) => { + if (!started) { + stopWaitingForServerToStart(`Unexpected error from dlv dap on start: '${chunk.toString()}'`); + } + appendToDebugConsole(chunk.toString()); + }); + p.on('close', (code) => { + if (!started) { + stopWaitingForServerToStart(`dlv dap closed with code: '${code}' signal: ${p.killed}`); + } + if (code) { + appendToDebugConsole(`Process exiting with code: ${code} signal: ${p.killed}`); + } else { + appendToDebugConsole(`Process exited normally: ${p.killed}`); + } + }); + p.on('error', (err) => { + if (!started) { + stopWaitingForServerToStart(`Unexpected error from dlv dap on start: '${err}'`); + } + if (err) { + appendToDebugConsole(`Error: ${err}`); + } + }); }); - return p; } function parseProgramArgSync( From adeae177d66b72e35c23a25bec4e5020020289ee Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 10 Mar 2021 16:55:36 -0500 Subject: [PATCH 067/189] CHANGELOG.md: Descrption of v0.23.1 Change-Id: Ica6546122f4de9d74fbadb1de2f1af1f56c699d1 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/300571 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0f2640ff8..b3d4bf4493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +## v0.23.1 - 11th Mar, 2021 + +🎉   We use [`staticcheck`](https://staticcheck.io/) +as the default lint tool. We also changed to use `goimports` for formatting when not using `gopls`. + +This version requires VS Code 1.52 or newer. + +A list of all issues and changes can be found in the +[v0.23.1 milestone](https://github.com/golang/vscode-go/milestone/24?closed=1) +and the [changes since v0.22.1](https://github.com/golang/vscode-go/compare/v0.23.0...v0.23.1) + +### Enhancements + +* Changed the default lint/format tools. ([Issue 189](https://github.com/golang/vscode-go/issues/189), [192](https://github.com/golang/vscode-go/issues/192)) +* Enhanced `dlv-dap` start logic ([Issue 1270](https://github.com/golang/vscode-go/issues/1270)) and improved output/error message forwarding. ([CL 296930](https://go-review.googlesource.com/c/vscode-go/+/296930)) + +### Fixes + +* Fixed the spurious popup message about the use of `goreturns`. ([CL 300430](https://go-review.googlesource.com/c/vscode-go/+/300430)) +* Fixed orphaned progress notification after restarting `gopls`. ([Issue 1153](https://github.com/golang/vscode-go/issues/1153)) +* Fixed cryptic error messages that appear when `gopls` commands fail. ([Issue 1237](https://github.com/golang/vscode-go/issues/1237)) +* Fixed incomplete folding range info issue caused by parse errors. Complete fix requires `gopls` v0.6.7+ ([Issue 1224](https://github.com/golang/vscode-go/issues/1224)) + +### Code Health +* Updated LSP to 3.16.0 (stable), and DAP to 1.44.0. + ## v0.23.0 - 4th Mar, 2021 A list of all issues and changes can be found in the From 0ffe2e1e6e7442e2cccfb683af0a83c214bcb977 Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 11 Mar 2021 21:21:54 -0500 Subject: [PATCH 068/189] [release] src/goTools: update min/latest gopls version to 0.6.6 From https://proxy.golang.org/golang.org/x/tools/gopls/@v/v0.6.6.info {"Version":"v0.6.6","Time":"2021-02-22T19:32:25Z"} For golang/vscode-go#1300 Change-Id: I2d4059d913d0e0fa70b908292ab7e179ee741759 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/301149 Trust: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler (cherry picked from commit 90370ab0ab23b4ebdd64490eb3f8d4efb50a2f39) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/301151 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro --- src/goTools.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/goTools.ts b/src/goTools.ts index b0bf7b3f61..23fa7a66d9 100644 --- a/src/goTools.ts +++ b/src/goTools.ts @@ -361,10 +361,10 @@ export const allToolsInformation: { [key: string]: Tool } = { isImportant: true, description: 'Language Server from Google', minimumGoVersion: semver.coerce('1.12'), - latestVersion: semver.coerce('0.6.4'), - latestVersionTimestamp: moment('2021-01-19', 'YYYY-MM-DD'), - latestPrereleaseVersion: semver.coerce('0.6.4'), - latestPrereleaseVersionTimestamp: moment('2021-01-19', 'YYYY-MM-DD') + latestVersion: semver.coerce('0.6.6'), + latestVersionTimestamp: moment('2021-02-22', 'YYYY-MM-DD'), + latestPrereleaseVersion: semver.coerce('0.6.6'), + latestPrereleaseVersionTimestamp: moment('2021-02-22', 'YYYY-MM-DD') }, 'dlv': { name: 'dlv', From a84fd7941af9c8d6180c8e9e1575f95b3d5acd66 Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 11 Mar 2021 23:50:37 -0500 Subject: [PATCH 069/189] [release] CHANGELOG.md: v0.23.2 release note Change-Id: I28290b0d45348017a89b29eb1656914f172654b4 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/301169 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler --- CHANGELOG.md | 6 ++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3d4bf4493..53b60b6109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## v0.23.2 - 12th Mar, 2021 + +### Fixes + +* Updated the gopls version requirement. v0.23.1 requires v0.6.6+. ([Issue 1300](https://github.com/golang/vscode-go/issues/1300)) + ## v0.23.1 - 11th Mar, 2021 🎉   We use [`staticcheck`](https://staticcheck.io/) diff --git a/package-lock.json b/package-lock.json index c35ef240d6..1b3d6a9916 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.23.1", + "version": "0.23.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 3adf04472e..d877a8ce98 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.23.1", + "version": "0.23.2", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 42b500990e7da3852d93efe2623e6d55cbc80ff5 Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 17 Mar 2021 13:59:37 -0400 Subject: [PATCH 070/189] [release] package.json: sync gopls settings@v0.6.7 Change-Id: I73c1c2cf60cf16ae5e59186c9be5f49acb2de068 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/302649 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller TryBot-Result: kokoro (cherry picked from commit c70298bd9a77458f7afc78f1700f9d996115890c) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/303052 Reviewed-by: Rebecca Stambler --- docs/settings.md | 2 ++ package.json | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/docs/settings.md b/docs/settings.md index f69929245b..7746457447 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -652,6 +652,7 @@ Example Usage: | `loopclosure` | check references to loop variables from within nested functions
    This analyzer checks for references to loop variables from within a function literal inside the loop body. It checks only instances where the function literal is called in a defer or go statement that is the last statement in the loop body, as otherwise we would need whole program analysis.
    For example:
    for i, v := range s {
    go func() {
    println(i, v) // not what you might expect
    }()
    }

    See: https://golang.org/doc/go_faq.html#closures_and_goroutines
    Default: `true` | | `lostcancel` | check cancel func returned by context.WithCancel is called
    The cancellation function returned by context.WithCancel, WithTimeout, and WithDeadline must be called or the new context will remain live until its parent context is cancelled. (The background context is never cancelled.)
    Default: `true` | | `nilfunc` | check for useless comparisons between functions and nil
    A useless comparison is one like f == nil as opposed to f() == nil.
    Default: `true` | +| `nilness` | check for redundant or impossible nil comparisons
    The nilness checker inspects the control-flow graph of each function in a package and reports nil pointer dereferences, degenerate nil pointers, and panics with nil values. A degenerate comparison is of the form x==nil or x!=nil where x is statically known to be nil or non-nil. These are often a mistake, especially in control flow related to errors. Panics with nil values are checked because they are not detectable by
    if r := recover(); r != nil {

    This check reports conditions such as:
    if f == nil { // impossible condition (f is a function)
    }

    and:
    p := &v
    ...
    if p != nil { // tautological condition
    }

    and:
    if p == nil {
    print(*p) // nil dereference
    }

    and:
    if p == nil {
    panic(p)
    }


    Default: `false` | | `nonewvars` | suggested fixes for "no new vars on left side of :="
    This checker provides suggested fixes for type errors of the type "no new vars on left side of :=". For example:
    z := 1
    z := 2
    will turn into
    z := 1
    z = 2


    Default: `true` | | `noresultvalues` | suggested fixes for "no result values expected"
    This checker provides suggested fixes for type errors of the type "no result values expected". For example:
    func z() { return nil }
    will turn into
    func z() { return }


    Default: `true` | | `printf` | check consistency of Printf format strings and arguments
    The check applies to known functions (for example, those in package fmt) as well as any detected wrappers of known functions.
    A function that wants to avail itself of printf checking but is not found by this analyzer's heuristics (for example, due to use of dynamic calls) can insert a bogus call:
    if false {
    _ = fmt.Sprintf(format, args...) // enable printf checking
    }

    The -funcs flag specifies a comma-separated list of names of additional known formatting functions or methods. If the name contains a period, it must denote a specific function using one of the following forms:
    dir/pkg.Function
    dir/pkg.Type.Method
    (*dir/pkg.Type).Method

    Otherwise the name is interpreted as a case-insensitive unqualified identifier such as "errorf". Either way, if a listed name ends in f, the function is assumed to be Printf-like, taking a format string before the argument list. Otherwise it is assumed to be Print-like, taking a list of arguments with no format string.

    Default: `true` | @@ -672,6 +673,7 @@ Example Usage: | `unsafeptr` | check for invalid conversions of uintptr to unsafe.Pointer
    The unsafeptr analyzer reports likely incorrect uses of unsafe.Pointer to convert integers to pointers. A conversion from uintptr to unsafe.Pointer is invalid if it implies that there is a uintptr-typed word in memory that holds a pointer value, because that word will be invisible to stack copying and to the garbage collector.
    Default: `true` | | `unusedparams` | check for unused parameters of functions
    The unusedparams analyzer checks functions to see if there are any parameters that are not being used.
    To reduce false positives it ignores: - methods - parameters that do not have a name or are underscored - functions in test files - functions with empty bodies or those with just a return stmt
    Default: `false` | | `unusedresult` | check for unused results of calls to some functions
    Some functions like fmt.Errorf return a result and have no side effects, so it is always a mistake to discard the result. This analyzer reports calls to certain functions in which the result of the call is ignored.
    The set of functions may be controlled using flags.
    Default: `true` | +| `unusedwrite` | checks for unused writes
    The analyzer reports instances of writes to struct fields and arrays that are never read. Specifically, when a struct object or an array is copied, its elements are copied implicitly by the compiler, and any element write to this copy does nothing with the original object.
    For example:
    type T struct { x int }
    func f(input []T) {
    for i, v := range input { // v is a copy
    v.x = i // unused write to field x
    }
    }

    Another example is about non-pointer receiver:
    type T struct { x int }
    func (t T) f() { // t is a copy
    t.x = i // unused write to field x
    }


    Default: `false` | ### `ui.diagnostic.annotations` (Experimental) annotations specifies the various kinds of optimization diagnostics diff --git a/package.json b/package.json index d877a8ce98..422c60a72c 100644 --- a/package.json +++ b/package.json @@ -2004,6 +2004,11 @@ "markdownDescription": "check for useless comparisons between functions and nil\n\nA useless comparison is one like f == nil as opposed to f() == nil.", "default": true }, + "nilness": { + "type": "boolean", + "markdownDescription": "check for redundant or impossible nil comparisons\n\nThe nilness checker inspects the control-flow graph of each function in\na package and reports nil pointer dereferences, degenerate nil\npointers, and panics with nil values. A degenerate comparison is of the form\nx==nil or x!=nil where x is statically known to be nil or non-nil. These are\noften a mistake, especially in control flow related to errors. Panics with nil\nvalues are checked because they are not detectable by\n\n\tif r := recover(); r != nil {\n\nThis check reports conditions such as:\n\n\tif f == nil { // impossible condition (f is a function)\n\t}\n\nand:\n\n\tp := &v\n\t...\n\tif p != nil { // tautological condition\n\t}\n\nand:\n\n\tif p == nil {\n\t\tprint(*p) // nil dereference\n\t}\n\nand:\n\n\tif p == nil {\n\t\tpanic(p)\n\t}\n", + "default": false + }, "nonewvars": { "type": "boolean", "markdownDescription": "suggested fixes for \"no new vars on left side of :=\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"no new vars on left side of :=\". For example:\n\tz := 1\n\tz := 2\nwill turn into\n\tz := 1\n\tz = 2\n", @@ -2103,6 +2108,11 @@ "type": "boolean", "markdownDescription": "check for unused results of calls to some functions\n\nSome functions like fmt.Errorf return a result and have no side effects,\nso it is always a mistake to discard the result. This analyzer reports\ncalls to certain functions in which the result of the call is ignored.\n\nThe set of functions may be controlled using flags.", "default": true + }, + "unusedwrite": { + "type": "boolean", + "markdownDescription": "checks for unused writes\n\nThe analyzer reports instances of writes to struct fields and\narrays that are never read. Specifically, when a struct object\nor an array is copied, its elements are copied implicitly by\nthe compiler, and any element write to this copy does nothing\nwith the original object.\n\nFor example:\n\n\ttype T struct { x int }\n\tfunc f(input []T) {\n\t\tfor i, v := range input { // v is a copy\n\t\t\tv.x = i // unused write to field x\n\t\t}\n\t}\n\nAnother example is about non-pointer receiver:\n\n\ttype T struct { x int }\n\tfunc (t T) f() { // t is a copy\n\t\tt.x = i // unused write to field x\n\t}\n", + "default": false } } }, From e5c7441d767c9887258392fd2e7a55d9a11d2ea6 Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 17 Mar 2021 22:21:05 -0400 Subject: [PATCH 071/189] [release] src/goLanguageServer: always check the version before crash report For dev-version, we still not enforce update (this case should be clear enough to tell apart from the gopls version included in the issue report and is valuable to detect crash report during dev period). And - Add go version used by the extension and the update flag info. - Update gopls latestVersion to v0.6.8. Updates golang/vscode-go#1300 Updates golang/vscode-go#1334 Updates golang/vscode-go#1338 Change-Id: I9965297b164665056dbec68285eb740ec2908f01 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/302832 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit 73e7c369ddeac7017de44fb9d16752fa3d764410) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/303051 --- src/goInstallTools.ts | 3 +-- src/goLanguageServer.ts | 13 ++++++++++--- src/goTools.ts | 8 ++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index f5e5b58e80..1f2025297b 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -261,8 +261,7 @@ export async function installTool( const execFile = util.promisify(cp.execFile); const { stdout, stderr } = await execFile(goBinary, args, opts); output = `${stdout} ${stderr}`; - logVerbose('install: %s %s\n%s%s', goBinary, args.join(' '), stdout, stderr); - + logVerbose(`install: ${goBinary} ${args.join(' ')}\n${stdout}${stderr}`); if (hasModSuffix(tool)) { // Actual installation of the -gomod tool is done by running go build. const gopath = env['GOBIN'] || env['GOPATH']; diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 5ceadd2f37..431c6d3ae9 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -989,9 +989,13 @@ function allFoldersHaveSameGopath(): boolean { return vscode.workspace.workspaceFolders.find((x) => tempGopath !== getCurrentGoPath(x.uri)) ? false : true; } -export async function shouldUpdateLanguageServer(tool: Tool, cfg: LanguageServerConfig): Promise { +export async function shouldUpdateLanguageServer( + tool: Tool, + cfg: LanguageServerConfig, + mustCheck?: boolean +): Promise { // Only support updating gopls for now. - if (tool.name !== 'gopls' || cfg.checkForUpdates === 'off' || IsInCloudIDE) { + if (tool.name !== 'gopls' || (!mustCheck && (cfg.checkForUpdates === 'off' || IsInCloudIDE))) { return null; } @@ -1501,7 +1505,7 @@ async function suggestGoplsIssueReport( // just prompt them to update, not file an issue. const tool = getTool('gopls'); if (tool) { - const versionToUpdate = await shouldUpdateLanguageServer(tool, latestConfig); + const versionToUpdate = await shouldUpdateLanguageServer(tool, latestConfig, true); if (versionToUpdate) { promptForUpdatingTool(tool.name, versionToUpdate, true); return; @@ -1580,6 +1584,7 @@ You will be asked to provide additional information and logs, so PLEASE READ THE // Get the user's version in case the update prompt above failed. const usersGoplsVersion = await getLocalGoplsVersion(latestConfig); const extInfo = getExtensionInfo(); + const goVersion = await getGoVersion(); const settings = latestConfig.flags.join(' '); const title = `gopls: automated issue report (${errKind})`; const goplsLog = sanitizedLog @@ -1596,7 +1601,9 @@ Failed to auto-collect gopls trace: ${failureReason}. const body = ` gopls version: ${usersGoplsVersion} gopls flags: ${settings} +update flags: ${latestConfig.checkForUpdates} extension version: ${extInfo.version} +go version: ${goVersion?.format(true)} environment: ${extInfo.appName} ${process.platform} initialization error: ${initializationError} manual restart count: ${manualRestartCount} diff --git a/src/goTools.ts b/src/goTools.ts index 23fa7a66d9..149136c2c4 100644 --- a/src/goTools.ts +++ b/src/goTools.ts @@ -361,10 +361,10 @@ export const allToolsInformation: { [key: string]: Tool } = { isImportant: true, description: 'Language Server from Google', minimumGoVersion: semver.coerce('1.12'), - latestVersion: semver.coerce('0.6.6'), - latestVersionTimestamp: moment('2021-02-22', 'YYYY-MM-DD'), - latestPrereleaseVersion: semver.coerce('0.6.6'), - latestPrereleaseVersionTimestamp: moment('2021-02-22', 'YYYY-MM-DD') + latestVersion: semver.coerce('0.6.8'), + latestVersionTimestamp: moment('2021-03-17', 'YYYY-MM-DD'), + latestPrereleaseVersion: semver.coerce('0.6.8'), + latestPrereleaseVersionTimestamp: moment('2021-03-17', 'YYYY-MM-DD') }, 'dlv': { name: 'dlv', From 673449bbbb41ccccaf22dd9ab930ebfe1666ef99 Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 18 Mar 2021 18:12:46 -0400 Subject: [PATCH 072/189] [release] CHANGELOG.md: prepare v0.23.3 Change-Id: I2fe01031f919ee00f42bf35570d8217363ddaa61 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/303289 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- CHANGELOG.md | 7 +++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53b60b6109..9b613d2a9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## v0.23.3 - 19th Mar, 2021 + +### Enhancements + +* Always check the gopls version before activating automated issue reporter regardless of the gopls update settings. +* Updated the hard-coded latest gopls version to v0.6.8 and the gopls settings. + ## v0.23.2 - 12th Mar, 2021 ### Fixes diff --git a/package-lock.json b/package-lock.json index 1b3d6a9916..8c9a9232b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.23.2", + "version": "0.23.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 422c60a72c..877625110f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.23.2", + "version": "0.23.3", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 92cdf326f509c63ae079dd187464fb9001c15849 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Fri, 2 Apr 2021 15:46:30 -0400 Subject: [PATCH 073/189] [release] src/goInstallTools: remove dlv-dap from missing tools We hoped to use missing analysis tools to prompt users to update dlv-dap since we want users to be using master. This results in the Missing Analysis Tools notification to be constantly displayed, which is distracting. We should replace this with other update logic to keep users getting updates. Change-Id: I71a99dc0e47ce1447acec2cda223ab10e3f3100e Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/306990 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit d9fca4df1d08c8d5b5559f955cb918354769a3d4) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/306970 --- src/goInstallTools.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index 8cae7d8182..542eac681b 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -568,17 +568,6 @@ function getMissingTools(goVersion: GoVersion): Promise { (tool) => new Promise((resolve, reject) => { const toolPath = getBinPath(tool.name); - if (tool.name === 'dlv-dap') { - // Check if user already has dlv-dap binary. - // If so, it's likely the user may be interested in updating the tool, - // so we should mark it as important and return as a missing tool. - if (path.isAbsolute(toolPath)) { - tool.isImportant = true; - resolve(tool); - return; - } - tool.isImportant = false; - } resolve(path.isAbsolute(toolPath) ? null : tool); }) ) From 00ca4096ceebe5897d6ae91412001feb5cfa3cde Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 31 Mar 2021 14:18:52 -0400 Subject: [PATCH 074/189] [release] update LICENSE for v0.24.0 Change-Id: I0cc3808c0868ad3cabe64ed868ec9ff5aeeeb81c Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/306349 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim --- tools/license.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/license.sh b/tools/license.sh index 282a7c1ca7..b0a1c9e8b8 100755 --- a/tools/license.sh +++ b/tools/license.sh @@ -45,6 +45,7 @@ NG=$(echo "${ALL_LICENSES}" | jq ' "(MIT AND BSD-3-Clause)": 1, "(BSD-2-Clause OR MIT OR Apache-2.0)": 1, "CC-BY-3.0": 1, + "CC-BY-4.0": 1, "CC0-1.0": 1, "(MIT OR CC0-1.0)": 1, } as $allowed_licenses | From cffd2133f10ccc108ea39e15aa8e23e2a5ec8fc8 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 6 Apr 2021 03:05:07 -0400 Subject: [PATCH 075/189] [release] CHANGELOG.md: for v0.24.0 Updates golang/vscode-go#1386 Change-Id: Ie87270f9be9d989b4f652a82d30948a5cfd34aa8 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/307591 Trust: Hyang-Ah Hana Kim Trust: Suzy Mueller Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b613d2a9f..00f7527fca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +## v0.24.0 - 6th Apr, 2021 + +🧪 We re-enabled the option to use `dlv dap` (Delve's native DAP implementation) instead of the old debug +adapter when debugging go code. See [the documentation](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#how-to-use-dlv-dap) +to learn more about Delve's native DAP implementation, and how to choose `dlv dap`. + +Full list of issues and changes can be found in the [v0.24.0 milestone](https://github.com/golang/vscode-go/milestone/25) and the [changes since v0.23.3](https://github.com/golang/vscode-go/compare/v0.23.3...release). + +### Enhancements +* Supports custom format tools when gopls is enabled. ([Issue 1238](https://github.com/golang/vscode-go/issues/1238)) +* Allows to use `dlv dap` for debugging. + +### Fixes +* Do not lint with `staticcheck` if it is enabled in `gopls`. ([CL 301053](https://go-review.googlesource.com/c/vscode-go/+/301053)) +* Use `go list` to check availability of newly released gopls. ([CL 295418](https://go-review.googlesource.com/c/vscode-go/+/295418)) +* Use `go env -json` to query go env variables. ([CL 301730](https://go-review.googlesource.com/c/vscode-go/+/301730)) +* Include gopls, go versions and OS info to the opt-out survey. + +### Code Health + +* npm audit fix +* Removed the deprecated `go.overwriteGoplsMiddleware` setting. +* Added more testing for debug features using dlv-dap. + +### Thanks + +Thanks for the contributions, @hoanggc, @suzmue, @rstambler, @polinasok! + ## v0.23.3 - 19th Mar, 2021 ### Enhancements From a7a34acf89acb432ca521ba7fbf23bedb260a147 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 14 Apr 2021 15:37:05 -0400 Subject: [PATCH 076/189] [release] Update CHANGELOG and LICENSE for v0.24.1 Change-Id: I65a89512746475cc8424114696f28d0985adf601 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/310178 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00f7527fca..238c7dd335 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +## v0.24.1 - 15 Apr, 2021 + +### Enhancements +- Cleaned up launch configuration snippets for easier debug setup +- To use `dlv-dap` by default for all launch configurations (including codelenses), set the `debugAdapter` field in the `go.delveConfig` setting ([Issue 1293](https://github.com/golang/vscode-go/issues/1293)) +- The list of debugging features only available with `dlv-dap` is now available [here](https://github.com/golang/vscode-go/issues?q=is%3Aissue+label%3Afixedindlvdaponly) +- Updated extension settings to match gopls v0.6.10 + +### Fixes +- Tightened the test function detection regex for codelenses ([Issue 1417](https://github.com/golang/vscode-go/issues/1417)) +- Show error message when dlv-dap fails to launch ([Issue 1413](https://github.com/golang/vscode-go/issues/1413)) +- Corrected install instructions for dlv-dap in popup ([Issue 1395](https://github.com/golang/vscode-go/issues/1395)) + +## Code Health +- Updated latest version of dlv-dap and gopls (v0.6.10) ## v0.24.0 - 6th Apr, 2021 🧪 We re-enabled the option to use `dlv dap` (Delve's native DAP implementation) instead of the old debug From db72703c25268af2d4f7403884dfcc2de307f2d6 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Thu, 15 Apr 2021 12:58:00 -0400 Subject: [PATCH 077/189] [release] src/goDebugFactory.ts: send the first error when starting dlv-dap For every message that the thin adapter needs to forward to dlv-dap, the thin adapter needs to make sure it can connect to the server. If there was an error connecting to the server it will send an error message and a terminated event so the client knows the debug session is not active. If multiple messages are sent to the server, the user gets shown multiple error messages. This change records whether we have already sent a terminated event because of an error, and will not send duplicate error messages. Fixes golang/vscode-go#1426 Change-Id: I8b81959b529f3802c9aa2cbebdbe8008af5902b3 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/310517 Trust: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit bd557329d1592be3c32157df792888e2c848a15b) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/311452 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- src/goDebugFactory.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index 47c79bef13..656de92ac9 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -168,6 +168,7 @@ export class DelveDAPOutputAdapter extends ProxyDebugAdapter { private dlvDapServer: ChildProcess; private port: number; private socket: net.Socket; + private terminatedOnError = false; protected async sendMessageToServer(message: vscode.DebugProtocolMessage): Promise { if (!this.connected) { @@ -177,14 +178,19 @@ export class DelveDAPOutputAdapter extends ProxyDebugAdapter { await this.connected; super.sendMessageToServer(message); } catch (err) { + if (this.terminatedOnError) { + return; + } + this.terminatedOnError = true; // If there was an error connecting, show an error message // and send a terminated event, since we cannot start. if (err) { - const errMsg = `connect to server error: ${err}`; - this.sendMessageToClient(new OutputEvent(errMsg)); + const errMsg = `Debug Error: ${err}`; + this.outputEvent(errMsg, 'stderr'); vscode.window.showErrorMessage(errMsg); } this.sendMessageToClient(new TerminatedEvent()); + return; } } From d767aa07397e94c220cc4f70f29290d95785f314 Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Fri, 16 Apr 2021 13:40:05 -0400 Subject: [PATCH 078/189] [release] src/goCheck: add missing goplsConfig parameter to goLint Fixes golang/vscode-go#1429 Change-Id: I402a29e4dfe95aaa76b8ca852c03c6e3d73eb96c Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/310755 Trust: Rebecca Stambler Run-TryBot: Rebecca Stambler Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 10509fb7d6551e02a7074c97eb5e55630183bbcb) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/311451 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- src/goCheck.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/goCheck.ts b/src/goCheck.ts index eea255c759..c4d710bc07 100644 --- a/src/goCheck.ts +++ b/src/goCheck.ts @@ -9,6 +9,7 @@ import path = require('path'); import vscode = require('vscode'); +import { getGoplsConfig } from './config'; import { goBuild } from './goBuild'; import { buildLanguageServerConfig } from './goLanguageServer'; import { goLint } from './goLint'; @@ -109,8 +110,9 @@ export function check(fileUri: vscode.Uri, goConfig: vscode.WorkspaceConfigurati } if (!!goConfig['lintOnSave'] && goConfig['lintOnSave'] !== 'off') { + const goplsConfig = getGoplsConfig(fileUri); runningToolsPromises.push( - goLint(fileUri, goConfig, goConfig['lintOnSave']).then((errors) => ({ + goLint(fileUri, goConfig, goplsConfig, goConfig['lintOnSave']).then((errors) => ({ diagnosticCollection: lintDiagnosticCollection, errors })) From dec5a1aec346a8ee89dd434017e732d5d44e05c3 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 16 Apr 2021 12:16:24 -0400 Subject: [PATCH 079/189] [release] src/goInstallTools: use GOBIN correctly installing dlv-dap/gocode-gomod We incorrectly added `bin` to the final binary path when the destination was determined by GOBIN env var. Changed install.test.ts to set the temporary GOPATH instead of stubbing getToolsGopath. When populating tools installation environment, the extension ignores GOBIN if users configured go.toolsGopath currently, so depending on toolsGopath to point to the temporary GOPATH prevents from testing GOBIN-related behavior. Fixes golang/vscode-go#1430 Change-Id: Id6450e9422a791f6d5e7810f6bbbec1bc695e924 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/310769 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit 015d002ce9a45045bd4eba451094bedb7fe732d1) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/311450 Reviewed-by: Suzy Mueller --- src/goInstallTools.ts | 13 ++++++--- test/integration/install.test.ts | 49 +++++++++++++++++++++++--------- 2 files changed, 45 insertions(+), 17 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index ebf9be2562..4cc02f97a2 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -34,6 +34,7 @@ import { getBinPath, getBinPathWithExplanation, getCheckForToolsUpdatesConfig, + getCurrentGoPath, getGoVersion, getTempFilePath, getWorkspaceFolderPath, @@ -281,12 +282,16 @@ export async function installTool( logVerbose(`install: ${goBinary} ${args.join(' ')}\n${stdout}${stderr}`); if (hasModSuffix(tool) || tool.name === 'dlv-dap') { // Actual installation of the -gomod tool and dlv-dap is done by running go build. - const gopath = env['GOBIN'] || env['GOPATH']; - if (!gopath) { + let destDir = env['GOBIN']; + if (!destDir) { + const gopath0 = env['GOPATH']?.split(path.delimiter)[0]; + destDir = gopath0 ? path.join(gopath0, 'bin') : undefined; + } + if (!destDir) { throw new Error('GOBIN/GOPATH not configured in environment'); } - const destDir = gopath.split(path.delimiter)[0]; - const outputFile = path.join(destDir, 'bin', process.platform === 'win32' ? `${tool.name}.exe` : tool.name); + const outputFile = path.join(destDir, correctBinname(tool.name)); + // go build does not take @version suffix yet. const importPath = getImportPath(tool, goVersion); await execFile(goBinary, ['build', '-o', outputFile, importPath], opts); diff --git a/test/integration/install.test.ts b/test/integration/install.test.ts index a4375d6f6e..85dd96c782 100644 --- a/test/integration/install.test.ts +++ b/test/integration/install.test.ts @@ -7,7 +7,6 @@ import AdmZip = require('adm-zip'); import * as assert from 'assert'; import * as config from '../../src/config'; -import { toolInstallationEnvironment } from '../../src/goEnv'; import { inspectGoToolVersion, installTools } from '../../src/goInstallTools'; import { allToolsInformation, getConfiguredTools, getTool, getToolAtVersion } from '../../src/goTools'; import { getBinPath, getGoVersion, GoVersion, rmdirRecursive } from '../../src/util'; @@ -39,7 +38,7 @@ suite('Installation Tests', function () { let tmpToolsGopath: string; let tmpToolsGopath2: string; let sandbox: sinon.SinonSandbox; - let toolsGopathStub: sinon.SinonStub; + let toolsGopath: string; setup(() => { // Create a temporary directory in which to install tools. @@ -48,11 +47,9 @@ suite('Installation Tests', function () { // a temporary directory to be used as the second GOPATH element. tmpToolsGopath2 = fs.mkdtempSync(path.join(os.tmpdir(), 'install-test2')); - const toolsGopath = tmpToolsGopath + path.delimiter + tmpToolsGopath2; + toolsGopath = tmpToolsGopath + path.delimiter + tmpToolsGopath2; sandbox = sinon.createSandbox(); - const utils = require('../../src/util'); - toolsGopathStub = sandbox.stub(utils, 'getToolsGopath').returns(toolsGopath); }); teardown(async () => { @@ -74,7 +71,10 @@ suite('Installation Tests', function () { // runTest actually executes the logic of the test. // If withLocalProxy is true, the test does not require internet. - async function runTest(testCases: installationTestCase[], withLocalProxy?: boolean) { + // If withGOBIN is true, the test will set GOBIN env var. + async function runTest(testCases: installationTestCase[], withLocalProxy?: boolean, withGOBIN?: boolean) { + const gobin = withLocalProxy && withGOBIN ? path.join(tmpToolsGopath, 'gobin') : undefined; + let proxyDir: string; let configStub: sinon.SinonStub; if (withLocalProxy) { @@ -83,14 +83,21 @@ suite('Installation Tests', function () { toolsEnvVars: { value: { GOPROXY: url.pathToFileURL(proxyDir), - GOSUMDB: 'off' + GOSUMDB: 'off', + GOBIN: gobin } - } + }, + gopath: { value: toolsGopath } }); configStub = sandbox.stub(config, 'getGoConfig').returns(goConfig); } else { - const env = toolInstallationEnvironment(); - console.log(`Installing tools using GOPROXY=${env['GOPROXY']}`); + const goConfig = Object.create(vscode.workspace.getConfiguration('go'), { + toolsEnvVars: { + value: { GOBIN: gobin } + }, + gopath: { value: toolsGopath } + }); + configStub = sandbox.stub(config, 'getGoConfig').returns(goConfig); } const missingTools = testCases.map((tc) => getToolAtVersion(tc.name)); @@ -104,7 +111,9 @@ suite('Installation Tests', function () { checks.push( new Promise(async (resolve) => { // Check that the expect tool has been installed to $GOPATH/bin. - const bin = path.join(tmpToolsGopath, 'bin', correctBinname(tc.name)); + const bin = gobin + ? path.join(gobin, correctBinname(tc.name)) + : path.join(tmpToolsGopath, 'bin', correctBinname(tc.name)); const ok = await exists(bin); if (!ok) { assert.fail(`expected ${bin}, not found`); @@ -124,8 +133,6 @@ suite('Installation Tests', function () { } await Promise.all(checks); - sandbox.assert.calledWith(toolsGopathStub); - if (withLocalProxy) { sandbox.assert.calledWith(configStub); rmdirRecursive(proxyDir); @@ -160,6 +167,22 @@ suite('Installation Tests', function () { ); }); + test('Install multiple tools with a local proxy & GOBIN', async () => { + await runTest( + [ + { name: 'gopls', versions: ['v0.1.0', 'v1.0.0-pre.1', 'v1.0.0'], wantVersion: 'v1.0.0' }, + { name: 'guru', versions: ['v1.0.0'], wantVersion: 'v1.0.0' }, + { + name: 'dlv-dap', + versions: ['v1.0.0', 'master'], + wantVersion: 'v' + getTool('dlv-dap').latestVersion!.toString() + } + ], + true, // LOCAL PROXY + true // GOBIN + ); + }); + test('Install all tools via GOPROXY', async () => { // Only run this test if we are in CI before a Nightly release. if (!shouldRunSlowTests()) { From accd0fce86fe38e0de0dd355966579030607cc30 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 19 Apr 2021 15:43:45 -0400 Subject: [PATCH 080/189] [release] src/goTools: update dlv-dap @v1.6.1-0.20210419181450-2408ed87bf87 https://proxy.golang.org/github.com/go-delve/delve/@v/master.info {"Version":"v1.6.1-0.20210419181450-2408ed87bf87","Time":"2021-04-19T18:14:50Z"} That includes substitutePath and shadowed variable support. Change-Id: I1a8e20ccdf9d9e9fdc39160abb9f042d6a8d194e Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/311453 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- src/goTools.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/goTools.ts b/src/goTools.ts index 9cf93fb8e8..c300eeb4c9 100644 --- a/src/goTools.ts +++ b/src/goTools.ts @@ -450,8 +450,8 @@ export const allToolsInformation: { [key: string]: Tool } = { 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 - latestVersion: semver.parse('1.6.1-0.20210414072240-747f03788315'), - latestVersionTimestamp: moment('2021-04-14', 'YYYY-MM-DD') + latestVersion: semver.parse('1.6.1-0.20210419181450-2408ed87bf87'), + latestVersionTimestamp: moment('2021-04-19', 'YYYY-MM-DD') }, 'fillstruct': { name: 'fillstruct', From d4cf0f0ec22967c51c862cc9ddc0a90314b029d0 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 19 Apr 2021 16:24:15 -0400 Subject: [PATCH 081/189] [release] CHANGELOG.md: v0.24.2 changelog Change-Id: Iaa8f1c736044eb9bd1e1eab6d0a53d09d4f97f22 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/311473 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 238c7dd335..0b2ddd0656 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## v0.24.2 - 19 Apr, 2021 +A list of all issues and changes can be found in the +[v0.24.2 milestone](https://github.com/golang/vscode-go/issues?q=is%3Aissue+milestone%3Av0.24.2+is%3Aclosed). + +### Fixes +- Fixed regression in the `lintOnSave` feature. ([Issue 1429](https://github.com/golang/vscode-go/issues/1429)) +- Fixed `dlv-dap` installation to correcly use `GOBIN` environment variable. ([Issue 1430](https://github.com/golang/vscode-go/issues/1430)) +- Fixed duplicate error notifications when missing `dlv-dap`. ([Issue 1426](https://github.com/golang/vscode-go/issues/1426)) + +## Enhancements +- Updated the minimum required dlv-dap version. The new version includes support for +[`substitutePath`](https://github.com/golang/vscode-go/blob/master/docs/debugging.md#launch-configurations) and shadowed variable annotation. + ## v0.24.1 - 15 Apr, 2021 ### Enhancements @@ -13,6 +26,7 @@ ## Code Health - Updated latest version of dlv-dap and gopls (v0.6.10) + ## v0.24.0 - 6th Apr, 2021 🧪 We re-enabled the option to use `dlv dap` (Delve's native DAP implementation) instead of the old debug From 9303a0329e7f1dd7ed8b25f39eb30c5c4f07e264 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 19 Apr 2021 16:25:10 -0400 Subject: [PATCH 082/189] [release] package.json: update version to v0.24.2 Change-Id: I7537e55495f537eef3f9b6c0588bae1e53da94b8 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/311472 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 986d1daeb4..dde3a5203b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.24.1", + "version": "0.24.2", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 5f378799e9137051d932c866ac9bad1b0df11010 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 5 May 2021 17:23:02 -0400 Subject: [PATCH 083/189] [release] Update LICENSE for release Change-Id: I363dc8618f5434ef9bdbc145f349707e0f398ff4 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/317302 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 1d1d9f3024..192a023fd6 100644 --- a/LICENSE +++ b/LICENSE @@ -1242,7 +1242,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- -The following software may be included in this product: is-bigint. A copy of the source code may be downloaded from git+https://github.com/ljharb/is-bigint.git. This software contains the following license and notice below: +The following software may be included in this product: is-bigint. A copy of the source code may be downloaded from git+https://github.com/inspect-js/is-bigint.git. This software contains the following license and notice below: MIT License From 9c4a09225c506d5634fdf6033e4e5e4a0ca76213 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Thu, 6 May 2021 21:13:16 -0400 Subject: [PATCH 084/189] [release] docs/settings.md: update gopls settings Change-Id: I906b69c0f4d3842bbc9756eac19f9761e0e738a6 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/317889 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 54986cd033e022e247547e9ce023c7aa68821c78) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/317972 --- docs/settings.md | 21 ++++++++++++++++++++- package.json | 18 ++++++++++++++++-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index e5f254a616..69f7768fd2 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -508,8 +508,11 @@ the last filter that applies to a path controls whether it is included. The path prefix can be empty, so an initial `-` excludes everything. Examples: + Exclude node_modules: `-node_modules` + Include only project_a: `-` (exclude everything), `+project_a` + Include only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules` ### `build.env` @@ -546,6 +549,22 @@ for multi-module workspaces. Default: `false` +### `build.memoryMode` + +(Experimental) memoryMode controls the tradeoff `gopls` makes between memory usage and +correctness. + +Values other than `Normal` are untested and may break in surprising ways. +
    +Allowed Options: + +* `DegradeClosed`: `"DegradeClosed"`: In DegradeClosed mode, `gopls` will collect less information about +packages without open files. As a result, features like Find +References and Rename will miss results in such packages. +* `Normal` + + +Default: `"Normal"` ### `formatting.gofumpt` gofumpt indicates if we should run gofumpt formatting. @@ -653,7 +672,7 @@ Example Usage: | `copylocks` | check for locks erroneously passed by value
    Inadvertently copying a value containing a lock, such as sync.Mutex or sync.WaitGroup, may cause both copies to malfunction. Generally such values should be referred to through a pointer.
    Default: `true` | | `deepequalerrors` | check for calls of reflect.DeepEqual on error values
    The deepequalerrors checker looks for calls of the form:
    reflect.DeepEqual(err1, err2)
    where err1 and err2 are errors. Using reflect.DeepEqual to compare errors is discouraged.
    Default: `true` | | `errorsas` | report passing non-pointer or non-error values to errors.As
    The errorsas analysis reports calls to errors.As where the type of the second argument is not a pointer to a type implementing error.
    Default: `true` | -| `fieldalignment` | find structs that would take less memory if their fields were sorted
    This analyzer find structs that can be rearranged to take less memory, and provides a suggested edit with the optimal order.

    Default: `false` | +| `fieldalignment` | find structs that would use less memory if their fields were sorted
    This analyzer find structs that can be rearranged to use less memory, and provides a suggested edit with the optimal order.
    Note that there are two different diagnostics reported. One checks struct size, and the other reports "pointer bytes" used. Pointer bytes is how many bytes of the object that the garbage collector has to potentially scan for pointers, for example:
    struct { uint32; string }

    have 16 pointer bytes because the garbage collector has to scan up through the string's inner pointer.
    struct { string; *uint32 }

    has 24 pointer bytes because it has to scan further through the *uint32.
    struct { string; uint32 }

    has 8 because it can stop immediately after the string pointer.

    Default: `false` | | `fillreturns` | suggested fixes for "wrong number of return values (want %d, got %d)"
    This checker provides suggested fixes for type errors of the type "wrong number of return values (want %d, got %d)". For example:
    func m() (int, string, *bool, error) {
    return
    }
    will turn into
    func m() (int, string, *bool, error) {
    return 0, "", nil, nil
    }

    This functionality is similar to https://github.com/sqs/goreturns.

    Default: `true` | | `fillstruct` | note incomplete struct initializations
    This analyzer provides diagnostics for any struct literals that do not have any fields initialized. Because the suggested fix for this analysis is expensive to compute, callers should compute it separately, using the SuggestedFix function below.

    Default: `true` | | `httpresponse` | check for mistakes using HTTP responses
    A common mistake when using the net/http package is to defer a function call to close the http.Response Body before checking the error that determines whether the response is valid:
    resp, err := http.Head(url)
    defer resp.Body.Close()
    if err != nil {
    log.Fatal(err)
    }
    // (defer statement belongs here)

    This checker helps uncover latent nil dereference bugs by reporting a diagnostic for such mistakes.
    Default: `true` | diff --git a/package.json b/package.json index dadc3ce909..9cc39c060b 100644 --- a/package.json +++ b/package.json @@ -1802,7 +1802,7 @@ }, "build.directoryFilters": { "type": "array", - "markdownDescription": "directoryFilters can be used to exclude unwanted directories from the\nworkspace. By default, all directories are included. Filters are an\noperator, `+` to include and `-` to exclude, followed by a path prefix\nrelative to the workspace folder. They are evaluated in order, and\nthe last filter that applies to a path controls whether it is included.\nThe path prefix can be empty, so an initial `-` excludes everything.\n\nExamples:\nExclude node_modules: `-node_modules`\nInclude only project_a: `-` (exclude everything), `+project_a`\nInclude only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`\n", + "markdownDescription": "directoryFilters can be used to exclude unwanted directories from the\nworkspace. By default, all directories are included. Filters are an\noperator, `+` to include and `-` to exclude, followed by a path prefix\nrelative to the workspace folder. They are evaluated in order, and\nthe last filter that applies to a path controls whether it is included.\nThe path prefix can be empty, so an initial `-` excludes everything.\n\nExamples:\n\nExclude node_modules: `-node_modules`\n\nInclude only project_a: `-` (exclude everything), `+project_a`\n\nInclude only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`\n", "scope": "resource" }, "build.env": { @@ -1828,6 +1828,20 @@ "default": false, "scope": "resource" }, + "build.memoryMode": { + "type": "string", + "markdownDescription": "(Experimental) memoryMode controls the tradeoff `gopls` makes between memory usage and\ncorrectness.\n\nValues other than `Normal` are untested and may break in surprising ways.\n", + "enum": [ + "DegradeClosed", + "Normal" + ], + "markdownEnumDescriptions": [ + "`\"DegradeClosed\"`: In DegradeClosed mode, `gopls` will collect less information about\npackages without open files. As a result, features like Find\nReferences and Rename will miss results in such packages.\n", + "" + ], + "default": "Normal", + "scope": "resource" + }, "formatting.gofumpt": { "type": "boolean", "markdownDescription": "gofumpt indicates if we should run gofumpt formatting.\n", @@ -1978,7 +1992,7 @@ }, "fieldalignment": { "type": "boolean", - "markdownDescription": "find structs that would take less memory if their fields were sorted\n\nThis analyzer find structs that can be rearranged to take less memory, and provides\na suggested edit with the optimal order.\n", + "markdownDescription": "find structs that would use less memory if their fields were sorted\n\nThis analyzer find structs that can be rearranged to use less memory, and provides\na suggested edit with the optimal order.\n\nNote that there are two different diagnostics reported. One checks struct size,\nand the other reports \"pointer bytes\" used. Pointer bytes is how many bytes of the\nobject that the garbage collector has to potentially scan for pointers, for example:\n\n\tstruct { uint32; string }\n\nhave 16 pointer bytes because the garbage collector has to scan up through the string's\ninner pointer.\n\n\tstruct { string; *uint32 }\n\nhas 24 pointer bytes because it has to scan further through the *uint32.\n\n\tstruct { string; uint32 }\n\nhas 8 because it can stop immediately after the string pointer.\n", "default": false }, "fillreturns": { From e8b1ba573f7c8d1a87e11eba322f20fb8affcde6 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Tue, 11 May 2021 10:35:50 -0400 Subject: [PATCH 085/189] [release] Update CHANGELOG for v0.25.0 Change-Id: I28c7fed2029b8e7d6ef18784925e462b0a865086 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/318790 Trust: Suzy Mueller Run-TryBot: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b2ddd0656..08680276c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,28 @@ +## v0.25.0 - 08 May, 2021 + +A list of all issues and changes can be found in the +[v0.25.0 milestone](https://github.com/golang/vscode-go/issues?q=is%3Aissue+milestone%3Av0.25.0+is%3Aclosed). + +If you have a feature requests for this extension, please file it through the github issue tracker. + +### Enhancements +- Update to latest version of `dlv-dap`. Documentation of current features and limitations can be found in [the documentation](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) +- Add debug previous command ([Issue 798](https://github.com/golang/vscode-go/issues/798)) +- Add command to run `go mod init` ([Issue 1449](https://github.com/golang/vscode-go/issues/1449)) +- Use `program` in debug configuration to determine mode in `auto` ([Issue 1422](https://github.com/golang/vscode-go/issues/1422)) +- Auto update `dlv-dap` if autoUpdates enabled ([Issue 1404](https://github.com/golang/vscode-go/issues/1404)) +- Set `editor.suggest.snippetsPreventQuickSuggestions` to false by default to enable code completion and quick suggestions inside a snippet ([Issue 839](https://github.com/golang/vscode-go/issues/839)) + +### Fixes +- Set the `GOROOT` to the user specified `GOROOT` in `go.goroot` +- Fixed missing file bug in debug adapter ([Issue 1447](https://github.com/golang/vscode-go/issues/1447)) +- Fixed inconsistent workpsaceFolder value bug in debug configuration ([Issue 1448](https://github.com/golang/vscode-go/issues/1448)) +- Allow `dlv-dap` to shut down gracefully and clean up debugged process ([Issue 120](https://github.com/golang/vscode-go/issues/120)) + +### Thanks + +Thank you for your contribution, @hyangah, @JadenSimon, @rstambler, @polinasok, @rfindley, and @suzmue! + ## v0.24.2 - 19 Apr, 2021 A list of all issues and changes can be found in the [v0.24.2 milestone](https://github.com/golang/vscode-go/issues?q=is%3Aissue+milestone%3Av0.24.2+is%3Aclosed). From bcc5a1f51bdefcfe0acd2bc6c9f85026d6eac09a Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Tue, 11 May 2021 10:56:58 -0400 Subject: [PATCH 086/189] [release] test/integration/goDebug.test.ts: use dc.on to wait for output event dc.on calls the listener for every output event. This should fix the flakiness of the cwd tests. Updates golang/vscode-go#1439 Change-Id: I5a44708dc294561408335b3f8baff5cd1b63461a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/318810 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 41c5ee930c78692d69ec084b38fd7507a72cfe9a) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/318892 --- test/integration/goDebug.test.ts | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/test/integration/goDebug.test.ts b/test/integration/goDebug.test.ts index 73b9b5f423..5ef2e2d0e7 100644 --- a/test/integration/goDebug.test.ts +++ b/test/integration/goDebug.test.ts @@ -783,23 +783,13 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { async function waitForHelloGoodbyeOutput(dc: DebugClient): Promise { return await new Promise((resolve, reject) => { - const listen = () => { - dc.waitForEvent('output', 5_000) - .then((event) => { - // Run listen again to make sure we can get the next events. - listen(); - if (event.body.output === 'Hello, World!\n' || event.body.output === 'Goodbye, World.\n') { - // Resolve when we have found the event that we want. - resolve(event); - return; - } - }) - .catch((reason) => reject(reason)); - }; - // Start listening for an output event. Especially because - // logging is enabled in dlv-dap, there are many output events, and it is - // possible to miss them if we are not prepared to handle them. - listen(); + dc.on('output', (event) => { + if (event.body.output === 'Hello, World!\n' || event.body.output === 'Goodbye, World.\n') { + // Resolve when we have found the event that we want. + resolve(event); + return; + } + }); }); } From 7fb07cb8917c7fe817e2ba0be8223c3db92e4ddf Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 12 May 2021 11:12:46 -0400 Subject: [PATCH 087/189] [release] Update CHANGELOG Change-Id: I3b048e008e81b91358ca2e0cf5797102a285d5cb Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/319349 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08680276c6..f130c591ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## v0.25.0 - 08 May, 2021 +## v0.25.0 - 12 May, 2021 A list of all issues and changes can be found in the [v0.25.0 milestone](https://github.com/golang/vscode-go/issues?q=is%3Aissue+milestone%3Av0.25.0+is%3Aclosed). @@ -8,7 +8,7 @@ If you have a feature requests for this extension, please file it through the gi ### Enhancements - Update to latest version of `dlv-dap`. Documentation of current features and limitations can be found in [the documentation](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) - Add debug previous command ([Issue 798](https://github.com/golang/vscode-go/issues/798)) -- Add command to run `go mod init` ([Issue 1449](https://github.com/golang/vscode-go/issues/1449)) +- Add `Go: Initialize go.mod` command to run `go mod init` in the current workspace folder ([Issue 1449](https://github.com/golang/vscode-go/issues/1449)) - Use `program` in debug configuration to determine mode in `auto` ([Issue 1422](https://github.com/golang/vscode-go/issues/1422)) - Auto update `dlv-dap` if autoUpdates enabled ([Issue 1404](https://github.com/golang/vscode-go/issues/1404)) - Set `editor.suggest.snippetsPreventQuickSuggestions` to false by default to enable code completion and quick suggestions inside a snippet ([Issue 839](https://github.com/golang/vscode-go/issues/839)) From 4736f7d23705c06cedac07fc646da5a64fe656b9 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 12 May 2021 12:18:39 -0400 Subject: [PATCH 088/189] src/debugAdapter: default path separator to '/' The path separator '/' is accepted by delve for filepaths, even on windows, but '\\' is not. Therefore we should default to using '/'. Updates golang/vscode-go#1497 Change-Id: If3df8e9a9f05f1b103ee1a361e353f776a057343 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/319354 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim --- src/debugAdapter/goDebug.ts | 4 ++-- test/unit/goDebug.test.ts | 40 ++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts index 4beb6bca8d..4b23dfe9b2 100644 --- a/src/debugAdapter/goDebug.ts +++ b/src/debugAdapter/goDebug.ts @@ -356,8 +356,8 @@ function logError(...args: any[]) { logger.error(logArgsToString(args)); } -function findPathSeparator(filePath: string) { - return filePath.includes('/') ? '/' : '\\'; +export function findPathSeparator(filePath: string) { + return filePath.includes('\\') ? '\\' : '/'; } // Comparing two different file paths while ignoring any different path separators. diff --git a/test/unit/goDebug.test.ts b/test/unit/goDebug.test.ts index c75004eb84..e92072b92c 100644 --- a/test/unit/goDebug.test.ts +++ b/test/unit/goDebug.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------*/ import * as assert from 'assert'; -import { normalizeSeparators } from '../../src/debugAdapter/goDebug'; +import { findPathSeparator, normalizeSeparators } from '../../src/debugAdapter/goDebug'; suite('NormalizeSeparators Tests', () => { test('fix separator', () => { @@ -94,4 +94,42 @@ suite('NormalizeSeparators Tests', () => { assert.strictEqual(got, tc.want); } }); + + test('find path separator', () => { + const tt = [ + { + input: '../path/to/file', + want: '/' + }, + { + input: './path/to/file', + want: '/' + }, + { + input: '..\\path\\to\\file', + want: '\\' + }, + { + input: '.\\path\\to\\file', + want: '\\' + }, + { + input: '/path/to/../file', + want: '/' + }, + { + input: 'c:\\path\\to\\..\\file', + want: '\\' + }, + { + input: '', + want: '/' + } + ]; + + for (const tc of tt) { + const got = findPathSeparator(tc.input); + assert.strictEqual(got, tc.want); + } + }); }); From 5a495aa28821ed86a4a78e120c1c822394e7a010 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Mon, 17 May 2021 15:24:59 -0400 Subject: [PATCH 089/189] [release] test/integration/goDebug.test.ts: accept 'exception' as stopped reason With the merge of https://github.com/go-delve/delve/pull/2444 the stopped reason for errors is now exception in order to support exception info requests. Change-Id: Ica2240837d8ef5c7de3e56e6f3030a1f0d1dcdf1 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320509 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit ad1dccef93852f55df3052eaab928e327965c67a) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/321489 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- test/integration/goDebug.test.ts | 33 +++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/test/integration/goDebug.test.ts b/test/integration/goDebug.test.ts index 5ef2e2d0e7..5ea7150e8d 100644 --- a/test/integration/goDebug.test.ts +++ b/test/integration/goDebug.test.ts @@ -1266,20 +1266,15 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { }; const debugConfig = await initializeDebugConfig(config); await Promise.all([ - dc - .waitForEvent('initialized') - .then(() => { - return dc.setExceptionBreakpointsRequest({ - filters: ['all'] - }); - }) - .then(() => { - return dc.configurationDoneRequest(); - }), - + dc.configurationSequence(), dc.launch(debugConfig), - - dc.assertStoppedLocation('panic', {}) + dc.waitForEvent('stopped').then((event) => { + assert( + event.body.reason === 'runtime error' || + event.body.reason === 'panic' || + event.body.reason === 'exception' + ); + }) ]); }); @@ -1303,7 +1298,11 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { dc.configurationSequence(), dc.launch(debugConfig), dc.waitForEvent('stopped').then((event) => { - assert(event.body.reason === 'runtime error' || event.body.reason === 'panic'); + assert( + event.body.reason === 'runtime error' || + event.body.reason === 'panic' || + event.body.reason === 'exception' + ); }) ]); }); @@ -1331,7 +1330,11 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { await Promise.all([ dc.nextRequest({ threadId: 1 }), dc.waitForEvent('stopped').then((event) => { - assert(event.body.reason === 'runtime error' || event.body.reason === 'panic'); + assert( + event.body.reason === 'runtime error' || + event.body.reason === 'panic' || + event.body.reason === 'exception' + ); }) ]); }); From 250bfb0831eaf97bc6dc3a4c6f85feafca35a802 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 17 May 2021 11:21:55 -0400 Subject: [PATCH 090/189] [release] src/goMain: warn users if go.goroot is set Warn users if this is an obviously invalid value (binary). Show information popup if go.goroot is configured. And, fixes a bug in v0.25.0 - missing await when checking whether the go.goroot value is a valid directory. Fixes golang/vscode-go#1501 Change-Id: I3487f4b089c9ba4fe34f36e5e033ae19d63537e2 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320429 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 9fa871b47ade360499791cbcdee15a2a9ceb2546) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320549 --- src/goMain.ts | 58 +++++++++++++++++++++++------- test/integration/statusbar.test.ts | 33 +++++++++++++++++ 2 files changed, 79 insertions(+), 12 deletions(-) diff --git a/src/goMain.ts b/src/goMain.ts index 28e4956a44..d03f8633a9 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -151,11 +151,11 @@ export async function activate(ctx: vscode.ExtensionContext) { const configGOROOT = getGoConfig()['goroot']; if (configGOROOT) { - const goroot = resolvePath(configGOROOT); - if (dirExists(goroot)) { - logVerbose(`setting GOROOT = ${goroot} because "go.goroot": "${configGOROOT}"`); - process.env['GOROOT'] = goroot; - } + // We don't support unsetting go.goroot because we don't know whether + // !configGOROOT case indicates the user wants to unset process.env['GOROOT'] + // or the user wants the extension to use the current process.env['GOROOT'] value. + // TODO(hyangah): consider utilizing an empty value to indicate unset? + await setGOROOTEnvVar(configGOROOT); } // Present a warning about the deprecation of the go.documentLink setting. @@ -440,7 +440,7 @@ If you would like additional configuration for diagnostics from gopls, please se ); ctx.subscriptions.push( - vscode.workspace.onDidChangeConfiguration((e: vscode.ConfigurationChangeEvent) => { + vscode.workspace.onDidChangeConfiguration(async (e: vscode.ConfigurationChangeEvent) => { if (!e.affectsConfiguration('go')) { return; } @@ -449,12 +449,7 @@ If you would like additional configuration for diagnostics from gopls, please se if (e.affectsConfiguration('go.goroot')) { const configGOROOT = updatedGoConfig['goroot']; if (configGOROOT) { - const goroot = resolvePath(configGOROOT); - const oldGoroot = process.env['GOROOT']; - if (oldGoroot !== goroot && dirExists(goroot)) { - logVerbose(`setting GOROOT = ${goroot} because "go.goroot": "${configGOROOT}"`); - process.env['GOROOT'] = goroot; - } + await setGOROOTEnvVar(configGOROOT); } } if ( @@ -997,3 +992,42 @@ function lintDiagnosticCollectionName(lintToolName: string) { } return `go-${lintToolName}`; } + +// set GOROOT env var. If necessary, shows a warning. +export async function setGOROOTEnvVar(configGOROOT: string) { + if (!configGOROOT) { + return; + } + const goroot = configGOROOT ? resolvePath(configGOROOT) : undefined; + + const currentGOROOT = process.env['GOROOT']; + if (goroot === currentGOROOT) { + return; + } + if (!(await dirExists(goroot))) { + vscode.window.showWarningMessage(`go.goroot setting is ignored. ${goroot} is not a valid GOROOT directory.`); + return; + } + const neverAgain = { title: "Don't Show Again" }; + const ignoreGOROOTSettingWarningKey = 'ignoreGOROOTSettingWarning'; + const ignoreGOROOTSettingWarning = getFromGlobalState(ignoreGOROOTSettingWarningKey); + if (!ignoreGOROOTSettingWarning) { + vscode.window + .showInformationMessage( + `"go.goroot" setting (${goroot}) will be applied and set the GOROOT environment variable.`, + neverAgain + ) + .then((result) => { + if (result === neverAgain) { + updateGlobalState(ignoreGOROOTSettingWarningKey, true); + } + }); + } + + logVerbose(`setting GOROOT = ${goroot} (old value: ${currentGOROOT}) because "go.goroot": "${configGOROOT}"`); + if (goroot) { + process.env['GOROOT'] = goroot; + } else { + delete process.env.GOROOT; + } +} diff --git a/test/integration/statusbar.test.ts b/test/integration/statusbar.test.ts index 8db7df14ba..b8dcf5f30c 100644 --- a/test/integration/statusbar.test.ts +++ b/test/integration/statusbar.test.ts @@ -26,6 +26,7 @@ import { getWorkspaceState, setWorkspaceState } from '../../src/stateUtils'; import { MockMemento } from '../mocks/MockMemento'; import ourutil = require('../../src/util'); +import { setGOROOTEnvVar } from '../../src/goMain'; describe('#initGoStatusBar()', function () { this.beforeAll(async () => { @@ -52,6 +53,38 @@ describe('#initGoStatusBar()', function () { }); }); +describe('#setGOROOTEnvVar', function () { + let origGOROOT = process.env['GOROOT']; + + this.beforeEach(() => { + origGOROOT = process.env['GOROOT']; + }); + + this.afterEach(() => { + if (origGOROOT) { + process.env['GOROOT'] = origGOROOT; + } else { + delete process.env.GOROOT; + } + }); + + it('empty goroot does not change GOROOT', async () => { + await setGOROOTEnvVar(''); + assert.strictEqual(process.env['GOROOT'], origGOROOT); + }); + + it('non-directory value is rejected', async () => { + await setGOROOTEnvVar(ourutil.getBinPath('go')); + assert.strictEqual(process.env['GOROOT'], origGOROOT); + }); + + it('directory value is accepted', async () => { + const goroot = path.join(path.dirname(ourutil.getBinPath('go')), '..'); + await setGOROOTEnvVar(goroot); + assert.strictEqual(process.env['GOROOT'], goroot); + }); +}); + describe('#setSelectedGo()', function () { this.timeout(40000); let sandbox: sinon.SinonSandbox | undefined; From 23de0240c257b66dd292d5ccf72f5d9f62735182 Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 13 May 2021 15:45:15 -0400 Subject: [PATCH 091/189] [release] src/goLogging: fix the default logger The default logger should output to console. Change-Id: I292102799fc1ba5989d3df577db4cd59db03e15a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/319889 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 961ab1c98262c203dec89970eb9019e3256e5058) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320649 Trust: Suzy Mueller --- src/goDebugFactory.ts | 2 ++ src/goLogging.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index 2e9b547889..ecb9ac4dc8 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -66,6 +66,8 @@ export class GoDebugAdapterTrackerFactory implements vscode.DebugAdapterTrackerF logger.info(`debug adapter exited: (code: ${code}, signal: ${signal})\n`) }; } + + dispose() {} } const TWO_CRLF = '\r\n\r\n'; diff --git a/src/goLogging.ts b/src/goLogging.ts index fb1bc9e7e3..9e6af42fb4 100644 --- a/src/goLogging.ts +++ b/src/goLogging.ts @@ -93,7 +93,7 @@ export interface LogConfig { let defaultLogger: Logger; export function setLogConfig(cfg: LogConfig) { - defaultLogger = new Logger(cfg.level); + defaultLogger = new Logger(cfg.level, undefined, true); } export function logError(msg: string) { From 112db0dc36733c6829f829d73f3a1ecdfc10d62e Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 20 May 2021 01:15:04 -0400 Subject: [PATCH 092/189] [release] src/goLint: fix type error caused by a bug in goLint When gopls's staticcheck is used, the check fails with a type error. workbench.desktop.main.js:2247 TypeError: Cannot read property 'then' of undefined at Object.check (/Users/hakim/.vscode-insiders/extensions/golang.go-0.25.0/dist/goMain.js:58418) at runBuilds (/Users/hakim/.vscode-insiders/extensions/golang.go-0.25.0/dist/goMain.js:64847) ... Callers of goLint expect Promise, so return a resolved promise in case we want to skip linting. Change-Id: I41c92ca9f6f6a9b961acb7f07504fbd20135fcad Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/321471 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit f22b65ab7baaf76bda2198a13ea5c60d7cf7e8f1) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/321492 Reviewed-by: Suzy Mueller --- src/goLint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/goLint.ts b/src/goLint.ts index 4bf6138f00..49b9178c41 100644 --- a/src/goLint.ts +++ b/src/goLint.ts @@ -61,7 +61,7 @@ export function goLint( ): Promise { const lintTool = goConfig['lintTool'] || 'staticcheck'; if (lintTool === 'staticcheck' && goplsStaticcheckEnabled(goConfig, goplsConfig)) { - return; + return Promise.resolve([]); } epoch++; From ca0b069a95d1a548ce372da34cd1c58b5bd0665f Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 21 May 2021 13:19:49 -0400 Subject: [PATCH 093/189] [release] src/goTools: update dlv-dap version @a25d95b Corresponds to https://go-review.googlesource.com/c/vscode-go/+/321834 I couldn't cherry pick the original CL because this code path was restructured for automation at master. Change-Id: I439be1f00d555471628652081030286028785b86 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/321837 Trust: Hyang-Ah Hana Kim Trust: Suzy Mueller Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- src/goTools.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/goTools.ts b/src/goTools.ts index 5c04b9c229..7f97d1a9ee 100644 --- a/src/goTools.ts +++ b/src/goTools.ts @@ -450,8 +450,8 @@ export const allToolsInformation: { [key: string]: Tool } = { 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 - latestVersion: semver.parse('1.6.1-0.20210504195617-c5d58f494a26'), - latestVersionTimestamp: moment('2021-05-04', 'YYYY-MM-DD') + latestVersion: semver.parse('v1.6.2-0.20210521082917-a25d95bd236e'), + latestVersionTimestamp: moment('2021-05-21', 'YYYY-MM-DD') }, 'fillstruct': { name: 'fillstruct', From be02b162b7eeac151b2f29ddb08e40e82d144f09 Mon Sep 17 00:00:00 2001 From: Todd Kulesza Date: Mon, 17 May 2021 13:17:04 -0700 Subject: [PATCH 094/189] [release] src/goSurvey: increase the prompt probability to 0.03 Change-Id: I4f15d6e8135407e2821de2a8f12b968deb8af0e4 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320589 Reviewed-by: Hyang-Ah Hana Kim Trust: Hyang-Ah Hana Kim Trust: Rebecca Stambler (cherry picked from commit 45107731b406e0307dd7d5744fc83d02ea896908) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/321838 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler TryBot-Result: kokoro --- src/goSurvey.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/goSurvey.ts b/src/goSurvey.ts index eb027603bb..56385c3342 100644 --- a/src/goSurvey.ts +++ b/src/goSurvey.ts @@ -7,7 +7,7 @@ 'use strict'; import vscode = require('vscode'); -import { getLocalGoplsVersion, isInPreviewMode, lastUserAction, latestConfig } from './goLanguageServer'; +import { getLocalGoplsVersion, lastUserAction, latestConfig } from './goLanguageServer'; import { outputChannel } from './goStatus'; import { extensionId } from './const'; import { getFromGlobalState, getFromWorkspaceState, updateGlobalState } from './stateUtils'; @@ -103,14 +103,12 @@ export function shouldPromptForSurvey(now: Date, cfg: SurveyConfig): SurveyConfi } // This is the first activation this month (or ever), so decide if we // should prompt the user. This is done by generating a random number in - // the range [0, 1) and checking if it is < probability, which varies - // depending on whether the default or the nightly is in use. + // the range [0, 1) and checking if it is < probability. // We then randomly pick a day in the rest of the month on which to prompt // the user. - let probability = 0.01; // lower probability for the regular extension - if (isInPreviewMode()) { - probability = 0.0275; - } + // Probability is set based on the # of responses received, and will be + // decreased if we begin receiving > 200 responses/month. + const probability = 0.03; cfg.promptThisMonth = Math.random() < probability; if (cfg.promptThisMonth) { // end is the last day of the month, day is the random day of the From c81084ce9180f093cf5fbdc8714d318542d31092 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 17 May 2021 11:36:18 -0400 Subject: [PATCH 095/189] [release] src/goSurvey: double survey probability and send half to v2 survey Change-Id: I1fc2664d7f28bf2653dc60c3fe468c04802e2306 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/320431 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit cbdd3280a012791a7abfd2b66d9bf82dabfc57b3) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/321839 Reviewed-by: Robert Findley --- src/goSurvey.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/goSurvey.ts b/src/goSurvey.ts index 56385c3342..616935807a 100644 --- a/src/goSurvey.ts +++ b/src/goSurvey.ts @@ -108,7 +108,9 @@ export function shouldPromptForSurvey(now: Date, cfg: SurveyConfig): SurveyConfi // the user. // Probability is set based on the # of responses received, and will be // decreased if we begin receiving > 200 responses/month. - const probability = 0.03; + // Doubled the probability for survey v2 experiment. + // TODO(hyangah): switch back to 0.03. + const probability = 0.03 * 2; cfg.promptThisMonth = Math.random() < probability; if (cfg.promptThisMonth) { // end is the last day of the month, day is the random day of the @@ -149,11 +151,11 @@ Could you help us improve this extension by filling out a 1-2 minute survey abou cfg.prompt = true; const goplsEnabled = latestConfig.enabled; const usersGoplsVersion = await getLocalGoplsVersion(latestConfig); - await vscode.env.openExternal( - vscode.Uri.parse( - `https://google.qualtrics.com/jfe/form/SV_ekAdHVcVcvKUojX?usingGopls=${goplsEnabled}&gopls=${usersGoplsVersion}&extid=${extensionId}` - ) - ); + const surveyURL = + Math.random() < 0.5 + ? `https://google.qualtrics.com/jfe/form/SV_ekAdHVcVcvKUojX?usingGopls=${goplsEnabled}&gopls=${usersGoplsVersion}&extid=${extensionId}` // v1 + : `https://google.qualtrics.com/jfe/form/SV_8kbsnNINPIQ2QGq?usingGopls=${goplsEnabled}&gopls=${usersGoplsVersion}&extid=${extensionId}`; // v2 + await vscode.env.openExternal(vscode.Uri.parse(surveyURL)); } break; case 'Not now': From 54befee140367aeffa65c81c80b8a38104712c3e Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 21 May 2021 15:26:35 -0400 Subject: [PATCH 096/189] [release] package.json: prepare v0.25.1 Change-Id: I2670c56369d7f2ec622109e75c059a8de31eba7c Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/321843 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller TryBot-Result: kokoro --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 06162f869d..5117a0bf1b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.25.0", + "version": "0.25.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 9cc39c060b..4faf38c7c5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.25.0", + "version": "0.25.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 9df20266eb6b7230ecaeb726bfab44d5ac8d099c Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 24 May 2021 10:46:50 -0400 Subject: [PATCH 097/189] [release] CHANGELOG.md: v0.25.1 updates Change-Id: Ie3f359e9475400f0b5e888921917a8008b6307f5 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/322289 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit c5070dc0828f486ce9d6100a1ce02cdc0cf9f52b) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/322410 --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f130c591ea..095113a346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +## v0.25.1 - 24 May, 2021 + +A list of all issues and changes can be found in the [v0.25.1 milestone](https://github.com/golang/vscode-go/issues?q=is%3Aissue+milestone%3Av0.25.1+is%3Aclosed). + +### Fixes +- Change the default path separator to `/` when applying `substitutePath` debug configuration. ([Issue 1497](https://github.com/golang/vscode-go/issues/1497)) +- Warn users when `go.goroot` setting is used. ([Issue 1501](https://github.com/golang/vscode-go/issues/1501)) + +### Enhancements +- Update to latest version of `dlv-dap`. Some of newest additions to `dlv dap` include optimized function detection, exception info, pause, function breakpoints while running, evaluate over hover, set variables. Documentation of current features and limitations can be found in [the documentation](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md). +- Adjusted feedback survey prompt probability. + +### Thanks +Thanks for the contribution, @suzmue, @fflewddur! + ## v0.25.0 - 12 May, 2021 A list of all issues and changes can be found in the From 1912767f71910d3e820a370b68477dff98cfdf40 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 14 Jun 2021 21:01:44 -0400 Subject: [PATCH 098/189] [release] update LICENSE Auto-generated by running $ git checkout release $ tools/license.sh $ mv LICENSE.prod LICENSE is-*-object repositories were migrated from ljharb to inspect-js org. faye-websocket copyright was changed. Change-Id: I616dbad60ae2b9f154ef6eb8352f18ed8a95ce78 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/327989 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Rebecca Stambler TryBot-Result: kokoro --- LICENSE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 192a023fd6..ffdfd0b02d 100644 --- a/LICENSE +++ b/LICENSE @@ -658,7 +658,7 @@ SOFTWARE. ----- -The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, is-typed-array, which-typed-array. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/ljharb/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/ljharb/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/inspect-js/is-typed-array.git (is-typed-array), git://github.com/inspect-js/which-typed-array.git (which-typed-array). This software contains the following license and notice below: +The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, is-typed-array, which-typed-array. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/inspect-js/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/inspect-js/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/inspect-js/is-typed-array.git (is-typed-array), git://github.com/inspect-js/which-typed-array.git (which-typed-array). This software contains the following license and notice below: The MIT License (MIT) @@ -816,7 +816,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following software may be included in this product: faye-websocket. A copy of the source code may be downloaded from git://github.com/faye/faye-websocket-node.git. This software contains the following license and notice below: -Copyright 2010-2019 James Coglan +Copyright 2010-2021 James Coglan Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the From 7369e6541ae95cbaa4b758c907547654cc7c8090 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 14 Jun 2021 21:17:29 -0400 Subject: [PATCH 099/189] [release] src/goToolsInformation: update dlv-dap@688f94a Auto-generated by running: go run tools/generate.go --tools 688f94a4 service/dap: truncate value for expandable types in hover (#2529) aa377789 service/dap: deemphasize internal runtime stack frames (#2522) 30b3cc2c service/dap: implement array, slice, and map paging (#2512) fb4d6f11 service/dap: handle no-such-process error on disconnect and fix flaky test (#2476) Change-Id: I95b28be88b71b48e4e53635477f272595e791723 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/327991 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 27bbf42a1523cadb19fad21e0f9d7c316b625684) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/328269 Reviewed-by: Polina Sokolova --- src/goToolsInformation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/goToolsInformation.ts b/src/goToolsInformation.ts index 401ee501b6..9f9fd76fa3 100644 --- a/src/goToolsInformation.ts +++ b/src/goToolsInformation.ts @@ -224,8 +224,8 @@ export const allToolsInformation: { [key: string]: Tool } = { 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 - latestVersion: semver.parse('v1.6.2-0.20210604153550-7a3faca71f7e'), - latestVersionTimestamp: moment('2021-06-04', 'YYYY-MM-DD') + latestVersion: semver.parse('v1.6.2-0.20210611174649-688f94a4f838'), + latestVersionTimestamp: moment('2021-06-11', 'YYYY-MM-DD') }, 'fillstruct': { name: 'fillstruct', From 1034512f851c8fb3ea814140c653641393921df4 Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 16 Jun 2021 14:57:25 -0400 Subject: [PATCH 100/189] [release] CHANGELOG.md: v0.26.0 change log & mention dlv-dap in README.md Updates golang/vscode-go#1557 Change-Id: If33b602a7afb69dfa45999568200919769c91483 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/328674 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 689bf6ff329dc926723262296da17d45e9a287b6) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/328829 Reviewed-by: Ian Cottrell --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ README.md | 5 ++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 095113a346..d2f8be8729 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +## V0.26.0 - 17 Jun, 2021 + +📣 [`Delve`'s native DAP implementation](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) is now available for use. In order to use this new debug adapter (`dlv-dap`) when debugging Go programs, add the following settings in your `settings.json`: + +```json5 + "go.delveConfig": { + "debugAdapter": "dlv-dap", + }, +``` + +Please learn more about [the new adapter's features and configuration parameters](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md), and share your feedback and report the issues in our issue tracker. + +A list of all issues and changes can be found in the [v0.26.0 milestone](https://github.com/golang/vscode-go/milestone/30?closed=1) and [commit history](https://github.com/golang/vscode-go/compare/v0.25.1...v0.26.0). + +### Enhancements +- `dlv-dap` is ready for use in local debugging. +- Added the new `"Go: Test Function At Cursor or Test Previous"` command. ([PR 1509](https://github.com/golang/vscode-go/pull/1509)) +- `"Go: Add Imports"` command uses `gopls` instead of `gopkg`. This requires `gopls@v0.7.0` or newer. ([Go Issue 43351](https://github.com/golang/go/issues/43351)) + +### Fixes +- Fixed `"Go: Lint Workspace"` that failed no editor is active. ([Issue 1520](https://github.com/golang/vscode-go/issues/1520)) +- Fixed `gopls` crash caused by Untitled files. ([Issue 1559](https://github.com/golang/vscode-go/issues/1559)) + +### Thanks +Thanks for your contributions, @mislav, @marwan-at-work, @findleyr, @lggomez, @fflewddur, @suzmue, @hyangah! + ## v0.25.1 - 24 May, 2021 A list of all issues and changes can be found in the [v0.25.1 milestone](https://github.com/golang/vscode-go/issues?q=is%3Aissue+milestone%3Av0.25.1+is%3Aclosed). diff --git a/README.md b/README.md index 05b76df0d2..d68e749339 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,8 @@ provides rich language support for the [Go programming language](https://golang.org/). -> 📣 Gopls, the official Go language server, is now enabled in VS Code by default. -> Gopls replaces several legacy tools to provide IDE features while editing Go code. -> See [issue 1037](https://github.com/golang/vscode-go/issues/1037) for more information. +> 📣 Debugging using [`Delve`'s native DAP implementation](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) is now available for use.
    +> Please test it by following [the instruction to enable this new feature](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#getting-started) and share your feedback! ## Quick Start From fcf9b099bb7c512e6c1aafd42bb4e46c26f5a37b Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 5 Aug 2021 19:48:56 -0400 Subject: [PATCH 101/189] [release] CHANGELOG.md: fix broken markdown and links Change-Id: Ic140024fd46b54459774fcd238046140b7e4341f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/340117 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b495639ee5..6e2b08c9ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ to show the new features available with dlv-dap. This change does not apply to r For remote debugging, keep following the instruction in the [legacy debug adapter documentation](https://github.com/golang/vscode-go/blob/master/docs/debugging-legacy.md). -A list of all issues and changes can be found in the [v0.27.0 milestone](https://github.com/golang/vscode-go/milestone/33?closed=1) and [commit history](A list of all issues and changes can be found in the [v0.26.0 milestone](https://github.com/golang/vscode-go/milestone/30?closed=1) and [commit history](https://github.com/golang/vscode-go/compare/v0.27.0...v0.26.0). +A list of all issues and changes can be found in the [v0.27.0 milestone](https://github.com/golang/vscode-go/milestone/33?closed=1) and [commit history](https://github.com/golang/vscode-go/compare/v0.26.0...v0.27.0). ### Enhancements - The new [`go.terminal.activateEnvironment`](https://github.com/golang/vscode-go/blob/master/docs/settings.md#goterminalactivateenvironment) From e4419ec90e0c5289e5e32953cfbc64be5e3fdca8 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Thu, 5 Aug 2021 19:10:16 -0600 Subject: [PATCH 102/189] src/goDebugFactory.ts: direct users to use 'debugServer' for remote In order to prevent users from accidentally stumbling upon trying to connect to a dlv dap instance, disable support for specifying host and port for a delve dap server. Users can still connect to a running server by specifying 'debugServer'. Update documentation to use the preferred "debugServer" instead of "port". Change-Id: I51c4c5c6212a5f5d823d93a85ec040d44956ca9f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/340329 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 45b06e08902f075b196419afd1fa179c1482a0fa) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/340550 Run-TryBot: Hyang-Ah Hana Kim Trust: Hyang-Ah Hana Kim --- docs/debugging.md | 54 ++++--------------------------------- package.json | 8 +++--- src/goDebugConfiguration.ts | 6 +++++ src/goDebugFactory.ts | 3 --- 4 files changed, 15 insertions(+), 56 deletions(-) diff --git a/docs/debugging.md b/docs/debugging.md index 3027b2d133..baff27bde5 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -245,12 +245,12 @@ Here is the list of attributes specific to Go debugging. | `dlvFlags` | Extra flags for `dlv`. See `dlv help` for the full list of supported. Flags such as `--log-output`, `--log`, `--log-dest`, `--api-version`, `--output`, `--backend` already have corresponding properties in the debug configuration, and flags such as `--listen` and `--headless` are used internally. If they are specified in `dlvFlags`, they may be ignored or cause an error.
    |
    _same as Launch_
    | | `env` | Environment variables passed to the program.
    |
    _n/a_
    | | `envFile` | Absolute path to a file containing environment variable definitions. Multiple files can be specified by provided an array of absolute paths
    (Default: `${workspaceFolder}/.env`)
    |
    _n/a_
    | -| `host` | The host name of the machine the delve debugger will be listening on. In `dlv-dap` mode, the extension will look for a delve DAP server running on the specified host:port so users are responsible for starting the server.
    (Default: `"127.0.0.1"`)
    |
    _same as Launch_
    | +| `host` | The host name of the machine the delve debugger will be listening on.
    (Default: `"127.0.0.1"`)
    |
    _same as Launch_
    | | `logDest` | dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode, and on Linux and Mac OS.
    | dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode and on Linux and Mac OS.
    | | `logOutput` | Comma separated list of components that should produce debug output. Maps to dlv's `--log-output` flag. Check `dlv log` for details.

    Allowed Values: `"debugger"`, `"gdbwire"`, `"lldbout"`, `"debuglineerr"`, `"rpc"`, `"dap"`
    (Default: `"debugger"`)
    |

    _same as Launch_
    | | `mode` | One of `auto`, `debug`, `test`, `exec`. In `auto` mode, the extension will choose either `debug` or `test` depending on active editor window.

    Allowed Values: `"auto"`, `"debug"`, `"test"`, `"exec"`
    (Default: `auto`)
    | Indicates local or remote debugging. Local maps to the `dlv attach` command, remote maps to `connect`. `remote` is not supported in `dlv-dap` mode currently. Use `host` and `port` instead.

    Allowed Values: `"local"`, `"remote"`
    (Default: `local`)
    | | `output` | Output path for the binary of the debugee.
    (Default: `"debug"`)
    |

    _n/a_
    | -| `port` | The port that the delve debugger will be listening on. In `dlv-dap` mode, the extension will look for a delve DAP server running on the specified host:port so users are responsible for starting the server.
    (Default: `2345`)
    |
    _same as Launch_
    | +| `port` | The port that the delve debugger will be listening on.
    (Default: `2345`)
    |
    _same as Launch_
    | | `processId` |
    _n/a_
    |

    Option 1: Use process picker to select a process to attach, or Process ID as integer.

    Allowed Values: `"${command:pickProcess}"`, `"${command:pickGoProcess}"`

    Option 2: Attach to a process by name. If more than one process matches the name, use the process picker to select a process.

    Option 3: The numeric ID of the process to be debugged. If 0, use the process picker to select a process.

    (Default: `0`)
    | | `program` | Path to the program folder (or any go file within that folder) when in `debug` or `test` mode, and to the pre-built binary file to debug in `exec` mode. If it is not an absolute path, the extension interpretes it as a workspace relative path.
    (Default: `"${workspaceFolder}"`)
    |

    _n/a_
    | | `remotePath` |
    _n/a_
    | (Deprecated) *Use `substitutePath` instead.*
    The path to the source code on the remote machine, when the remote path is different from the local machine. If specified, becomes the first entry in substitutePath.
    (Default: `""`)
    | @@ -349,58 +349,14 @@ If you want to explicitly specify the location of the delve binary, use the `go. > If you are able to use the [Remote Development](https://aka.ms/vscode-remote/download/extension) extensions and VS Code’s universal [remote development capabilities](https://code.visualstudio.com/docs/remote/remote-overview), that is the recommended way to debug Go programs remotely. Check out [Getting started](https://code.visualstudio.com/docs/remote/remote-overview#_getting-started) section and [Remote tutorials](https://code.visualstudio.com/docs/remote/remote-overview#_remote-tutorials) to learn more. -Remote debugging is the debug mode intended to work with a debugger and target running on a different machine or a container. Support for remote debugging using Delve’s native DAP implementation is still a work-in-progress. This section describes a current temporary workaround and its limitations. If the following workaround is not working for your case, please file an issue and help us understand remote debugging use cases better. - -

    Remote Debugging

    - -When using the dlv-dap mode, the delve instance running remotely needs to be able to process DAP requests, instead of the traditional JSON-RPC, used with an external `dlv --headless` server. The following command starts a Delve DAP server on port 12345 that is ready to accept a request from an editor such as VS Code for launching or attaching to a target. - -``` -$ dlv-dap dap --listen=:12345 -``` - -Use the following `launch` configuration to tell `dlv-dap` to execute a binary precompiled with `-gcflags='all=-N -l'`: - -```json5 -{ - "name": "Connect to server (DAP)", - "type": "go", - "debugAdapter": "dlv-dap", - "request": "launch", - "port": 12345, - "host": "127.0.0.1", - "mode": "exec", - "program": "/absolute/path/to/remote/workspace/program/executable", - "substitutePath": [ - { "from": ${workspaceFolder}, "to": "/path/to/remote/workspace" }, - ... - ] -} -``` - -Or have the binary compiled by dlv-dap by modifying the above configuration to use: - -```json5 - "mode": "debug", - "program": "/absolute/path/to/remote/workspace/package", -``` - -When seeing the `"port"` attribute being used in the launch request, Go extension will assume a Delve DAP server is started externally and accessible through the specified `host:port` and tell VS Code to connect to it directly. The `program` attribute must point to the absolute path to the package or binary to debug in the remote host’s file system even when `substitutePath` is specified. - -⚠️ Limitations -* Unlike `dlv --headless` commands traditionally used for remote debugging scenarios, Delve’s new `dap` sub command does not launch or attach to the debuggee process until it receives a Launch/Attach request. We understand this limitation, and we are currently working on addressing this limitation. -* Anyone who can connect to the Delve DAP server’s host:port can exploit it to run arbitrary programs. -* When using `"attach"` requests, you will need to specify the `processId` since -[the processId resolution feature](#attach) cannot gather process information running remotely. -* Delve DAP does not support `--allow-multiclient` or `--continue` flags yet, which means after a debug session ends, the dlv-dap process will exit. -* If you use `debug` or `test` mode `launch` requests, Delve builds the target binary. Delve tries to build the target from the directory where the `dlv` (or `dlv-dap`) process is running, so make sure to run the `dlv-dap` command from the directory you’d run the `go build` or `go test` command. +🚧 Remote debugging is the debug mode intended to work with a debugger and target running on a different machine or a container. Support for remote debugging using Delve’s native DAP implementation is still a work-in-progress. Please fall back to the `legacy` debug adapter. ### Running Debugee Externally Sometimes you’d like to launch the program for debugging outside VS Code (e.g., as a workaround of the missing `console` support), there are currently two options. * Compile and run the program from the external terminal and use [the "attach" configuration](#attach). -* Use ["Remote Debugging"](#remote-debugging); run `dlv-dap dap --listen=:` from the external terminal, and set the `"port"` attribute in your launch configuration. +* Launch the server externally; run `dlv-dap dap --listen=:` from the external terminal, and set the `"debugServer": ` attribute in your launch configuration. ## Reporting Issues @@ -463,7 +419,7 @@ $ dlv-dap dap --listen=:12345 --log --log-output=dap "request": "launch", "debugAdapter": "dlv-dap", ... - "port": 12345 + "debugServer": 12345, } ``` diff --git a/package.json b/package.json index c1a7244712..118b6a2529 100644 --- a/package.json +++ b/package.json @@ -608,12 +608,12 @@ }, "port": { "type": "number", - "description": "The port that the delve debugger will be listening on. In `dlv-dap` mode, the extension will look for a delve DAP server running on the specified host:port so users are responsible for starting the server.", + "description": "The port that the delve debugger will be listening on.", "default": 2345 }, "host": { "type": "string", - "description": "The host name of the machine the delve debugger will be listening on. In `dlv-dap` mode, the extension will look for a delve DAP server running on the specified host:port so users are responsible for starting the server.", + "description": "The host name of the machine the delve debugger will be listening on.", "default": "127.0.0.1" }, "trace": { @@ -800,12 +800,12 @@ }, "port": { "type": "number", - "description": "The port that the delve debugger will be listening on. In `dlv-dap` mode, the extension will look for a delve DAP server running on the specified host:port so users are responsible for starting the server.", + "description": "The port that the delve debugger will be listening on.", "default": 2345 }, "host": { "type": "string", - "description": "The host name of the machine the delve debugger will be listening on. In `dlv-dap` mode, the extension will look for a delve DAP server running on the specified host:port so users are responsible for starting the server.", + "description": "The host name of the machine the delve debugger will be listening on.", "default": "127.0.0.1" }, "substitutePath": { diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts index 25aa9e38b6..c2da764758 100644 --- a/src/goDebugConfiguration.ts +++ b/src/goDebugConfiguration.ts @@ -157,6 +157,12 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr // for local mode, default to dlv-dap. debugConfiguration['debugAdapter'] = debugConfiguration['mode'] !== 'remote' ? 'dlv-dap' : 'legacy'; } + if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['port']) { + this.showWarning( + 'ignorePortInDlvDapWarning', + "`port` is ignored with the 'dlv-dap' debugAdapter, which does not yet support remote debugging. Please file an issue if you have a use case that requires port." + ); + } if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['mode'] === 'remote') { this.showWarning( 'ignoreDlvDAPInRemoteModeWarning', diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index 0ec2d28149..a01cf9eb99 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -38,9 +38,6 @@ export class GoDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr private async createDebugAdapterDescriptorDlvDap( configuration: vscode.DebugConfiguration ): Promise> { - if (configuration.port) { - return new vscode.DebugAdapterServer(configuration.port, configuration.host ?? '127.0.0.1'); - } const logger = new TimestampedLogger(configuration.trace, this.outputChannel); const d = new DelveDAPOutputAdapter(configuration, logger); return new vscode.DebugAdapterInlineImplementation(d); From e90541a2dbbff94b92dff83505a3539a2f2103bc Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 9 Aug 2021 09:56:37 -0400 Subject: [PATCH 103/189] [release] CHANGELOG.md: mention the removal of 'port' support in dlv-dap And fix the release date. Change-Id: I86395b846ce70198dc4098cfac603fef4397dde5 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/340829 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- CHANGELOG.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e2b08c9ae..9f53ac6f63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## v0.27.0 - 8 Aug, 2021 +## v0.27.0 - 9 Aug, 2021 📣 Delve's native DAP implementation ([`dlv-dap`](https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_dap.md)) is enabled by default for local debugging. We updated the [Documentation for Debugging](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) @@ -22,7 +22,10 @@ command prints the build information of detected tools. - Debugging - Setting the `logOutput` property without `showLog: true` does not break debugging any more. - Fixed a bug in the legacy debug adapter that caused jumping at each step after upgrading to VS Code 1.58+. ([Issue 1617](https://github.com/golang/vscode-go/issues/1617), [1647](https://github.com/golang/vscode-go/issues/1647)) - - Fixed a bug that broke Attach mode debugging using the legacy debug adapter if `cwd` is not set. ([Issue 1608](https://github.com/golang/vscode-go/issues/1608)) + - Fixed a bug that broke Attach mode debugging using the legacy debug adapter if `cwd` is not set. ([Issue 1608](https://github.com/golang/vscode-go/issues/1608)) + - Made the `dlv-dap` mode ignore the `port` property. It was initially suggested as a temporary alternative + to the remote debugging, but we decided to revisit the functionality for better remote debugging support. + Use the `debugServer` property if you want to connect to a manually launched `dlv dap` server. ### Code Health - The version of `dlv-dap` is pinned to [v1.7.1-0.20210804080032-f95340ae1bf9](https://github.com/go-delve/delve/tree/f95340ae1bf9fed8740d5fd39f5758d41770d967) and `dlv-dap` is marked as a required tool. From 457fad3f73bde59edeca5da060b12242dc732c72 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Mon, 9 Aug 2021 11:04:48 -0600 Subject: [PATCH 104/189] package.json: use fileDirname for Launch Package snippet Change the snippet to match the quick pick. Change-Id: I4c2ab7ced9244b452b96d4d37e41e41ade79477d Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/340909 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit cd72252b1f88a434ccb4c7736cd13fb981eb2507) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/340910 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 118b6a2529..a768597cae 100644 --- a/package.json +++ b/package.json @@ -464,7 +464,7 @@ "type": "go", "request": "launch", "mode": "auto", - "program": "^\"\\${workspaceFolder}${1:}\"" + "program": "^\"\\${fileDirname}${1:}\"" } }, { From 0aef5fbcec355ef4f2254245eef36b6ca46092e0 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Tue, 10 Aug 2021 11:01:16 -0600 Subject: [PATCH 105/189] src/goDebugFactory: log errors without killing delve process Certain errors on dlv launch are expected / accepted. Don't kill the debug session. Fixes golang/vscode-go#1678 Change-Id: I2cd835c04d2f4f261c6a4b9ac9c965a5b9beea85 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341209 Trust: Suzy Mueller Trust: Hyang-Ah Hana Kim Run-TryBot: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim TryBot-Result: kokoro (cherry picked from commit 6a6fdb6ba740f73140be14ad5c31f9d64b7ebe33) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341229 --- src/goDebugFactory.ts | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index a01cf9eb99..af39b58c47 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -57,7 +57,7 @@ export class GoDebugAdapterTrackerFactory implements vscode.DebugAdapterTrackerF onWillStartSession: () => logger.debug(`session ${session.id} will start with ${JSON.stringify(session.configuration)}\n`), onWillReceiveMessage: (message: any) => logger.trace(`client -> ${JSON.stringify(message)}\n`), - onDidSendMessage: (message: any) => logger.trace(`client <- ${JSON.stringify(message)}\n`), + onDidSendMessage: (message: any) => logger.trace(`client <- ${JSON.stringify(message)}\n`), onError: (error: Error) => logger.error(`error: ${error}\n`), onWillStopSession: () => logger.debug(`session ${session.id} will stop\n`), onExit: (code: number | undefined, signal: string | undefined) => @@ -427,43 +427,26 @@ function spawnDlvDapServerProcess( 5_000 ); - const stopWaitingForServerToStart = (err?: string) => { + const stopWaitingForServerToStart = () => { clearTimeout(timeoutToken); started = true; - if (err) { - logConsole(`Failed to start 'dlv': ${err}\nKilling the dlv process...`); - killProcessTree(p); // We do not need to wait for p to actually be killed. - reject(new Error(err)); - } else { - resolve(p); - } + resolve(p); }; p.stdout.on('data', (chunk) => { const msg = chunk.toString(); - if (!started) { - if (msg.startsWith('DAP server listening at:')) { - stopWaitingForServerToStart(); - } else { - stopWaitingForServerToStart(`Unexpected output from dlv dap on start: '${msg}'`); - } + if (!started && msg.startsWith('DAP server listening at:')) { + stopWaitingForServerToStart(); } log(msg); }); p.stderr.on('data', (chunk) => { - if (!started) { - stopWaitingForServerToStart(`Unexpected error from dlv dap on start: '${chunk.toString()}'`); - } logErr(chunk.toString()); }); p.stdio[3].on('data', (chunk) => { const msg = chunk.toString(); - if (!started) { - if (msg.startsWith('DAP server listening at:')) { - stopWaitingForServerToStart(); - } else { - stopWaitingForServerToStart(`Expected 'DAP server listening at:' from debug adapter got '${msg}'`); - } + if (!started && msg.startsWith('DAP server listening at:')) { + stopWaitingForServerToStart(); } if (logDestStream) { // always false on windows. @@ -489,9 +472,6 @@ function spawnDlvDapServerProcess( // respond to disconnect on time. In that case, it's possible that the session // is in the middle of teardown and DEBUG CONSOLE isn't accessible. Check // Go Debug output channel. - if (!started) { - stopWaitingForServerToStart(`dlv dap terminated with code: ${code} signal: ${signal}\n`); - } if (typeof code === 'number') { // The process exited on its own. logConsole(`dlv dap (${p.pid}) exited with code: ${code}\n`); @@ -502,9 +482,6 @@ function spawnDlvDapServerProcess( } }); p.on('error', (err) => { - if (!started) { - stopWaitingForServerToStart(`Unexpected error from dlv dap on start: '${err}'`); - } if (err) { logConsole(`Error: ${err}\n`); } From 8ee5144d195c079e13be8ab25cd3a69b623acf9b Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Tue, 10 Aug 2021 13:28:17 -0600 Subject: [PATCH 106/189] src/goDebugConfiguration: convert processId to int The result of using the process picker commands ends up with a string in the launch config, but the processId needs to be an integer. Convert the string to an integer after the command has been run. Fixes golang/vscode-go#1679 Change-Id: I97aeab6a150e5af36eb58eb14b70e3ee5ac53a74 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341210 Trust: Suzy Mueller Trust: Hyang-Ah Hana Kim Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 336b9f7d11ec476cfc73ce8c67c943fc0a20c4a7) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341230 Run-TryBot: Hyang-Ah Hana Kim --- src/goDebugConfiguration.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts index c2da764758..d21a710dcd 100644 --- a/src/goDebugConfiguration.ts +++ b/src/goDebugConfiguration.ts @@ -20,7 +20,7 @@ import { } from './goInstallTools'; import { packagePathToGoModPathMap } from './goModules'; import { getTool, getToolAtVersion } from './goTools'; -import { pickProcess, pickProcessByName } from './pickProcess'; +import { pickGoProcess, pickProcess, pickProcessByName } from './pickProcess'; import { getFromGlobalState, updateGlobalState } from './stateUtils'; import { getBinPath, getGoVersion } from './util'; import { parseEnvFiles } from './utils/envUtils'; @@ -313,16 +313,13 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr if (debugConfiguration.request === 'attach' && debugConfiguration['mode'] === 'local') { if (!debugConfiguration['processId'] || debugConfiguration['processId'] === 0) { // The processId is not valid, offer a quickpick menu of all processes. - debugConfiguration['processId'] = parseInt(await pickProcess(), 10); + debugConfiguration['processId'] = await pickProcess(); } else if ( typeof debugConfiguration['processId'] === 'string' && debugConfiguration['processId'] !== '${command:pickProcess}' && debugConfiguration['processId'] !== '${command:pickGoProcess}' ) { - debugConfiguration['processId'] = parseInt( - await pickProcessByName(debugConfiguration['processId']), - 10 - ); + debugConfiguration['processId'] = await pickProcessByName(debugConfiguration['processId']); } } return debugConfiguration; @@ -398,6 +395,15 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr debugConfiguration[attr] = path.join(workspaceRoot, debugConfiguration[attr]); }); } + + if (debugConfiguration.request === 'attach' && debugConfiguration['mode'] === 'local') { + // processId needs to be an int, but the substituted variables from pickGoProcess and pickProcess + // become a string. Convert any strings to integers. + if (typeof debugConfiguration['processId'] === 'string') { + debugConfiguration['processId'] = parseInt(debugConfiguration['processId'], 10); + } + } + return debugConfiguration; } From ee54b02a7f9f7e82e005ab080831c1ee9c0dfb90 Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 11 Aug 2021 14:51:35 -0400 Subject: [PATCH 107/189] [release] src/goToolsInformation: use the commit hash to pin dlv-dap version We cannot rely on pseudo-version reliably yet. Fixes golang/vscode-go#1682 Change-Id: Ibf36627d9f5755f513876751bbab6ce62d135e56 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341529 Trust: Hyang-Ah Hana Kim Trust: Suzy Mueller Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 46b3efea04d380a71ba32632ac27ca00ca0b5f63) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341609 --- src/goDebugFactory.ts | 1 - src/goToolsInformation.ts | 2 +- test/integration/install.test.ts | 10 ++++------ tools/generate.go | 26 +++++++++++++++++++++++++- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index af39b58c47..01f77c10fa 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -8,7 +8,6 @@ import { ChildProcess, ChildProcessWithoutNullStreams, spawn } from 'child_proce import stream = require('stream'); import vscode = require('vscode'); import { OutputEvent, TerminatedEvent } from 'vscode-debugadapter'; -import { killProcessTree } from './utils/processUtils'; import getPort = require('get-port'); import path = require('path'); import * as fs from 'fs'; diff --git a/src/goToolsInformation.ts b/src/goToolsInformation.ts index 04afe9ff93..17857261b2 100644 --- a/src/goToolsInformation.ts +++ b/src/goToolsInformation.ts @@ -223,7 +223,7 @@ export const allToolsInformation: { [key: string]: Tool } = { replacedByGopls: false, isImportant: true, description: 'Go debugger & debug adapter (Delve DAP)', - defaultVersion: 'v1.7.1-0.20210804080032-f95340ae1bf9', // pinned version + defaultVersion: 'f95340ae1bf9', // pinned version minimumGoVersion: semver.coerce('1.12'), // dlv requires 1.12+ for build latestVersion: semver.parse('v1.7.1-0.20210804080032-f95340ae1bf9'), latestVersionTimestamp: moment('2021-08-04', 'YYYY-MM-DD') diff --git a/test/integration/install.test.ts b/test/integration/install.test.ts index 00eaef336a..ed8f0f64a1 100644 --- a/test/integration/install.test.ts +++ b/test/integration/install.test.ts @@ -213,14 +213,12 @@ function buildFakeProxy(testCases: installationTestCase[]) { fs.writeFileSync(path.join(dir, 'list'), `${versions.join('\n')}\n`); versions.map((version) => { - if (version === 'master') { - // for dlv-dap that retrieves the version from master + if (!version.match(/^v\d+\.\d+\.\d+/)) { + // for dlv-dap that retrieves the version from a revision (commit hash) const resolvedVersion = tool.latestVersion?.toString() || '1.0.0'; + const infoPath = path.join(dir, `${version}.info`); version = `v${resolvedVersion}`; - fs.writeFileSync( - path.join(dir, 'master.info'), - `{ "Version": "${version}", "Time": "2020-04-07T14:45:07Z" } ` - ); + fs.writeFileSync(infoPath, `{ "Version": "${version}", "Time": "2020-04-07T14:45:07Z" } `); } // Write the go.mod file. diff --git a/tools/generate.go b/tools/generate.go index a3f64f722f..e3169d18e0 100644 --- a/tools/generate.go +++ b/tools/generate.go @@ -15,6 +15,7 @@ package main import ( "bytes" "encoding/json" + "errors" "flag" "fmt" "io" @@ -23,6 +24,7 @@ import ( "os" "os/exec" "path/filepath" + "regexp" "sort" "strings" @@ -235,6 +237,12 @@ func main() { if err != nil { log.Fatal(err) } + // Due to https://github.com/golang/vscode-go/issues/1682, we cannot use + // pseudo-version as the pinned version reliably. + dlvRevOrStable := dlvVersion.Version + if rev, err := pseudoVersionRev(dlvVersion.Version); err == nil { // pseudo-version + dlvRevOrStable = rev + } // Check for the latest gopls version. versions, err := listAllModuleVersions("golang.org/x/tools/gopls") @@ -269,7 +277,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.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")], dlvRevOrStable, dlvVersion.Version, dlvVersion.Time[:len("YYYY-MM-DD")]) // Write tools section. b.WriteString(toolsString) @@ -685,3 +693,19 @@ func describeDebugProperty(p *Property) string { } return b.String() } + +// pseudoVersionRev extracts the revision info if the given version is pseudo version. +// We wanted to use golang.org/x/mod/module.PseudoVersionRev, but couldn't due to +// an error in the CI. This is a workaround. +// +// It assumes the version string came from the proxy, so a valid, canonical version +// string. Thus, the check for pseudoversion is not as robust as golang.org/x/mod/module +// offers. +func pseudoVersionRev(ver string) (rev string, _ error) { + var pseudoVersionRE = regexp.MustCompile(`^v[0-9]+\.(0\.0-|\d+\.\d+-([^+]*\.)?0\.)\d{14}-[A-Za-z0-9]+(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$`) + if strings.Count(ver, "-") < 2 || !pseudoVersionRE.MatchString(ver) { + return "", errors.New("not a pseudo version") + } + j := strings.LastIndex(ver, "-") + return ver[j+1:], nil +} From 1ebc8c5805203f9fb9dbf6fdbc5d3369512dcf2c Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 11 Aug 2021 16:15:45 -0400 Subject: [PATCH 108/189] [release] CHANGELOG.md: v0.27.1 change log Change-Id: Ia12694869e75a68609900212ef03f00d78589371 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341569 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit e81d5fcc51a797a1751564d7f9c4466b3b081ea6) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341610 --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f53ac6f63..50bfcaff60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +📣 Delve's native DAP implementation ([`dlv-dap`](https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_dap.md)) +is enabled by default for local debugging. We updated the [Documentation for Debugging](https://github.com/golang/vscode-go/blob/master/docs/debugging.md) +to show the new features available with dlv-dap. This change does not apply to remote debugging yet. +For remote debugging, keep following the instruction in the +[legacy debug adapter documentation](https://github.com/golang/vscode-go/blob/master/docs/debugging-legacy.md). + +## v0.27.1 - 12 Aug, 2021 + +A list of all issues and changes can be found in the [v0.27.1 milestone](https://github.com/golang/vscode-go/milestone/35) and [commit history](https://github.com/golang/vscode-go/compare/v0.27.0...v0.27.1). + +### Enhancement +- Supports `replay` and `core` debug launch modes. ([PR 1268](https://github.com/golang/vscode-go/pull/1268)) + +### Fixes +- Fixed process pickers used in attach mode debugging. ([Issue 1679](https://github.com/golang/vscode-go/issues/1679)) +- Fixed the failure of debugging when `CGO_CFLAGS` is set. ([Issue 1678](https://github.com/golang/vscode-go/issues/1678)) +- Fixed the `dlv-dap` installation issue. ([Issue 1682](https://github.com/golang/vscode-go/issues/1682)) + +### Thanks +Thanks for your contributions, Luis Gabriel Gomez, Suzy Mueller, and Hana Kim! + ## v0.27.0 - 9 Aug, 2021 📣 Delve's native DAP implementation ([`dlv-dap`](https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_dap.md)) From 5a8a8c811f34c01182532e1689434abe99ad2f04 Mon Sep 17 00:00:00 2001 From: Hana Date: Wed, 11 Aug 2021 23:26:54 -0400 Subject: [PATCH 109/189] package.json: set version for v0.27.1 release Change-Id: If3832eae1ad9c10e5dddb3c516622822c979a203 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341593 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Robert Findley --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 367326abde..c374c75442 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.27.0", + "version": "0.27.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.27.0", + "version": "0.27.1", "license": "MIT", "dependencies": { "deep-equal": "^2.0.2", diff --git a/package.json b/package.json index a768597cae..9ba5a8bb89 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.27.0", + "version": "0.27.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 17623964c7d57e4c182fce66dfb244ac481872e9 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 16 Aug 2021 15:55:04 -0400 Subject: [PATCH 110/189] [release] src/goDebugFactory: increase timeout for dlv dap server start Some users are experiencing slow dlv dap server start. The root cause of this slow start still needs investigation. For golang/vscode-go#1693 Change-Id: Ie932bc2b9b7d273e0be2553b9fc154f2ae0b3ead Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/342632 Trust: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller (cherry picked from commit c79e0c4e664f02771330cb6741b121cfbd649021) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/345550 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Trust: Suzy Mueller --- src/goDebugFactory.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index 01f77c10fa..09fceda2f7 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -418,13 +418,13 @@ function spawnDlvDapServerProcess( const p = spawn(dlvPath, dlvArgs, { cwd: dir, env, - stdio: ['pipe', 'pipe', 'pipe', 'pipe'] // --log-dest=3 + stdio: onWindows ? ['pipe', 'pipe', 'pipe'] : ['pipe', 'pipe', 'pipe', 'pipe'] // --log-dest=3 if !onWindows. }); let started = false; - const timeoutToken: NodeJS.Timer = setTimeout( - () => reject(new Error('timed out while waiting for DAP server to start')), - 5_000 - ); + const timeoutToken: NodeJS.Timer = setTimeout(() => { + logConsole(`Delve DAP server (PID: ${p.pid}) is not responding`); + reject(new Error('timed out while waiting for DAP server to start')); + }, 30_000); const stopWaitingForServerToStart = () => { clearTimeout(timeoutToken); From a15a05c42c288edbc4a730634b240fa023960cfb Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Thu, 12 Aug 2021 15:56:59 -0400 Subject: [PATCH 111/189] [release] all: add support for go.work files as go.mod files This will allow us to add support for the go.work proposal. Change-Id: I13b374ede724a5a10f0ad11b1073d7849226a4bf Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/341849 Trust: Rebecca Stambler Run-TryBot: Rebecca Stambler TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit ad3a6caec015e635becccaccbb066b6f2ca85c92) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/345549 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- package.json | 3 ++- src/goLanguageServer.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9ba5a8bb89..d903528132 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,8 @@ "id": "go.mod", "extensions": [ "go.mod", - "gopls.mod" + "gopls.mod", + "go.work" ], "aliases": [ "Go Module File" diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 5014946d1d..317687d717 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -460,7 +460,8 @@ export async function buildLanguageClient(cfg: BuildLanguageClientOption): Promi // gopls handles only file URIs. { language: 'go', scheme: 'file' }, { language: 'go.mod', scheme: 'file' }, - { language: 'go.sum', scheme: 'file' } + { language: 'go.sum', scheme: 'file' }, + { language: 'go.work', scheme: 'file' } ]; // Let gopls know about .tmpl - this is experimental, so enable it only in the experimental mode now. From 2b7edc06cbd9ac08db8bf3a46506437906421e4d Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Mon, 30 Aug 2021 10:23:19 -0400 Subject: [PATCH 112/189] [release] all: change learn.go.dev to go.dev/learn go.dev/learn is the new canonical URL for learn.go.dev. learn.go.dev does not work at the moment. Change-Id: I91413fe7ab31142985925104494215efc32b9f56 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346109 Reviewed-by: Hyang-Ah Hana Kim Trust: Hyang-Ah Hana Kim Trust: Julie Qiu Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro (cherry picked from commit e6c2d3ce23ebc26bee10d573f0444b619ab44b2e) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346110 Reviewed-by: Julie Qiu --- README.md | 2 +- src/welcome.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f77ecae818..72167e1a19 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ by [filing an issue](https://github.com/golang/vscode-go/issues/new/choose), [starting a GitHub discussion](https://github.com/golang/vscode-go/discussions), or by asking a question on [Stack Overflow]. -Also, you can take a look at [learn.go.dev](https://learn.go.dev) and +Also, you can take a look at [go.dev/learn](https://go.dev/learn) and [golang.org/help](https://golang.org/help) for more general guidance on using Go. diff --git a/src/welcome.ts b/src/welcome.ts index 4f671153d7..e6699418fe 100644 --- a/src/welcome.ts +++ b/src/welcome.ts @@ -181,7 +181,7 @@ export class WelcomePanel {

    Learning Go

    If you're new to the Go programming language, - learn.go.dev is a great place to get started. + go.dev/learn is a great place to get started.

    From b0744a614862d6b24bbc79eae8c59c4198506f8b Mon Sep 17 00:00:00 2001 From: Luis Gabriel Gomez Date: Tue, 10 Aug 2021 18:52:32 +0000 Subject: [PATCH 113/189] [release] package.json: add support for replay and core debug modes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The following modes are added: - **replay**: Replays an rr trace, allowing backwards flows (reverse continue and stepback). Requires a `traceDirPath` property on `launch.json` pointing to a valid rr trace directory. Equivalent to `dlv replay ` command. - **core**: Replays a core dump file, showing its callstack and the file matching the callsite. Requires a `coreFilePath` property on `launch.json` pointing to a valid coredump file. Equivalent to `dlv core ` command. With the new dap service, most of the heavy work will go to delve, so this PR mainly involves getting around passing the corresponding launchArgs to delve. It´s service counterpart lies on https://github.com/go-delve/delve/pull/2367 GitHub-Last-Rev: e055352562b814531c7e265c6aa457929f7c89c4 GitHub-Pull-Request: golang/vscode-go#1268 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/298569 Reviewed-by: Hyang-Ah Hana Kim Trust: Hyang-Ah Hana Kim Trust: Suzy Mueller Change-Id: I7b6b3b7b9d7c30d552a4401892492c74ec2e3023 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346092 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller TryBot-Result: kokoro --- docs/debugging.md | 4 +++- package.json | 16 ++++++++++++++-- src/goDebugFactory.ts | 9 ++++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/docs/debugging.md b/docs/debugging.md index baff27bde5..fad2d4985e 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -240,6 +240,7 @@ Here is the list of attributes specific to Go debugging. | `args` | Command line arguments passed to the debugged program.
    |
    _n/a_
    | | `backend` | Backend used by delve. Maps to `dlv`'s `--backend` flag.

    Allowed Values: `"default"`, `"native"`, `"lldb"`
    |

    _same as Launch_
    | | `buildFlags` | Build flags, to be passed to the Go compiler. Maps to dlv's `--build-flags` flag.
    (Default: `""`)
    |
    _n/a_
    | +| `coreFilePath` | Path to the core dump file to open. For use on 'core' mode only
    (Default: `""`)
    |
    _n/a_
    | | `cwd` | Workspace relative or absolute path to the working directory of the program being debugged if a non-empty value is specified. The `program` folder is used as the working directory if `cwd` is omitted or empty.
    (Default: `""`)
    | Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
    (Default: `"${workspaceFolder}"`)
    | | `debugAdapter` | Select which debug adapter to use with this launch configuration.

    Allowed Values: `"legacy"`, `"dlv-dap"`
    (Default: `dlv-dap`)
    |

    _same as Launch_
    | | `dlvFlags` | Extra flags for `dlv`. See `dlv help` for the full list of supported. Flags such as `--log-output`, `--log`, `--log-dest`, `--api-version`, `--output`, `--backend` already have corresponding properties in the debug configuration, and flags such as `--listen` and `--headless` are used internally. If they are specified in `dlvFlags`, they may be ignored or cause an error.
    |
    _same as Launch_
    | @@ -248,7 +249,7 @@ Here is the list of attributes specific to Go debugging. | `host` | The host name of the machine the delve debugger will be listening on.
    (Default: `"127.0.0.1"`)
    |
    _same as Launch_
    | | `logDest` | dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode, and on Linux and Mac OS.
    | dlv's `--log-dest` flag. See `dlv log` for details. Number argument is not allowed. Supported only in `dlv-dap` mode and on Linux and Mac OS.
    | | `logOutput` | Comma separated list of components that should produce debug output. Maps to dlv's `--log-output` flag. Check `dlv log` for details.

    Allowed Values: `"debugger"`, `"gdbwire"`, `"lldbout"`, `"debuglineerr"`, `"rpc"`, `"dap"`
    (Default: `"debugger"`)
    |

    _same as Launch_
    | -| `mode` | One of `auto`, `debug`, `test`, `exec`. In `auto` mode, the extension will choose either `debug` or `test` depending on active editor window.

    Allowed Values: `"auto"`, `"debug"`, `"test"`, `"exec"`
    (Default: `auto`)
    | Indicates local or remote debugging. Local maps to the `dlv attach` command, remote maps to `connect`. `remote` is not supported in `dlv-dap` mode currently. Use `host` and `port` instead.

    Allowed Values: `"local"`, `"remote"`
    (Default: `local`)
    | +| `mode` | One of `auto`, `debug`, `test`, `exec`, `replay`, `core`. In `auto` mode, the extension will choose either `debug` or `test` depending on active editor window.

    Allowed Values: `"auto"`, `"debug"`, `"test"`, `"exec"`, `"replay"`, `"core"`
    (Default: `auto`)
    | Indicates local or remote debugging. Local maps to the `dlv attach` command, remote maps to `connect`. `remote` is not supported in `dlv-dap` mode currently. Use `host` and `port` instead.

    Allowed Values: `"local"`, `"remote"`
    (Default: `local`)
    | | `output` | Output path for the binary of the debugee.
    (Default: `"debug"`)
    |

    _n/a_
    | | `port` | The port that the delve debugger will be listening on.
    (Default: `2345`)
    |
    _same as Launch_
    | | `processId` |
    _n/a_
    |

    Option 1: Use process picker to select a process to attach, or Process ID as integer.

    Allowed Values: `"${command:pickProcess}"`, `"${command:pickGoProcess}"`

    Option 2: Attach to a process by name. If more than one process matches the name, use the process picker to select a process.

    Option 3: The numeric ID of the process to be debugged. If 0, use the process picker to select a process.

    (Default: `0`)
    | @@ -260,6 +261,7 @@ Here is the list of attributes specific to Go debugging. | `stopOnEntry` | Automatically stop program after launch.
    (Default: `false`)
    | Automatically stop program after attach.
    (Default: `false`)
    | | `substitutePath` | An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls.


    • `"from"`: The absolute local path to be replaced when passing paths to the debugger.
      (Default: `""`)
    • `"to"`: The absolute remote path to be replaced when passing paths back to the client.
      (Default: `""`)

    | An array of mappings from a local path (editor) to the remote path (debugee). This setting is useful when working in a file system with symbolic links, running remote debugging, or debugging an executable compiled externally. The debug adapter will replace the local path with the remote path in all of the calls. Overriden by `remotePath`.


    • `"from"`: The absolute local path to be replaced when passing paths to the debugger.
      (Default: `""`)
    • `"to"`: The absolute remote path to be replaced when passing paths back to the client.
      (Default: `""`)

    | | `trace` | Various levels of logging shown in the debug console & 'Go Debug' output channel. When using the `legacy` debug adapter, the logs will also be written to a file if it is set to a value other than `error`.

    Allowed Values: `"verbose"`, `"trace"`, `"log"`, `"info"`, `"warn"`, `"error"`
    (Default: `"error"`)
    |

    _same as Launch_
    | +| `traceDirPath` | Directory in which the record trace is located or to be created for a new output trace. For use on 'replay' mode only
    (Default: `""`)
    |
    _n/a_
    | ⚠️ `dlv-dap` needs file or directory values in the launch configuration to be absolute paths. When configuring those values, use [the VS Code variables substitution](https://code.visualstudio.com/docs/editor/variables-reference) - VS Code will resolve the variables inside strings in `launch.json` before passing the configuration to the Go extension and `dlv-dap`. For example, `${workspaceFolder}` will be replaced with the absolute path to the workspace root folder. When appropriate, the Go extension will resolve relative paths or home directory (~) before sending the configuration to `dlv-dap`. diff --git a/package.json b/package.json index d903528132..5b38190352 100644 --- a/package.json +++ b/package.json @@ -541,11 +541,23 @@ "auto", "debug", "test", - "exec" + "exec", + "replay", + "core" ], - "description": "One of `auto`, `debug`, `test`, `exec`. In `auto` mode, the extension will choose either `debug` or `test` depending on active editor window.", + "description": "One of `auto`, `debug`, `test`, `exec`, `replay`, `core`. In `auto` mode, the extension will choose either `debug` or `test` depending on active editor window.", "default": "auto" }, + "traceDirPath": { + "type": "string", + "description": "Directory in which the record trace is located or to be created for a new output trace. For use on 'replay' mode only", + "default": "" + }, + "coreFilePath": { + "type": "string", + "description": "Path to the core dump file to open. For use on 'core' mode only", + "default": "" + }, "stopOnEntry": { "type": "boolean", "description": "Automatically stop program after launch.", diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index 09fceda2f7..a71b53e775 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -492,10 +492,17 @@ export function parseProgramArgSync( launchAttachArgs: vscode.DebugConfiguration ): { program: string; dirname: string; programIsDirectory: boolean } { const program = launchAttachArgs.program; + let programIsDirectory = false; + + if (launchAttachArgs.mode === 'replay') { + // Skip program parsing on modes that do not require a program + return { program: '', dirname: '', programIsDirectory: programIsDirectory }; + } + if (!program) { throw new Error('The program attribute is missing in the debug configuration in launch.json'); } - let programIsDirectory = false; + try { programIsDirectory = fs.lstatSync(program).isDirectory(); } catch (e) { From 0888ba58100f8ff35d12fe09ff3138483c68b88f Mon Sep 17 00:00:00 2001 From: Polina Sokolova Date: Tue, 24 Aug 2021 07:56:23 +0000 Subject: [PATCH 114/189] [release] src/goDebugConfiguration+docs: improve dlvLoadConfig communication Expands the warning and adds FAQ entry. Updates #1318 Change-Id: Iecefad6a85c27978c3c25ff9c286e5d37192eaad GitHub-Last-Rev: 5153c1b0d329f4dd18f88b02cc2d338b8d6f8b80 GitHub-Pull-Request: golang/vscode-go#1715 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/344370 Reviewed-by: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro (cherry picked from commit ebd07b13caf35114b32e7d6783b27902af4829ce) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346093 --- docs/debugging.md | 32 ++++++++++++++++++++++++-------- src/goDebugConfiguration.ts | 2 +- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/docs/debugging.md b/docs/debugging.md index fad2d4985e..8695afdfed 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -59,7 +59,7 @@ Note that the extension still uses the legacy debug adapter for remote debugging If you want to switch to `legacy` for only a subset of your launch configurations, you can use [the `debugAdapter` attribute](#launchjson-attributes) to switch between `"dlv-dap"` and `"legacy"` mode. -If you chose to switch to legacy because of bugs in the new debug adapter, +If you chose to switch to legacy because of bugs or limitations in the new debug adapter, please [open an issue](https://github.com/golang/vscode-go/issues/new) to help us improve the new debug adapter. ## Features @@ -163,12 +163,12 @@ You can inspect variables in the VARIABLES section of the Run view or by hoverin By default, the VARIABLES section hides global variables, and shows only local variables and function arguments. However, you can still inspect global variables from the DEBUG CONSOLE panel. If you prefer to have the VARIABLES section show global variables, set the `showGlobalVariables` attribute in the `launch.json` configuration, or set it in the `go.delveConfig` setting. -When you select a variable and right click from the VARIABLES section, the context menu will present shortcuts to features such as: +When you select a variable and right click from the VARIABLES section, the context menu will present shortcuts to features such as: -* Set Value: you can set/modify simple string, numeric, pointer values. Using composite literals, or memory allocation is not supported. -* Copy Value: this copies the value in clipboard. -* Copy as Expression: this is useful when you need to query from the REPL in the DEBUG CONSOLE panel. -* Add to Watch: this will automatically add the expression to the WATCH section. +* `Set Value`: you can set/modify simple string, numeric, pointer values. Using composite literals, or memory allocation is not supported. +* `Copy Value`: this copies the value in clipboard. +* `Copy as Expression`: this is useful when you need to query from the REPL in the DEBUG CONSOLE panel. +* `Add to Watch`: this will automatically add the expression to the WATCH section. Shadowed variables will be marked with `()`. @@ -301,7 +301,7 @@ You can adjust the default value of the following configuration properties using * `showGlobalVariables`: Show global variables in the Debug view (default: `false`). * `substitutePath`: Path mappings to apply to get from a path in the editor to a path in the compiled program (default: `[]`). -⚠️ Where is the `dlvLoadConfig` setting? Delve debugger imposes variable loading limits to avoid loading too many variables at once and negatively impacting debugging latency. The legacy adapter supported `dlvLoadConfig` to adjust these limits for the duration of the session. The user therefore had to come up with a one-size-fits-all limit if the default behavior was not satisfactory. `dlv-dap` mode uses a different approach as described in [the Data Inspection section](#data-inspection). If this setting is configured and `dlv-dap` mode is used, the extension will show a warning prompt now. If the current variable loading behavior and internal limits are not working for you, please open an issue and share your feedback. +⚠️ Where is the `dlvLoadConfig` setting? Delve debugger imposes variable loading limits to avoid loading too many variables at once and negatively impacting debugging latency. The legacy adapter supported `dlvLoadConfig` to adjust these limits for the duration of the session. The user therefore had to come up with a one-size-fits-all limit if the default behavior was not satisfactory. `dlv-dap` mode uses a different approach as described in [the Data Inspection section](#data-inspection). If this setting is configured and `dlv-dap` mode is used, the extension will show a warning prompt now. If the current variable loading behavior and internal limits are not working for you, please [open an issue](https://github.com/golang/vscode-go/issues/new) and share your feedback.

    dlvLoadConfig is invalid

    @@ -408,7 +408,7 @@ For simple launch cases, build the delve binary, and configure `"go.alternateToo ```

    Go Debug output channel

    -If you are having issues with seeing logs and/or suspect problems in the extension's integration, you can start the Delve DAP server from a separate terminal and configure the extension to directly connect to it. Please remember to file an issue if you encounter any logging-related issues. +If you are having issues with seeing logs and/or suspect problems in the extension's integration, you can start the Delve DAP server from a separate terminal and configure the extension to directly connect to it. Please remember to [file an issue](https://github.com/golang/vscode-go/issues/new) if you encounter any logging-related problems. ``` $ dlv-dap dap --listen=:12345 --log --log-output=dap @@ -425,6 +425,22 @@ $ dlv-dap dap --listen=:12345 --log --log-output=dap } ``` +## FAQs + +### Why does my debug session stop when I set breakpoints? + +To support being able to set breakpoints while the program is running, the debug adapter needs to stop the program. Due to the extra synchronization required to correctly resume the program, the debug adapter currently sends a stopped event. This means that if you are editing breakpoints while the program is running, you will need to hit continue to continue your debug session. We plan to change the behavior of the debug adapter for more seamless editing of breakpoints. You can track the progress [here](https://github.com/golang/vscode-go/issues/1676). + +### I need to view large strings. How can I do that if `dlvLoadConfig` with `maxStringLen` is deprecated? + +The legacy adapter used `dlvLoadConfig` as one-time session-wide setting to override dlv's conservative default variable loading limits, intended to protect tool's performance. The new debug adapter is taking a different approach with on-demand loading of composite data and updated string limits, relaxed when interacting with individual strings. In particular, if the new default limit of 512, applied to all string values in the variables pane, is not sufficient, you can take advantage of a larger limit of 4096 with one of the following: + +* Hover over the variable in the source code +* `Copy as Expression` to query the string via REPL in the DEBUG CONSOLE panel +* `Copy Value` to clipboard + +Please [open an issue](https://github.com/golang/vscode-go/issues/new) if this is not sufficient for your use case or if you have any additional feedback. + [Delve]: https://github.com/go-delve/delve [VS Code variables]: https://code.visualstudio.com/docs/editor/variables-reference [snippets]: https://code.visualstudio.com/docs/editor/userdefinedsnippets diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts index d21a710dcd..3e980b3451 100644 --- a/src/goDebugConfiguration.ts +++ b/src/goDebugConfiguration.ts @@ -193,7 +193,7 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr ) { this.showWarning( 'ignoreDebugDlvConfigWithDlvDapWarning', - "User specified 'dlvLoadConfig' setting will be ignored by debug adapter 'dlv-dap'." + "'dlvLoadConfig' is deprecated with dlv-dap debug adapter.\n\nDlv-dap loads composite data on demand and uses increased string limits on source code hover, in Debug Console and via Copy Value. Please file an issue if these are not sufficient for your use case." ); } if (!debugConfiguration.hasOwnProperty('dlvLoadConfig') && dlvConfig.hasOwnProperty('dlvLoadConfig')) { From ad27422579b18a818f378e7127fc9d78e8a6bf1a Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 24 Aug 2021 09:30:54 -0400 Subject: [PATCH 115/189] [release] src/goInstallTools: unpin dlv-dap version, and pick master This partially reverts commit d1d61bc5e6f1d577e11a893eaeee49e88933e461. Pinning made it difficult for users to use newer versions with bug fixes. Use the stable version as the latestVersion for now. Fixes golang/vscode-go#1687 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/344789 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Polina Sokolova Change-Id: Ib35791c99b77dc1be24906875f3e039dec96c830 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346094 Reviewed-by: Suzy Mueller --- src/goInstallTools.ts | 1 + src/goToolsInformation.ts | 6 +++--- test/integration/install.test.ts | 4 ++-- tools/allTools.ts.in | 2 +- tools/generate.go | 26 +------------------------- 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index 6316b5193b..e0b2377b61 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -162,6 +162,7 @@ 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 17857261b2..f7b621fbef 100644 --- a/src/goToolsInformation.ts +++ b/src/goToolsInformation.ts @@ -223,10 +223,10 @@ export const allToolsInformation: { [key: string]: Tool } = { replacedByGopls: false, isImportant: true, description: 'Go debugger & debug adapter (Delve DAP)', - defaultVersion: 'f95340ae1bf9', // pinned version + defaultVersion: 'master', // Always build from the master. minimumGoVersion: semver.coerce('1.12'), // dlv requires 1.12+ for build - latestVersion: semver.parse('v1.7.1-0.20210804080032-f95340ae1bf9'), - latestVersionTimestamp: moment('2021-08-04', 'YYYY-MM-DD') + latestVersion: semver.parse('v1.7.1'), + latestVersionTimestamp: moment('2021-08-18', 'YYYY-MM-DD') }, 'fillstruct': { name: 'fillstruct', diff --git a/test/integration/install.test.ts b/test/integration/install.test.ts index ed8f0f64a1..8d514e778d 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', getTool('dlv-dap').defaultVersion!], + versions: ['v1.0.0', 'master'], 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', getTool('dlv-dap').defaultVersion!], + versions: ['v1.0.0', 'master'], wantVersion: 'v' + getTool('dlv-dap').latestVersion!.toString() } ], diff --git a/tools/allTools.ts.in b/tools/allTools.ts.in index ee85474abf..0c31e4d7eb 100644 --- a/tools/allTools.ts.in +++ b/tools/allTools.ts.in @@ -221,7 +221,7 @@ export const allToolsInformation: { [key: string]: Tool } = { replacedByGopls: false, isImportant: true, description: 'Go debugger & debug adapter (Delve DAP)', - defaultVersion: '%s', // pinned version + defaultVersion: 'master', // Always build from the master. 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 e3169d18e0..4f0948ec0a 100644 --- a/tools/generate.go +++ b/tools/generate.go @@ -15,7 +15,6 @@ package main import ( "bytes" "encoding/json" - "errors" "flag" "fmt" "io" @@ -24,7 +23,6 @@ import ( "os" "os/exec" "path/filepath" - "regexp" "sort" "strings" @@ -237,12 +235,6 @@ func main() { if err != nil { log.Fatal(err) } - // Due to https://github.com/golang/vscode-go/issues/1682, we cannot use - // pseudo-version as the pinned version reliably. - dlvRevOrStable := dlvVersion.Version - if rev, err := pseudoVersionRev(dlvVersion.Version); err == nil { // pseudo-version - dlvRevOrStable = rev - } // Check for the latest gopls version. versions, err := listAllModuleVersions("golang.org/x/tools/gopls") @@ -277,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")], dlvRevOrStable, 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.Time[:len("YYYY-MM-DD")]) // Write tools section. b.WriteString(toolsString) @@ -693,19 +685,3 @@ func describeDebugProperty(p *Property) string { } return b.String() } - -// pseudoVersionRev extracts the revision info if the given version is pseudo version. -// We wanted to use golang.org/x/mod/module.PseudoVersionRev, but couldn't due to -// an error in the CI. This is a workaround. -// -// It assumes the version string came from the proxy, so a valid, canonical version -// string. Thus, the check for pseudoversion is not as robust as golang.org/x/mod/module -// offers. -func pseudoVersionRev(ver string) (rev string, _ error) { - var pseudoVersionRE = regexp.MustCompile(`^v[0-9]+\.(0\.0-|\d+\.\d+-([^+]*\.)?0\.)\d{14}-[A-Za-z0-9]+(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$`) - if strings.Count(ver, "-") < 2 || !pseudoVersionRE.MatchString(ver) { - return "", errors.New("not a pseudo version") - } - j := strings.LastIndex(ver, "-") - return ver[j+1:], nil -} From 171748293ef0502aa1985da8f3d8f6a3ddc626f6 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 24 Aug 2021 13:58:12 -0400 Subject: [PATCH 116/189] [release] src/goDebugConfiguration: massage launch config for debug/test When the current build directory is resolved to a path different from the program's directory due to soft/symbolic links, the go command can be confused and complain that the absolute path in program is outside the module of the current directory. This CL avoids such problem by making dlv always use a relative path as the build target for build/test mode (and auto for testing). Before starting the debug session, we massage the launch config: program: /foo/bar.go -> program: ./bar.go, __buildDir: /foo program: /foo/bar -> program: ., __buildDir: /foo/bar Previously we find the package directory just before spawning dlv dap and spawn the dlv dap process from the package directory. With this CL, we find the package directory when resolving the debug configuration before debug session. This introduces __buildDir attribute which is internal. (There is an ongoing work to introduce 'buildDir' to dlv DAP so we use internal attribute to make it clear.) Also, this made the resolveDebugConfigurationWithSubstitutedVariables accept relative paths without workspace root. Just the behavior is undefined. (The motivation of change in this part is the testing. We have 'output' property or some others, that are like relative path. I guess most users wouldn't care much. Delve is cool with relative paths so we do our best to resolve that wrt the workspace root. Otherwise, just let delve decide. Fixes golang/vscode-go#1713 Fixes golang/vscode-go#1680 Fixes golang/vscode-go#1677 Updates golang/vscode-go#1348 Change-Id: I434c43131b27d9c58058450c502e1b30c58ea690 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/344790 Trust: Hyang-Ah Hana Kim Trust: Suzy Mueller Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346095 --- src/goDebugConfiguration.ts | 50 ++++++++++++----- src/goDebugFactory.ts | 55 ++++++++++-------- test/integration/goDebug.test.ts | 42 +++++++++++++- test/integration/goDebugConfiguration.test.ts | 56 ++++++++++++++++--- 4 files changed, 155 insertions(+), 48 deletions(-) diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts index 3e980b3451..d3100129a3 100644 --- a/src/goDebugConfiguration.ts +++ b/src/goDebugConfiguration.ts @@ -10,6 +10,7 @@ import path = require('path'); import vscode = require('vscode'); import { getGoConfig } from './config'; +import { parseProgramArgSync } from './goDebugFactory'; import { toolExecutionEnvironment } from './goEnv'; import { declinedToolInstall, @@ -243,8 +244,6 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr const dlvToolPath = getBinPath(debugAdapter); if (!path.isAbsolute(dlvToolPath)) { - const tool = getTool(debugAdapter); - // If user has not already declined to install this tool, // prompt for it. Otherwise continue and have the lack of // dlv binary be caught later. @@ -382,20 +381,42 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr const entriesWithRelativePaths = ['cwd', 'output', 'program'].filter( (attr) => debugConfiguration[attr] && !path.isAbsolute(debugConfiguration[attr]) ); - if (debugConfiguration['debugAdapter'] === 'dlv-dap' && entriesWithRelativePaths.length > 0) { - const workspaceRoot = folder?.uri.fsPath; - if (!workspaceRoot) { - this.showWarning( - 'relativePathsWithoutWorkspaceFolder', - 'Relative paths without a workspace folder for `cwd`, `program`, or `output` are not allowed.' - ); - return null; + if (debugConfiguration['debugAdapter'] === 'dlv-dap') { + // relative paths -> absolute paths + if (entriesWithRelativePaths.length > 0) { + const workspaceRoot = folder?.uri.fsPath; + if (workspaceRoot) { + entriesWithRelativePaths.forEach((attr) => { + debugConfiguration[attr] = path.join(workspaceRoot, debugConfiguration[attr]); + }); + } else { + this.showWarning( + 'relativePathsWithoutWorkspaceFolder', + 'Behavior when using relative paths without a workspace folder for `cwd`, `program`, or `output` is undefined.' + ); + } + } + // compute build dir, and translate the dirname in program to a path relative to buildDir. + if (debugConfiguration.request === 'launch') { + const mode = debugConfiguration['mode'] || 'debug'; + if (['debug', 'test', 'auto'].includes(mode)) { + // Massage config to build the target from the package directory + // with a relative path. (https://github.com/golang/vscode-go/issues/1713) + try { + const { program, dirname, programIsDirectory } = parseProgramArgSync(debugConfiguration); + if (dirname) { + debugConfiguration['__buildDir'] = dirname; + debugConfiguration['program'] = programIsDirectory + ? '.' + : '.' + path.sep + path.relative(dirname, program); + } + } catch (e) { + this.showWarning('invalidProgramArg', `Invalid 'program': ${e}`); + // keep going - just in case dlv knows how to handle this better. + } + } } - entriesWithRelativePaths.forEach((attr) => { - debugConfiguration[attr] = path.join(workspaceRoot, debugConfiguration[attr]); - }); } - if (debugConfiguration.request === 'attach' && debugConfiguration['mode'] === 'local') { // processId needs to be an int, but the substituted variables from pickGoProcess and pickProcess // become a string. Convert any strings to integers. @@ -403,7 +424,6 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr debugConfiguration['processId'] = parseInt(debugConfiguration['processId'], 10); } } - return debugConfiguration; } diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index a71b53e775..878b4b80c4 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -38,6 +38,7 @@ export class GoDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr configuration: vscode.DebugConfiguration ): Promise> { const logger = new TimestampedLogger(configuration.trace, this.outputChannel); + logger.debug(`Config: ${JSON.stringify(configuration)}`); const d = new DelveDAPOutputAdapter(configuration, logger); return new vscode.DebugAdapterInlineImplementation(d); } @@ -356,13 +357,9 @@ function spawnDlvDapServerProcess( throw new Error('Cannot find Delve debugger (dlv dap)'); } let dir = getWorkspaceFolderPath(); - if (launchAttachArgs.request === 'launch') { - try { - dir = parseProgramArgSync(launchAttachArgs).dirname; - } catch (err) { - logErr(`Program arg: ${launchAttachArgs.program}\n${err}\n`); - throw err; // rethrow so the caller knows it failed. - } + if (launchAttachArgs.request === 'launch' && launchAttachArgs['__buildDir']) { + // __buildDir is the directory determined during resolving debug config + dir = launchAttachArgs['__buildDir']; } const dlvArgs = new Array(); @@ -408,7 +405,7 @@ function spawnDlvDapServerProcess( const logDestStream = logDest ? fs.createWriteStream(logDest) : undefined; - logConsole(`Starting: ${dlvPath} ${dlvArgs.join(' ')}\n`); + logConsole(`Starting: ${dlvPath} ${dlvArgs.join(' ')} from ${dir}\n`); // TODO(hyangah): In module-module workspace mode, the program should be build in the super module directory // where go.work (gopls.mod) file is present. Where dlv runs determines the build directory currently. Two options: @@ -491,27 +488,37 @@ function spawnDlvDapServerProcess( export function parseProgramArgSync( launchAttachArgs: vscode.DebugConfiguration ): { program: string; dirname: string; programIsDirectory: boolean } { - const program = launchAttachArgs.program; - let programIsDirectory = false; + // attach request: + // irrelevant + if (launchAttachArgs.request !== 'launch') return; - if (launchAttachArgs.mode === 'replay') { - // Skip program parsing on modes that do not require a program - return { program: '', dirname: '', programIsDirectory: programIsDirectory }; - } + const mode = launchAttachArgs.mode || 'debug'; + const program = launchAttachArgs.program; if (!program) { throw new Error('The program attribute is missing in the debug configuration in launch.json'); } - try { - programIsDirectory = fs.lstatSync(program).isDirectory(); - } catch (e) { - // TODO(hyangah): why can't the program be a package name? - throw new Error('The program attribute must point to valid directory, .go file or executable.'); - } - if (!programIsDirectory && launchAttachArgs.mode !== 'exec' && path.extname(program) !== '.go') { - throw new Error('The program attribute must be a directory or .go file in debug and test mode'); + // debug, test, auto mode in launch request: + // program ends with .go file -> file, otherwise -> programIsDirectory. + // exec mode + // program should be executable. + // other modes: + // not relevant + if (['debug', 'test', 'auto'].includes(mode)) { + // `auto` shouldn't happen other than in testing. + const ext = path.extname(program); + if (ext === '') { + // the last path element doesn't have . or the first char is . + // Treat this like a directory. + return { program, dirname: program, programIsDirectory: true }; + } + if (ext === '.go') { + return { program, dirname: path.dirname(program), programIsDirectory: false }; + } else { + throw new Error('The program attribute must be a directory or .go file in debug and test mode'); + } } - const dirname = programIsDirectory ? program : path.dirname(program); - return { program, dirname, programIsDirectory }; + // Otherwise, let delve handle. + return { program, dirname: '', programIsDirectory: false }; } diff --git a/test/integration/goDebug.test.ts b/test/integration/goDebug.test.ts index 9328784942..c9d6b8a7d1 100644 --- a/test/integration/goDebug.test.ts +++ b/test/integration/goDebug.test.ts @@ -2081,6 +2081,41 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { await new Promise((resolve) => setTimeout(resolve, 2_000)); }); }); + + suite('substitutePath with symlink', () => { + let realPath: string; + let symlinkPath: string; + + suiteSetup(() => { + realPath = copyDirectory('baseTest'); + symlinkPath = path.join(tmpDir, 'symlinked'); + fs.symlinkSync(realPath, symlinkPath, 'dir'); + }); + suiteTeardown(() => { + fs.unlinkSync(symlinkPath); + rmdirRecursive(realPath); + }); + test('should stop on a breakpoint', async function () { + if (!isDlvDap) this.skip(); // BUG: the legacy adapter fails with 'breakpoint verification mismatch' error. + const FILE = path.join(symlinkPath, 'test.go'); + const BREAKPOINT_LINE = 11; + const config = { + name: 'Launch', + type: 'go', + request: 'launch', + mode: 'debug', + program: FILE, + substitutePath: [ + { + from: symlinkPath, + to: realPath + } + ] + }; + const debugConfig = await initializeDebugConfig(config); + await dc.hitBreakpoint(debugConfig, getBreakpointLocation(FILE, BREAKPOINT_LINE)); + }); + }); }); let testNumber = 0; @@ -2110,7 +2145,12 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { } testNumber++; - const debugConfig = await debugConfigProvider.resolveDebugConfiguration(undefined, config); + let debugConfig = await debugConfigProvider.resolveDebugConfiguration(undefined, config); + debugConfig = await debugConfigProvider.resolveDebugConfigurationWithSubstitutedVariables( + undefined, + debugConfig + ); + if (isDlvDap) { dlvDapAdapter = await DelveDAPDebugAdapterOnSocket.create(debugConfig); const port = await dlvDapAdapter.serve(); diff --git a/test/integration/goDebugConfiguration.test.ts b/test/integration/goDebugConfiguration.test.ts index c2d98feaf3..8ef111c430 100644 --- a/test/integration/goDebugConfiguration.test.ts +++ b/test/integration/goDebugConfiguration.test.ts @@ -452,23 +452,50 @@ suite('Debug Configuration Converts Relative Paths', () => { }; } - test('resolve relative paths with workspace root in dlv-dap mode', () => { + test('resolve relative paths with workspace root in dlv-dap mode, exec mode does not set __buildDir', () => { const config = debugConfig('dlv-dap'); + config.mode = 'exec'; + config.program = path.join('foo', 'bar.exe'); const workspaceFolder = { uri: vscode.Uri.file(os.tmpdir()), name: 'test', index: 0 }; - const { program, cwd, output } = debugConfigProvider.resolveDebugConfigurationWithSubstitutedVariables( + const { program, cwd, __buildDir } = debugConfigProvider.resolveDebugConfigurationWithSubstitutedVariables( workspaceFolder, config ); assert.deepStrictEqual( - { program, cwd, output }, + { program, cwd, __buildDir }, + { + program: path.join(os.tmpdir(), 'foo', 'bar.exe'), + cwd: os.tmpdir(), + __buildDir: undefined + } + ); + }); + + test('program and __buildDir are updated while resolving debug configuration in dlv-dap mode', () => { + const config = debugConfig('dlv-dap'); + config.program = path.join('foo', 'bar', 'pkg'); + const workspaceFolder = { + uri: vscode.Uri.file(os.tmpdir()), + name: 'test', + index: 0 + }; + const { + program, + cwd, + output, + __buildDir + } = debugConfigProvider.resolveDebugConfigurationWithSubstitutedVariables(workspaceFolder, config); + assert.deepStrictEqual( + { program, cwd, output, __buildDir }, { - program: path.join(os.tmpdir(), 'foo/bar.go'), + program: '.', cwd: os.tmpdir(), - output: path.join(os.tmpdir(), 'debug') + output: path.join(os.tmpdir(), 'debug'), + __buildDir: path.join(os.tmpdir(), 'foo', 'bar', 'pkg') } ); }); @@ -498,10 +525,23 @@ suite('Debug Configuration Converts Relative Paths', () => { ); }); - test('disallow relative paths with no workspace root', () => { + test('relative paths with no workspace root are not expanded', () => { const config = debugConfig('dlv-dap'); - const got = debugConfigProvider.resolveDebugConfigurationWithSubstitutedVariables(undefined, config); - assert.strictEqual(got, null); + const { + program, + cwd, + output, + __buildDir + } = debugConfigProvider.resolveDebugConfigurationWithSubstitutedVariables(undefined, config); + assert.deepStrictEqual( + { program, cwd, output, __buildDir }, + { + program: '.' + path.sep + 'bar.go', + cwd: '.', + output: 'debug', + __buildDir: 'foo' + } + ); }); test('do not affect relative paths (workspace) in legacy mode', () => { From 61515ee301fe949a84d87defc4a5ad823d31c418 Mon Sep 17 00:00:00 2001 From: Hana Date: Sat, 28 Aug 2021 02:25:09 +0000 Subject: [PATCH 117/189] [release] src/goDebugFactory: fix debugger launch on Windows https://go-review.googlesource.com/c/vscode-go/+/342632 introduced a bug. On windows, tests fail with -> server: {"type":"request","seq":1,"command":"initialize","arguments":{"adapterID":"go","linesStartAt1":true,"columnsStartAt1":true,"pathFormat":"path"}} <- server: {"seq":0,"type":"response","request_seq":1,"success":false,"command":"initialize","message":"Couldn't start dlv dap:\nTypeError: Cannot read property 'on' of undefined"} <- server: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"DAP server listening at: 127.0.0.1:59678\n"}} <- server: {"seq":0,"type":"event","event":"output","body":{"category":"stderr","output":"2021-08-27T22:34:12Z debug layer=dap DAP server pid = 3344\n"}} rejected promise not handled within 1 second: Error: Couldn't start dlv dap: TypeError: Cannot read property 'on' of undefined stack trace: Error: Couldn't start dlv dap: TypeError: Cannot read property 'on' of undefined at d:\a\vscode-go\vscode-go\node_modules\vscode-debugadapter-testsupport\lib\protocolClient.js:29:35 at DebugClient.dispatch (d:\a\vscode-go\vscode-go\node_modules\vscode-debugadapter-testsupport\lib\protocolClient.js:91:17) at DebugClient.handleData (d:\a\vscode-go\vscode-go\node_modules\vscode-debugadapter-testsupport\lib\protocolClient.js:57:30) at Socket. (d:\a\vscode-go\vscode-go\node_modules\vscode-debugadapter-testsupport\lib\protocolClient.js:19:18) at Socket.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Socket.Readable.push (internal/streams/readable.js:223:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23) Change-Id: Ic7a727dcb4cd3a2c2fd9643cb41dc7dfdc1f91be GitHub-Last-Rev: 7930884a3b8c069834c5e4c992207d2e02094375 GitHub-Pull-Request: golang/vscode-go#1728 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/345711 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346096 --- src/goDebugFactory.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index 878b4b80c4..c6701533da 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -439,7 +439,7 @@ function spawnDlvDapServerProcess( p.stderr.on('data', (chunk) => { logErr(chunk.toString()); }); - p.stdio[3].on('data', (chunk) => { + p.stdio[3]?.on('data', (chunk) => { const msg = chunk.toString(); if (!started && msg.startsWith('DAP server listening at:')) { stopWaitingForServerToStart(); @@ -456,10 +456,11 @@ function spawnDlvDapServerProcess( logConsole(msg); } }); - p.stdio[3].on('close', () => { + p.stdio[3]?.on('close', () => { // always false on windows. logDestStream?.end(); }); + p.on('close', (code, signal) => { // TODO: should we watch 'exit' instead? From b13596f7c392a6ddcacf4da44bc08dbf7ac28544 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 30 Aug 2021 17:38:00 -0400 Subject: [PATCH 118/189] [release] CHANGELOG.md: prep for v0.27.2 Change-Id: I4adc7f32a400f482af640547b216a174859178ea Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346097 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit a4c2c4aadc48a2a8febfc8b01daf4d623304e731) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346119 --- CHANGELOG.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50bfcaff60..3f0134b301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,27 @@ to show the new features available with dlv-dap. This change does not apply to r For remote debugging, keep following the instruction in the [legacy debug adapter documentation](https://github.com/golang/vscode-go/blob/master/docs/debugging-legacy.md). -## v0.27.1 - 12 Aug, 2021 +## v0.27.2 - 1st Sep, 2021 -A list of all issues and changes can be found in the [v0.27.1 milestone](https://github.com/golang/vscode-go/milestone/35) and [commit history](https://github.com/golang/vscode-go/compare/v0.27.0...v0.27.1). +A list of all issues and changes can be found in the [v0.27.2 milestone](https://github.com/golang/vscode-go/milestone/36) and [commit history](https://github.com/golang/vscode-go/compare/v0.27.1...v0.27.2). ### Enhancement - Supports `replay` and `core` debug launch modes. ([PR 1268](https://github.com/golang/vscode-go/pull/1268)) +- `gopls` now watches changes in `go.work` files to support [Go Proposal 45713](https://go.googlesource.com/proposal/+/master/design/45713-workspace.md). + +### Fixes +- Fixed issues around building binaries for debugging when symlinks or case-insensitive file systems are involved. (Issues [1680](https://github.com/golang/vscode-go/issues/1680), [1677](https://github.com/golang/vscode-go/issues/1677), [1713](https://github.com/golang/vscode-go/issues/1713)) +- Clarified the `dlvLoadConfig` setting is no longer necessary with the new debug adapter (`dlv-dap`). ([CL 344370)(https://go-review.googlesource.com/c/vscode-go/+/344370)) +- Increased the timeout limit from 5sec to 30sec. If `dlv-dap` still fails to start, please check firewall/security settings do not prevent installation or execution of the `dlv-dap` (or `dlv-dap.exe`) binary. ([Issue 1693](https://github.com/golang/vscode-go/issues/1693)) +- `Go: Install/Update Tools` command picks the `dlv-dap` from the main branch. + +### Thanks +Thanks for your contributions, Suzy Mueller, Luis Gabriel Gomez, Polina Sokolova, Julie Qiu, and Hana Kim! + +## v0.27.1 - 12 Aug, 2021 + +A list of all issues and changes can be found in the [v0.27.1 milestone](https://github.com/golang/vscode-go/milestone/35) and [commit history](https://github.com/golang/vscode-go/compare/v0.27.0...v0.27.1). + ### Fixes - Fixed process pickers used in attach mode debugging. ([Issue 1679](https://github.com/golang/vscode-go/issues/1679)) From 5d22417d2b3110c8f8a0617b7f573068b15754f6 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 30 Aug 2021 17:14:41 -0400 Subject: [PATCH 119/189] [release] package.json: change version to v0.27.2 Change-Id: I5c3dec438fa55a8faf046ba4bf95cbea7c1d1cf6 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/346329 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c374c75442..7157cbc856 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.27.1", + "version": "0.27.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 5b38190352..ff2801f6f9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.27.1", + "version": "0.27.2", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 03cb3c69ad3bf6724dd2f618583b77a1968a76de Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 14 Sep 2021 08:35:20 -0400 Subject: [PATCH 120/189] [release] src/goMain: remove tools version check hack The existing tool version checks in suggestUpdates simply compare the go version & GOROOT/GOPATH used with the tool last time. That is a hack added when there was no good way to check tool's exact versions and users organize compatible tools using GOPATH. Now many of recent tools (e.g. gopls) do not depend on hardcoded GOROOT or the go version used while compiling the tools. It's still desirable to compile tools with the latest version of go but the go version does not have to match exactly with the go version used to compile the tools. For example, tools compiled with go1.16 can be used to work with go1.16.1 or go1.15. Now Go is released frequently, and the extension allows users to switch between different go versions more easily, this incorrect popup is often annoying and confuses users, than helping users stay up-to-date with latest tools. Remove this incorrect heuristic for now. Updates golang/vscode-go#487 Fixes golang/vscode-go#1698 Change-Id: I7a7c6a0d654ae080ea2bd221a366230ebb98bb7e Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/349752 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Rebecca Stambler (cherry picked from commit 23a2db0dca292ef4e5fdf951d309722eb9529813) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/349953 Reviewed-by: Suzy Mueller Trust: Suzy Mueller --- src/goMain.ts | 50 +++----------------------------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/src/goMain.ts b/src/goMain.ts index d3b83a0f8c..e465a9af59 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -873,54 +873,10 @@ function checkToolExists(tool: string) { } async function suggestUpdates(ctx: vscode.ExtensionContext) { - const updateToolsCmdText = 'Update tools'; - interface GoInfo { - goroot: string; - version: string; + // TODO(hyangah): this is to clean up the unused key. Delete this code in 2021 Dec. + if (ctx.globalState.get('toolsGoInfo')) { + ctx.globalState.update('toolsGoInfo', null); } - const toolsGoInfo: { [id: string]: GoInfo } = ctx.globalState.get('toolsGoInfo') || {}; - const toolsGopath = getToolsGopath() || getCurrentGoPath(); - if (!toolsGoInfo[toolsGopath]) { - toolsGoInfo[toolsGopath] = { goroot: null, version: null }; - } - const prevGoroot = toolsGoInfo[toolsGopath].goroot; - const currentGoroot: string = getCurrentGoRoot().toLowerCase(); - if (prevGoroot && prevGoroot.toLowerCase() !== currentGoroot) { - vscode.window - .showInformationMessage( - `Your current goroot (${currentGoroot}) is different than before (${prevGoroot}), a few Go tools may need recompiling`, - updateToolsCmdText - ) - .then((selected) => { - if (selected === updateToolsCmdText) { - installAllTools(true); - } - }); - } else { - const currentVersion = await getGoVersion(); - if (currentVersion) { - const prevVersion = toolsGoInfo[toolsGopath].version; - const currVersionString = currentVersion.format(); - - if (prevVersion !== currVersionString) { - if (prevVersion) { - vscode.window - .showInformationMessage( - 'Your Go version is different than before, a few Go tools may need re-compiling', - updateToolsCmdText - ) - .then((selected) => { - if (selected === updateToolsCmdText) { - installAllTools(true); - } - }); - } - toolsGoInfo[toolsGopath].version = currVersionString; - } - } - } - toolsGoInfo[toolsGopath].goroot = currentGoroot; - ctx.globalState.update('toolsGoInfo', toolsGoInfo); } function configureLanguageServer(ctx: vscode.ExtensionContext) { From e3a7a496973c2eeef66f226ec420cd9a1dcee01f Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 14 Sep 2021 01:08:49 -0400 Subject: [PATCH 121/189] [release] src/goDebugConfiguration: do not merge toolExecutionEnvironment to 'env' toolExecutionEnvironment is populated based on settings.json. The extension merged these env vars into 'env' automatically in order to make the separate legacy debug adapter process use the same env vars when invoking `dlv`. In dlv-dap mode, the extension host spawns dlv processes and can control the environment variables easily. Instead of mutating the launch parameter's env property by merging the toolExecutionEnvironment, this CL uses the env vars only when spawning the dlv process. This makes the debug adapter trace's launch message logging more compact and easier to share/inspect the request. Change-Id: I352528e4907e9b62e79c0f2b4d79f97fcd32c5dc Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/349749 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 97265e832c6abb39e9824b9ea137aedd792dec74) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/349952 Trust: Suzy Mueller --- src/goDebugConfiguration.ts | 24 +++++-- src/goDebugFactory.ts | 5 +- test/integration/goDebug.test.ts | 66 +++++++++++++++++ test/integration/goDebugConfiguration.test.ts | 70 +++++++++++++++++-- test/testdata/envTest/main.go | 11 +++ 5 files changed, 162 insertions(+), 14 deletions(-) create mode 100644 test/testdata/envTest/main.go diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts index ace50e9874..2c55fe3316 100644 --- a/src/goDebugConfiguration.ts +++ b/src/goDebugConfiguration.ts @@ -372,12 +372,24 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr debugConfiguration: vscode.DebugConfiguration, token?: vscode.CancellationToken ): vscode.DebugConfiguration { - // Reads debugConfiguration.envFile and - // combines the environment variables from all the env files and - // debugConfiguration.env, on top of the tools execution environment variables. - // It also unsets 'envFile' from the user-suppled debugConfiguration + const debugAdapter = debugConfiguration['debugAdapter']; + if (debugAdapter === '') { + return null; + } + + // Read debugConfiguration.envFile and + // combine the environment variables from all the env files and + // debugConfiguration.env. + // We also unset 'envFile' from the user-suppled debugConfiguration // because it is already applied. - const goToolsEnvVars = toolExecutionEnvironment(folder?.uri); // also includes GOPATH: getCurrentGoPath(). + // + // For legacy mode, we merge the environment variables on top of + // the tools execution environment variables and update the debugConfiguration + // because VS Code directly handles launch of the legacy debug adapter. + // For dlv-dap mode, we do not merge the tools execution environment + // variables here to reduce the number of environment variables passed + // as launch/attach parameters. + const goToolsEnvVars = debugAdapter === 'legacy' ? toolExecutionEnvironment(folder?.uri) : {}; const fileEnvs = parseEnvFiles(debugConfiguration['envFile']); const env = debugConfiguration['env'] || {}; @@ -387,7 +399,7 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr const entriesWithRelativePaths = ['cwd', 'output', 'program'].filter( (attr) => debugConfiguration[attr] && !path.isAbsolute(debugConfiguration[attr]) ); - if (debugConfiguration['debugAdapter'] === 'dlv-dap') { + if (debugAdapter === 'dlv-dap') { // relative paths -> absolute paths if (entriesWithRelativePaths.length > 0) { const workspaceRoot = folder?.uri.fsPath; diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index 478707aad2..f66a923128 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -16,6 +16,7 @@ import { getTool } from './goTools'; import { Logger, TimestampedLogger } from './goLogging'; import { DebugProtocol } from 'vscode-debugprotocol'; import { getWorkspaceFolderPath } from './util'; +import { toolExecutionEnvironment } from './goEnv'; export class GoDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescriptorFactory { constructor(private outputChannel?: vscode.OutputChannel) {} @@ -342,7 +343,9 @@ function spawnDlvDapServerProcess( logConsole: (msg: string) => void ): Promise { const launchArgsEnv = launchAttachArgs.env || {}; - const env = Object.assign({}, process.env, launchArgsEnv); + const goToolsEnvVars = toolExecutionEnvironment(); + // launchArgsEnv is user-requested env vars (envFiles + env). + const env = Object.assign(goToolsEnvVars, launchArgsEnv); const dlvPath = launchAttachArgs.dlvToolPath ?? getTool('dlv-dap'); diff --git a/test/integration/goDebug.test.ts b/test/integration/goDebug.test.ts index 467588a2eb..8ebb288895 100644 --- a/test/integration/goDebug.test.ts +++ b/test/integration/goDebug.test.ts @@ -13,6 +13,7 @@ import * as net from 'net'; import * as path from 'path'; import * as sinon from 'sinon'; import * as proxy from '../../src/goDebugFactory'; +import * as vscode from 'vscode'; import { DebugConfiguration, DebugProtocolMessage } from 'vscode'; import { DebugClient } from 'vscode-debugadapter-testsupport'; import { ILocation } from 'vscode-debugadapter-testsupport/lib/debugClient'; @@ -24,6 +25,7 @@ import { PackageBuildInfo, RemoteSourcesAndPackages } from '../../src/debugAdapter/goDebug'; +import * as extConfig from '../../src/config'; import { GoDebugConfigurationProvider } from '../../src/goDebugConfiguration'; import { getBinPath, rmdirRecursive } from '../../src/util'; import { killProcessTree } from '../../src/utils/processUtils'; @@ -552,6 +554,70 @@ const testAll = (ctx: Mocha.Context, isDlvDap: boolean) => { }); }); + suite('env', () => { + let sandbox: sinon.SinonSandbox; + + setup(() => { + sandbox = sinon.createSandbox(); + }); + teardown(async () => sandbox.restore()); + + test('env var from go.toolsEnvVars is respected', async () => { + const PROGRAM = path.join(DATA_ROOT, 'envTest'); + const FILE = path.join(PROGRAM, 'main.go'); + const BREAKPOINT_LINE = 10; + + const goConfig = Object.create(vscode.workspace.getConfiguration('go'), { + toolsEnvVars: { + value: { FOO: 'BAR' } + } + }); + const configStub = sandbox.stub(extConfig, 'getGoConfig').returns(goConfig); + + const config = { + name: 'Launch', + type: 'go', + request: 'launch', + mode: 'debug', + program: PROGRAM, + args: ['FOO'] + }; + const debugConfig = await initializeDebugConfig(config); + await dc.hitBreakpoint(debugConfig, getBreakpointLocation(FILE, BREAKPOINT_LINE)); + await assertLocalVariableValue('v', '"BAR"'); + + await dc.continueRequest({ threadId: 1 }); // continue until completion for cleanup. + }); + + test('env var from launch config is respected', async () => { + const PROGRAM = path.join(DATA_ROOT, 'envTest'); + const FILE = path.join(PROGRAM, 'main.go'); + const BREAKPOINT_LINE = 10; + + const goConfig = Object.create(vscode.workspace.getConfiguration('go'), { + toolsEnvVars: { + value: { FOO: 'BAR' } + } + }); + const configStub = sandbox.stub(extConfig, 'getGoConfig').returns(goConfig); + + const config = { + name: 'Launch', + type: 'go', + request: 'launch', + mode: 'debug', + program: PROGRAM, + args: ['FOO'], + env: { FOO: 'BAZ' } + }; + const debugConfig = await initializeDebugConfig(config); + await dc.hitBreakpoint(debugConfig, getBreakpointLocation(FILE, BREAKPOINT_LINE)); + await assertLocalVariableValue('v', '"BAZ"'); + + await dc.continueRequest({ threadId: 1 }); // continue until completion for cleanup. + }); + }); + suite('launch', () => { test('should run program to the end', async () => { const PROGRAM = path.join(DATA_ROOT, 'baseTest'); diff --git a/test/integration/goDebugConfiguration.test.ts b/test/integration/goDebugConfiguration.test.ts index 8ef111c430..14f8930655 100644 --- a/test/integration/goDebugConfiguration.test.ts +++ b/test/integration/goDebugConfiguration.test.ts @@ -45,6 +45,7 @@ suite('Debug Environment Variable Merge Test', () => { }); interface Input { + debugAdapter?: 'dlv-dap' | 'legacy'; env?: { [key: string]: any }; envFile?: string | string[]; toolsEnv?: { [key: string]: any }; @@ -57,7 +58,8 @@ suite('Debug Environment Variable Merge Test', () => { name: 'Launch', request: 'launch', env: input.env, - envFile: input.envFile + envFile: input.envFile, + debugAdapter: input.debugAdapter }); const actual = config.env; @@ -68,14 +70,18 @@ suite('Debug Environment Variable Merge Test', () => { runTest({}, {}); }); - test('toolsEnvVars is propagated', () => { + test('toolsEnvVars is propagated (legacy)', () => { + const debugAdapter = 'legacy'; const toolsEnv = { GOPATH: '/gopath', GOOS: 'valueFromToolsEnv' }; runTest( - { toolsEnv }, + { + debugAdapter, + toolsEnv + }, { GOPATH: '/gopath', GOOS: 'valueFromToolsEnv' @@ -83,6 +89,20 @@ suite('Debug Environment Variable Merge Test', () => { ); }); + test('toolsEnvVars is not propagated', () => { + const toolsEnv = { + GOPATH: '/gopath', + GOOS: 'valueFromToolsEnv' + }; + + runTest( + { + toolsEnv + }, + {} + ); + }); + test('preserves settings from launchArgs.env', () => { const env = { GOPATH: 'valueFromEnv', GOOS: 'valueFromEnv2' }; runTest( @@ -114,16 +134,17 @@ suite('Debug Environment Variable Merge Test', () => { ); }); - test('launchArgs.env overwrites toolsEnvVar', () => { + test('launchArgs.env overwrites toolsEnvVar (legacy)', () => { const toolsEnv = { GOPATH: '/gopath', SOMEVAR1: 'valueFromToolsEnvVar1', SOMEVAR2: 'valueFromToolsEnvVar2' }; + const debugAdapter = 'legacy'; const env = { SOMEVAR1: 'valueFromEnv' }; runTest( - { env, toolsEnv }, + { debugAdapter, env, toolsEnv }, { GOPATH: '/gopath', SOMEVAR1: 'valueFromEnv', @@ -132,7 +153,23 @@ suite('Debug Environment Variable Merge Test', () => { ); }); - test('launchArgs.envFile overwrites toolsEnvVar', () => { + test('launchArgs.env is respected, toolsEnvVar is ignored (dlv-dap)', () => { + const toolsEnv = { + GOPATH: '/gopath', + SOMEVAR1: 'valueFromToolsEnvVar1', + SOMEVAR2: 'valueFromToolsEnvVar2' + }; + + const env = { SOMEVAR1: 'valueFromEnv' }; + runTest( + { env, toolsEnv }, + { + SOMEVAR1: 'valueFromEnv' + } + ); + }); + + test('launchArgs.envFile overwrites toolsEnvVar (legacy)', () => { const toolsEnv = { GOPATH: '/gopath', SOMEVAR1: 'valueFromToolsEnvVar1', @@ -141,8 +178,9 @@ suite('Debug Environment Variable Merge Test', () => { const envFile = path.join(tmpDir, 'env'); fs.writeFileSync(envFile, ['SOMEVAR2=valueFromEnvFile2'].join('\n')); + const debugAdapter = 'legacy'; runTest( - { toolsEnv, envFile }, + { debugAdapter, toolsEnv, envFile }, { GOPATH: '/gopath', SOMEVAR1: 'valueFromToolsEnvVar1', @@ -150,6 +188,24 @@ suite('Debug Environment Variable Merge Test', () => { } ); }); + + test('launchArgs.envFile is repected, and toolsEnvVar is ignored (dlv-dap)', () => { + const toolsEnv = { + GOPATH: '/gopath', + SOMEVAR1: 'valueFromToolsEnvVar1', + SOMEVAR2: 'valueFromToolsEnvVar2' + }; + const envFile = path.join(tmpDir, 'env'); + fs.writeFileSync(envFile, ['SOMEVAR2=valueFromEnvFile2'].join('\n')); + + const debugAdapter = 'dlv-dap'; + runTest( + { debugAdapter, toolsEnv, envFile }, + { + SOMEVAR2: 'valueFromEnvFile2' + } + ); + }); }); suite('Debug Configuration Merge User Settings', () => { diff --git a/test/testdata/envTest/main.go b/test/testdata/envTest/main.go new file mode 100644 index 0000000000..bf5cbec2c1 --- /dev/null +++ b/test/testdata/envTest/main.go @@ -0,0 +1,11 @@ +package main + +import "os" + +func main() { + if len(os.Args) != 2 { + os.Exit(1) + } + v := os.Getenv(os.Args[1]) + println(v) +} From 3c8da71e1b573045109ae4ff255bad787a457aff Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 14 Sep 2021 18:03:56 -0400 Subject: [PATCH 122/189] [release] src/debugAdapter/goDebug: do not log env vars additionally We added this logging while trying to help users inspect env var propagation when using the legacy debug adapter. All the env vars are included as a launch parameter (`env`), so instead users can inspect the DAP trace and this is unnecessary. Remove this - this also pollutes the test logging. Change-Id: I25caeccb1f189291bb662829f544357d419050ef Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/349897 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit d5bd4ebd60f83a8efd4ddcdb1c71d03b35d7ac64) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/350136 --- src/debugAdapter/goDebug.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts index 9eec60e8d0..1ad80c5dc1 100644 --- a/src/debugAdapter/goDebug.ts +++ b/src/debugAdapter/goDebug.ts @@ -506,11 +506,6 @@ export class Delve { log(`Using GOPATH: ${env['GOPATH']}`); log(`Using GOROOT: ${this.goroot}`); log(`Using PATH: ${env['PATH']}`); - if (launchArgs.trace === 'verbose') { - Object.keys(env).forEach((key) => { - log(' export ' + key + '="' + env[key] + '"'); - }); - } if (launchArgs.noDebug) { if (mode === 'debug') { this.noDebug = true; From c61baafe999b393ad11bbe733b9ea185f5c8b1df Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Thu, 9 Sep 2021 18:51:09 -0400 Subject: [PATCH 123/189] [release] goLanguageServer: track language server's restart history And show it in automated issue reports. This will allow us to see if crashes were potentially caused by a bad restart. Sometimes we notice crashes that don't have any associated gopls stack traces, so we were wondering if there is something about the way that we do restarts that causes these issues. Automated issues will list when and why the language server was restarted, as well as when the issue was suggested. Change-Id: I298cb4a4931bfedeb75bada446ddbc480eec1501 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/348973 Reviewed-by: Hyang-Ah Hana Kim Trust: Hyang-Ah Hana Kim Trust: Rebecca Stambler Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro (cherry picked from commit c71634cde6524a35566e9c0ec49a4b76b4560b33) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/350139 Reviewed-by: Rebecca Stambler --- src/goInstallTools.ts | 5 ++-- src/goLanguageServer.ts | 52 ++++++++++++++++++++++++++++++++--------- src/goMain.ts | 9 +++---- 3 files changed, 48 insertions(+), 18 deletions(-) diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index e0b2377b61..cf23f64c06 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -34,7 +34,6 @@ import { getBinPath, getBinPathWithExplanation, getCheckForToolsUpdatesConfig, - getCurrentGoPath, getGoVersion, getTempFilePath, getWorkspaceFolderPath, @@ -44,7 +43,7 @@ import { import { correctBinname, envPath, getCurrentGoRoot, setCurrentGoRoot } from './utils/pathUtils'; import util = require('util'); import vscode = require('vscode'); -import { isInPreviewMode } from './goLanguageServer'; +import { isInPreviewMode, RestartReason } from './goLanguageServer'; // declinedUpdates tracks the tools that the user has declined to update. const declinedUpdates: Tool[] = []; @@ -174,7 +173,7 @@ export async function installTools( if (result.reason === '') { // Restart the language server if a new binary has been installed. if (result.tool.name === 'gopls') { - restartLanguageServer(); + restartLanguageServer('installation'); } } else { failures.push(result); diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts index 2698dc13d9..680dfe318c 100644 --- a/src/goLanguageServer.ts +++ b/src/goLanguageServer.ts @@ -105,8 +105,37 @@ let serverTraceChannel: vscode.OutputChannel; let crashCount = 0; // Some metrics for automated issue reports: -let manualRestartCount = 0; -let totalStartCount = 0; +let restartHistory: Restart[] = []; + +export function updateRestartHistory(reason: RestartReason, enabled: boolean) { + // Keep the history limited to 10 elements. + while (restartHistory.length > 10) { + restartHistory = restartHistory.slice(1); + } + restartHistory.push(new Restart(reason, new Date(), enabled)); +} + +function formatRestartHistory(): string { + const result: string[] = []; + for (const restart of restartHistory) { + result.push(`${restart.timestamp.toUTCString()}: ${restart.reason} (enabled: ${restart.enabled})`); + } + return result.join('\n'); +} + +export type RestartReason = 'activation' | 'manual' | 'config change' | 'installation'; + +class Restart { + reason: RestartReason; + timestamp: Date; + enabled: boolean; + + constructor(reason: RestartReason, timestamp: Date, enabled: boolean) { + this.reason = reason; + this.timestamp = timestamp; + this.enabled = enabled; + } +} // defaultLanguageProviders is the list of providers currently registered. let defaultLanguageProviders: vscode.Disposable[] = []; @@ -121,7 +150,7 @@ export let lastUserAction: Date = new Date(); // startLanguageServerWithFallback starts the language server, if enabled, // or falls back to the default language providers. -export async function startLanguageServerWithFallback(ctx: vscode.ExtensionContext, activation: boolean) { +export async function startLanguageServerWithFallback(ctx: vscode.ExtensionContext, reason: RestartReason) { for (const folder of vscode.workspace.workspaceFolders || []) { switch (folder.uri.scheme) { case 'vsls': @@ -148,9 +177,11 @@ export async function startLanguageServerWithFallback(ctx: vscode.ExtensionConte const goConfig = getGoConfig(); const cfg = buildLanguageServerConfig(goConfig); + updateRestartHistory(reason, cfg.enabled); + // We have some extra prompts for gopls users and for people who have opted // out of gopls. - if (activation) { + if (reason === 'activation') { scheduleGoplsSuggestions(); } @@ -406,9 +437,7 @@ async function startLanguageServer(ctx: vscode.ExtensionContext, config: Languag "Looks like you're about to manually restart the language server.", errorKind.manualRestart ); - - manualRestartCount++; - restartLanguageServer(); + restartLanguageServer('manual'); }); ctx.subscriptions.push(restartCommand); } @@ -418,7 +447,6 @@ async function startLanguageServer(ctx: vscode.ExtensionContext, config: Languag disposeDefaultProviders(); languageServerDisposable = languageClient.start(); - totalStartCount++; ctx.subscriptions.push(languageServerDisposable); await languageClient.onReady(); return true; @@ -922,7 +950,7 @@ export async function watchLanguageServerConfiguration(e: vscode.ConfigurationCh e.affectsConfiguration('go.formatTool') // TODO: Should we check http.proxy too? That affects toolExecutionEnvironment too. ) { - restartLanguageServer(); + restartLanguageServer('config change'); } if (e.affectsConfiguration('go.useLanguageServer') && getGoConfig()['useLanguageServer'] === false) { @@ -1384,6 +1412,7 @@ Please copy the stack trace and error messages from that window and paste it in Failed to auto-collect gopls trace: ${failureReason}. `; + const now = new Date(); const body = ` gopls version: ${usersGoplsVersion} @@ -1393,8 +1422,9 @@ extension version: ${extInfo.version} go version: ${goVersion?.format(true)} environment: ${extInfo.appName} ${process.platform} initialization error: ${initializationError} -manual restart count: ${manualRestartCount} -total start count: ${totalStartCount} +issue timestamp: ${now.toUTCString()} +restart history: +${formatRestartHistory()} ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW. diff --git a/src/goMain.ts b/src/goMain.ts index e465a9af59..eddba07a3c 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -47,6 +47,7 @@ import { import { isInPreviewMode, languageServerIsRunning, + RestartReason, showServerOutputChannel, startLanguageServerWithFallback, watchLanguageServerConfiguration @@ -124,7 +125,7 @@ export let vetDiagnosticCollection: vscode.DiagnosticCollection; // restartLanguageServer wraps all of the logic needed to restart the // language server. It can be used to enable, disable, or otherwise change // the configuration of the server. -export let restartLanguageServer = () => { +export let restartLanguageServer = (reason: RestartReason) => { return; }; @@ -887,12 +888,12 @@ function configureLanguageServer(ctx: vscode.ExtensionContext) { // Set the function that is used to restart the language server. // This is necessary, even if the language server is not currently // in use. - restartLanguageServer = async () => { - startLanguageServerWithFallback(ctx, false); + restartLanguageServer = async (reason: RestartReason) => { + startLanguageServerWithFallback(ctx, reason); }; // Start the language server, or fallback to the default language providers. - return startLanguageServerWithFallback(ctx, true); + return startLanguageServerWithFallback(ctx, 'activation'); } function getCurrentGoPathCommand() { From 98f2fdc5e60fe59d64274bbef7efe9e7b87070c4 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 21 Sep 2021 14:37:15 -0400 Subject: [PATCH 124/189] [release] src/goDebugConfiguration: take program verbatim with external adapter As a fix for golang/vscode-go#1677, the extension massages launch configurations to start dlv from the package directory and locate 'program' to be relative from the package directory. This heuristic does not work well if dlv dap adapter is launched externally so dlv runs from other directory. Until `delveCWD` or a similar mechanism that allows to control where delve runs the build, we take the launch configuration verbatim and avoid any mutation. Relative paths are resolved as described in the descriptions in package.json. This changes only the internal mechanics. Fixes golang/vscode-go#1793 Change-Id: Ic651be25a692dbb23a51707d5ebc274f22a3c532 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/351272 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Polina Sokolova (cherry picked from commit cfee3e1e55c0852c5ce3a784ba31f641893faad7) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/351570 Reviewed-by: Robert Findley --- src/goDebugConfiguration.ts | 16 +++++-- test/integration/goDebugConfiguration.test.ts | 46 +++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts index 2c55fe3316..c7c29f3b89 100644 --- a/src/goDebugConfiguration.ts +++ b/src/goDebugConfiguration.ts @@ -400,7 +400,7 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr (attr) => debugConfiguration[attr] && !path.isAbsolute(debugConfiguration[attr]) ); if (debugAdapter === 'dlv-dap') { - // relative paths -> absolute paths + // 1. Relative paths -> absolute paths if (entriesWithRelativePaths.length > 0) { const workspaceRoot = folder?.uri.fsPath; if (workspaceRoot) { @@ -414,8 +414,18 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr ); } } - // compute build dir, and translate the dirname in program to a path relative to buildDir. - if (debugConfiguration.request === 'launch') { + // 2. For launch debug/test modes that builds the debug target, + // delve needs to be launched from the right directory (inside the main module of the target). + // Compute the launch dir heuristically, and translate the dirname in program to a path relative to buildDir. + // We skip this step when working with externally launched debug adapter + // because we do not control the adapter's launch process. + if ( + debugConfiguration.request === 'launch' && + // Presence of the following attributes indicates externally launched debug adapter. + !debugConfiguration.port && + !debugConfiguration.host && + !debugConfiguration.debugServer + ) { const mode = debugConfiguration['mode'] || 'debug'; if (['debug', 'test', 'auto'].includes(mode)) { // Massage config to build the target from the package directory diff --git a/test/integration/goDebugConfiguration.test.ts b/test/integration/goDebugConfiguration.test.ts index 14f8930655..7e3b4f9634 100644 --- a/test/integration/goDebugConfiguration.test.ts +++ b/test/integration/goDebugConfiguration.test.ts @@ -556,6 +556,52 @@ suite('Debug Configuration Converts Relative Paths', () => { ); }); + test('program and __buildDir are not updated when working with externally launched adapters', () => { + const config: vscode.DebugConfiguration = debugConfig('dlv-dap'); + config.program = path.join('foo', 'bar', 'pkg'); + config.port = 12345; + const workspaceFolder = { + uri: vscode.Uri.file(os.tmpdir()), + name: 'test', + index: 0 + }; + const { program, cwd, __buildDir } = debugConfigProvider.resolveDebugConfigurationWithSubstitutedVariables( + workspaceFolder, + config + ); + assert.deepStrictEqual( + { program, cwd, __buildDir }, + { + program: path.join(os.tmpdir(), 'foo', 'bar', 'pkg'), + cwd: os.tmpdir(), + __buildDir: undefined + } + ); + }); + + test('program and __buildDir are not updated when working with externally launched adapters (debugServer)', () => { + const config: vscode.DebugConfiguration = debugConfig('dlv-dap'); + config.program = path.join('foo', 'bar', 'pkg'); + config.debugServer = 4777; + const workspaceFolder = { + uri: vscode.Uri.file(os.tmpdir()), + name: 'test', + index: 0 + }; + const { program, cwd, __buildDir } = debugConfigProvider.resolveDebugConfigurationWithSubstitutedVariables( + workspaceFolder, + config + ); + assert.deepStrictEqual( + { program, cwd, __buildDir }, + { + program: path.join(os.tmpdir(), 'foo', 'bar', 'pkg'), + cwd: os.tmpdir(), + __buildDir: undefined + } + ); + }); + test('empty, undefined paths are not affected', () => { const config = debugConfig('dlv-dap'); config.program = undefined; From b352037f953faec2ff4798920f06f9737ce4f516 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 24 Sep 2021 10:04:26 -0400 Subject: [PATCH 125/189] [release] CHANGELOG.md: v0.28.1 note Change-Id: I5abe9f098412f2b598de776d6a10bc3b8e447a0c Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/352052 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 9b3e92e8c625df63fcd907e9195b765ea68c49d2) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/352070 --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7f53a656c..fd6c167025 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ -## v0.28.0 - 16 Sep, 2021 +## v0.28.1 - 24 Sep, 2021 + +A list of all issues and changes can be found in the [v0.28.1 milestone](https://github.com/golang/vscode-go/milestone/38) and [commit history](https://github.com/golang/vscode-go/compare/v0.28.0...v0.28.1). + +### Fixes +- Skipped launch configuration adjustment to address build errors when debugging using externally launched delve DAP servers. (Issue [1793](https://github.com/golang/vscode-go/issues/1793)) + +## v0.28.0 - 20 Sep, 2021 This version requires VS Code 1.59 or newer. From 665e26788656b2322d0ec2c7736af75877ac9eed Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 24 Sep 2021 10:26:45 -0400 Subject: [PATCH 126/189] [release] package.json: v0.28.1 Update version string for release Change-Id: I06bdbd26e6623bfb22a062264b7f3d1d90e6ca47 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/352053 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d213729c49..f83d3a79eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.28.0", + "version": "0.28.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.28.0", + "version": "0.28.1", "license": "MIT", "dependencies": { "deep-equal": "^2.0.2", diff --git a/package.json b/package.json index 0f406cb564..8a7e8d7ddd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.28.0", + "version": "0.28.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From e92ab673a9730bdec3c60b0de732a795eb35bc1b Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 24 Sep 2021 16:07:30 -0400 Subject: [PATCH 127/189] [release] src/goDebugConfiguration: pick fix for #1729 During release, part of the fix was dropped. Restored the fix by copying the snapshot of the repo at master before release (171cc61) and pick cfee3e1 the main fix intended for v0.28.1. Updates golang/vscode-go#1729 Change-Id: I54728fa5d11903967a62004bddd6016b43a56dae Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/352056 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller Reviewed-by: Rebecca Stambler --- CHANGELOG.md | 1 + src/goDebugConfiguration.ts | 6 ------ src/goDebugFactory.ts | 3 +++ src/goInstallTools.ts | 1 - 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd6c167025..f94d2cd0ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ A list of all issues and changes can be found in the [v0.28.1 milestone](https:/ ### Fixes - Skipped launch configuration adjustment to address build errors when debugging using externally launched delve DAP servers. (Issue [1793](https://github.com/golang/vscode-go/issues/1793)) +- Restore the fix for Issue [1729](https://github.com/golang/vscode-go/issues/1729) that was accidentally dropped during merge for release. ## v0.28.0 - 20 Sep, 2021 diff --git a/src/goDebugConfiguration.ts b/src/goDebugConfiguration.ts index c7c29f3b89..97e705e551 100644 --- a/src/goDebugConfiguration.ts +++ b/src/goDebugConfiguration.ts @@ -158,12 +158,6 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr // for local mode, default to dlv-dap. debugConfiguration['debugAdapter'] = debugConfiguration['mode'] !== 'remote' ? 'dlv-dap' : 'legacy'; } - if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['port']) { - this.showWarning( - 'ignorePortInDlvDapWarning', - "`port` is ignored with the 'dlv-dap' debugAdapter, which does not yet support remote debugging. Please file an issue if you have a use case that requires port." - ); - } if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['mode'] === 'remote') { this.showWarning( 'ignoreDlvDAPInRemoteModeWarning', diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts index f66a923128..cf9cea7cc9 100644 --- a/src/goDebugFactory.ts +++ b/src/goDebugFactory.ts @@ -38,6 +38,9 @@ export class GoDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr private async createDebugAdapterDescriptorDlvDap( configuration: vscode.DebugConfiguration ): Promise> { + if (configuration.port) { + return new vscode.DebugAdapterServer(configuration.port, configuration.host ?? '127.0.0.1'); + } const logger = new TimestampedLogger(configuration.trace, this.outputChannel); logger.debug(`Config: ${JSON.stringify(configuration)}`); const d = new DelveDAPOutputAdapter(configuration, logger); diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts index cf23f64c06..b8b8071717 100644 --- a/src/goInstallTools.ts +++ b/src/goInstallTools.ts @@ -29,7 +29,6 @@ import { Tool, ToolAtVersion } from './goTools'; -import { getFromWorkspaceState } from './stateUtils'; import { getBinPath, getBinPathWithExplanation, From db76cd2d34a3bb8c664425f5ad7e19c524b8e5b6 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 26 Oct 2021 09:59:48 -0400 Subject: [PATCH 128/189] test/integration/goTest: skip Profile tests Kokoro is stuck again in https://go-review.googlesource.com/c/vscode-go/+/358544/3 Disable a profile test for now. Updates golang/vscode-go#1858 Change-Id: Ia5c05770f924a66287a448f41d843028b9bda264 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/358615 Trust: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- test/integration/goTest.run.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/goTest.run.test.ts b/test/integration/goTest.run.test.ts index 76f3d84b88..f8d8ddf87e 100644 --- a/test/integration/goTest.run.test.ts +++ b/test/integration/goTest.run.test.ts @@ -72,7 +72,7 @@ suite('Go Test Runner', () => { ); }); - test('tests are run individually when profiling', async () => { + test.skip('tests are run individually when profiling', async () => { const tests = Array.from(testExplorer.resolver.allItems).filter((x) => GoTest.parseId(x.id).name); assert(tests, 'No tests found'); From acbe9af91b12c7a8135d7b6316af36c0041810ef Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 9 Dec 2021 13:37:58 -0500 Subject: [PATCH 129/189] LICENSE: updated LICENSE for v0.30.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Used the script with https://go-review.googlesource.com/c/vscode-go/+/370656 Updates golang/vscode-go#1930 Change-Id: I8392416b09afb380f20402006617512cb5881462 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/370714 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Trust: Nooras Saba‎ Reviewed-by: Suzy Mueller --- LICENSE | 206 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 203 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index ffdfd0b02d..5491bb7a46 100644 --- a/LICENSE +++ b/LICENSE @@ -658,7 +658,7 @@ SOFTWARE. ----- -The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, is-typed-array, which-typed-array. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/inspect-js/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/inspect-js/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/inspect-js/is-typed-array.git (is-typed-array), git://github.com/inspect-js/which-typed-array.git (which-typed-array). This software contains the following license and notice below: +The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, is-typed-array, which-typed-array. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/ljharb/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/ljharb/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/inspect-js/is-typed-array.git (is-typed-array), git://github.com/inspect-js/which-typed-array.git (which-typed-array). This software contains the following license and notice below: The MIT License (MIT) @@ -816,7 +816,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following software may be included in this product: faye-websocket. A copy of the source code may be downloaded from git://github.com/faye/faye-websocket-node.git. This software contains the following license and notice below: -Copyright 2010-2021 James Coglan +Copyright 2010-2019 James Coglan Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -1242,7 +1242,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- -The following software may be included in this product: is-bigint. A copy of the source code may be downloaded from git+https://github.com/inspect-js/is-bigint.git. This software contains the following license and notice below: +The following software may be included in this product: is-bigint. A copy of the source code may be downloaded from git+https://github.com/ljharb/is-bigint.git. This software contains the following license and notice below: MIT License @@ -1382,6 +1382,206 @@ SOFTWARE. ----- +The following software may be included in this product: json-schema. A copy of the source code may be downloaded from http://github.com/kriszyp/json-schema. This software contains the following license and notice below: + +Dojo is available under *either* the terms of the BSD 3-Clause "New" License *or* the +Academic Free License version 2.1. As a recipient of Dojo, you may choose which +license to receive this code under (except as noted in per-module LICENSE +files). Some modules may not be the copyright of the Dojo Foundation. These +modules contain explicit declarations of copyright in both the LICENSE files in +the directories in which they reside and in the code itself. No external +contributions are allowed under licenses which are fundamentally incompatible +with the AFL-2.1 OR and BSD-3-Clause licenses that Dojo is distributed under. + +The text of the AFL-2.1 and BSD-3-Clause licenses is reproduced below. + +------------------------------------------------------------------------------- +BSD 3-Clause "New" License: +********************** + +Copyright (c) 2005-2015, The Dojo Foundation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the Dojo Foundation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------- +The Academic Free License, v. 2.1: +********************************** + +This Academic Free License (the "License") applies to any original work of +authorship (the "Original Work") whose owner (the "Licensor") has placed the +following notice immediately following the copyright notice for the Original +Work: + +Licensed under the Academic Free License version 2.1 + +1) Grant of Copyright License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license to do the +following: + +a) to reproduce the Original Work in copies; + +b) to prepare derivative works ("Derivative Works") based upon the Original +Work; + +c) to distribute copies of the Original Work and Derivative Works to the +public; + +d) to perform the Original Work publicly; and + +e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license, under patent +claims owned or controlled by the Licensor that are embodied in the Original +Work as furnished by the Licensor, to make, use, sell and offer for sale the +Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred +form of the Original Work for making modifications to it and all available +documentation describing how to modify the Original Work. Licensor hereby +agrees to provide a machine-readable copy of the Source Code of the Original +Work along with each copy of the Original Work that Licensor distributes. +Licensor reserves the right to satisfy this obligation by placing a +machine-readable copy of the Source Code in an information repository +reasonably calculated to permit inexpensive and convenient access by You for as +long as Licensor continues to distribute the Original Work, and by publishing +the address of that information repository in a notice immediately following +the copyright notice that applies to the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor the names +of any contributors to the Original Work, nor any of their trademarks or +service marks, may be used to endorse or promote products derived from this +Original Work without express prior written permission of the Licensor. Nothing +in this License shall be deemed to grant any rights to trademarks, copyrights, +patents, trade secrets or any other intellectual property of Licensor except as +expressly stated herein. No patent license is granted to make, use, sell or +offer to sell embodiments of any patent claims other than the licensed claims +defined in Section 2. No right is granted to the trademarks of Licensor even if +such marks are included in the Original Work. Nothing in this License shall be +interpreted to prohibit Licensor from licensing under different terms from this +License any Original Work that Licensor otherwise would have a right to +license. + +5) This section intentionally omitted. + +6) Attribution Rights. You must retain, in the Source Code of any Derivative +Works that You create, all copyright, patent or trademark notices from the +Source Code of the Original Work, as well as any notices of licensing and any +descriptive text identified therein as an "Attribution Notice." You must cause +the Source Code for any Derivative Works that You create to carry a prominent +Attribution Notice reasonably calculated to inform recipients that You have +modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that +the copyright in and to the Original Work and the patent rights granted herein +by Licensor are owned by the Licensor or are sublicensed to You under the terms +of this License with the permission of the contributor(s) of those copyrights +and patent rights. Except as expressly stated in the immediately proceeding +sentence, the Original Work is provided under this License on an "AS IS" BASIS +and WITHOUT WARRANTY, either express or implied, including, without limitation, +the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. +This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No +license to Original Work is granted hereunder except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, +whether in tort (including negligence), contract, or otherwise, shall the +Licensor be liable to any person for any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License +or the use of the Original Work including, without limitation, damages for loss +of goodwill, work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses. This limitation of liability shall not +apply to liability for death or personal injury resulting from Licensor's +negligence to the extent applicable law prohibits such limitation. Some +jurisdictions do not allow the exclusion or limitation of incidental or +consequential damages, so this exclusion and limitation may not apply to You. + +9) Acceptance and Termination. If You distribute copies of the Original Work or +a Derivative Work, You must make a reasonable effort under the circumstances to +obtain the express assent of recipients to the terms of this License. Nothing +else but this License (or another written agreement between Licensor and You) +grants You permission to create Derivative Works based upon the Original Work +or to exercise any of the rights granted in Section 1 herein, and any attempt +to do so except under the terms of this License (or another written agreement +between Licensor and You) is expressly prohibited by U.S. copyright law, the +equivalent laws of other countries, and by international treaty. Therefore, by +exercising any of the rights granted to You in Section 1 herein, You indicate +Your acceptance of this License and all of its terms and conditions. + +10) Termination for Patent Action. This License shall terminate automatically +and You may no longer exercise any of the rights granted to You by this License +as of the date You commence an action, including a cross-claim or counterclaim, +against Licensor or any licensee alleging that the Original Work infringes a +patent. This termination provision shall not apply for an action alleging +patent infringement by combinations of the Original Work with other software or +hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this +License may be brought only in the courts of a jurisdiction wherein the +Licensor resides or in which Licensor conducts its primary business, and under +the laws of that jurisdiction excluding its conflict-of-law provisions. The +application of the United Nations Convention on Contracts for the International +Sale of Goods is expressly excluded. Any use of the Original Work outside the +scope of this License or after its termination shall be subject to the +requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et +seq., the equivalent laws of other countries, and international treaty. This +section shall survive the termination of this License. + +12) Attorneys Fees. In any action to enforce the terms of this License or +seeking damages relating thereto, the prevailing party shall be entitled to +recover its costs and expenses, including, without limitation, reasonable +attorneys' fees and costs incurred in connection with such action, including +any appeal of such action. This section shall survive the termination of this +License. + +13) Miscellaneous. This License represents the complete agreement concerning +the subject matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent necessary to +make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether +in upper or lower case, means an individual or a legal entity exercising rights +under, and complying with all of the terms of, this License. For legal +entities, "You" includes any entity that controls, is controlled by, or is +under common control with you. For purposes of this definition, "control" means +(i) the power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty percent +(50%) or more of the outstanding shares, or (iii) beneficial ownership of such +entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise +restricted or conditioned by this License or by law, and Licensor promises not +to interfere with or be responsible for such uses by You. + +This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. +Permission is hereby granted to copy and distribute this license without +modification. This license may not be modified without the express written +permission of its copyright owner. + +----- + The following software may be included in this product: json-stringify-safe, lru-cache, minimatch, once, semver, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver (semver), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below: The ISC License From 30087b87d7af6c64bd7568d2985886ab12658a86 Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 10 Dec 2021 12:20:29 -0500 Subject: [PATCH 130/189] [release] package.json: update gopls settings Using gopls v0.7.4 Updates golang/vscode-go#1930 Change-Id: I73fa85df9532c22b177177c5310baa1d4d4fe486 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/370878 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Trust: Peter Weinberger Reviewed-by: Robert Findley TryBot-Result: kokoro (cherry picked from commit f5e6bec779df2849d28842c3e6fe58d03ea20b51) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/372334 --- docs/settings.md | 17 ++++++++--------- package.json | 16 ++++++++-------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index ab15c9381b..4bb998e8f8 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -573,13 +573,6 @@ comprehensively test. Default: `true` -### `build.experimentalTemplateSupport` - -(Experimental) experimentalTemplateSupport opts into the experimental support -for template files. - - -Default: `false` ### `build.experimentalUseInvalidMetadata` (Experimental) experimentalUseInvalidMetadata enables gopls to fall back on outdated @@ -612,6 +605,12 @@ References and Rename will miss results in such packages. Default: `"Normal"` +### `build.templateExtensions` + +templateExtensions gives the extensions of file names that are treateed +as template files. (The extension +is the part of the file name after the final dot.) + ### `formatting.gofumpt` gofumpt indicates if we should run gofumpt formatting. @@ -720,11 +719,11 @@ Example Usage: | `deepequalerrors` | check for calls of reflect.DeepEqual on error values
    The deepequalerrors checker looks for calls of the form:
    reflect.DeepEqual(err1, err2)
    where err1 and err2 are errors. Using reflect.DeepEqual to compare errors is discouraged.
    Default: `true` | | `errorsas` | report passing non-pointer or non-error values to errors.As
    The errorsas analysis reports calls to errors.As where the type of the second argument is not a pointer to a type implementing error.
    Default: `true` | | `fieldalignment` | find structs that would use less memory if their fields were sorted
    This analyzer find structs that can be rearranged to use less memory, and provides a suggested edit with the optimal order.
    Note that there are two different diagnostics reported. One checks struct size, and the other reports "pointer bytes" used. Pointer bytes is how many bytes of the object that the garbage collector has to potentially scan for pointers, for example:
    struct { uint32; string }

    have 16 pointer bytes because the garbage collector has to scan up through the string's inner pointer.
    struct { string; *uint32 }

    has 24 pointer bytes because it has to scan further through the *uint32.
    struct { string; uint32 }

    has 8 because it can stop immediately after the string pointer.

    Default: `false` | -| `fillreturns` | suggested fixes for "wrong number of return values (want %d, got %d)"
    This checker provides suggested fixes for type errors of the type "wrong number of return values (want %d, got %d)". For example:
    func m() (int, string, *bool, error) {
    return
    }
    will turn into
    func m() (int, string, *bool, error) {
    return 0, "", nil, nil
    }

    This functionality is similar to https://github.com/sqs/goreturns.

    Default: `true` | +| `fillreturns` | suggest fixes for errors due to an incorrect number of return values
    This checker provides suggested fixes for type errors of the type "wrong number of return values (want %d, got %d)". For example:
    func m() (int, string, *bool, error) {
    return
    }
    will turn into
    func m() (int, string, *bool, error) {
    return 0, "", nil, nil
    }

    This functionality is similar to https://github.com/sqs/goreturns.

    Default: `true` | | `fillstruct` | note incomplete struct initializations
    This analyzer provides diagnostics for any struct literals that do not have any fields initialized. Because the suggested fix for this analysis is expensive to compute, callers should compute it separately, using the SuggestedFix function below.

    Default: `true` | | `httpresponse` | check for mistakes using HTTP responses
    A common mistake when using the net/http package is to defer a function call to close the http.Response Body before checking the error that determines whether the response is valid:
    resp, err := http.Head(url)
    defer resp.Body.Close()
    if err != nil {
    log.Fatal(err)
    }
    // (defer statement belongs here)

    This checker helps uncover latent nil dereference bugs by reporting a diagnostic for such mistakes.
    Default: `true` | | `ifaceassert` | detect impossible interface-to-interface type assertions
    This checker flags type assertions v.(T) and corresponding type-switch cases in which the static type V of v is an interface that cannot possibly implement the target interface T. This occurs when V and T contain methods with the same name but different signatures. Example:
    var v interface {
    Read()
    }
    _ = v.(io.Reader)

    The Read method in v has a different signature than the Read method in io.Reader, so this assertion cannot succeed.

    Default: `true` | -| `infertypeargs` | check for unnecessary type arguments in call expressions
    Explicit type arguments may be omitted from call expressions if they can be inferred from function arguments, or from other type arguments:
    func f[T any](T) {}
    func _() {
    f[string]("foo") // string could be inferred
    }

    Default: `true` | +| `infertypeargs` | check for unnecessary type arguments in call expressions
    Explicit type arguments may be omitted from call expressions if they can be inferred from function arguments, or from other type arguments:
    func f[T any](T) {}


    func _() {
    f[string]("foo") // string could be inferred
    }


    Default: `true` | | `loopclosure` | check references to loop variables from within nested functions
    This analyzer checks for references to loop variables from within a function literal inside the loop body. It checks only instances where the function literal is called in a defer or go statement that is the last statement in the loop body, as otherwise we would need whole program analysis.
    For example:
    for i, v := range s {
    go func() {
    println(i, v) // not what you might expect
    }()
    }

    See: https://golang.org/doc/go_faq.html#closures_and_goroutines
    Default: `true` | | `lostcancel` | check cancel func returned by context.WithCancel is called
    The cancellation function returned by context.WithCancel, WithTimeout, and WithDeadline must be called or the new context will remain live until its parent context is cancelled. (The background context is never cancelled.)
    Default: `true` | | `nilfunc` | check for useless comparisons between functions and nil
    A useless comparison is one like f == nil as opposed to f() == nil.
    Default: `true` | diff --git a/package.json b/package.json index aa45c7fe6c..d7fe9ae265 100644 --- a/package.json +++ b/package.json @@ -1999,12 +1999,6 @@ "default": true, "scope": "resource" }, - "build.experimentalTemplateSupport": { - "type": "boolean", - "markdownDescription": "(Experimental) experimentalTemplateSupport opts into the experimental support\nfor template files.\n", - "default": false, - "scope": "resource" - }, "build.experimentalUseInvalidMetadata": { "type": "boolean", "markdownDescription": "(Experimental) experimentalUseInvalidMetadata enables gopls to fall back on outdated\npackage metadata to provide editor features if the go command fails to\nload packages for some reason (like an invalid go.mod file). This will\neventually be the default behavior, and this setting will be removed.\n", @@ -2031,6 +2025,12 @@ "default": "Normal", "scope": "resource" }, + "build.templateExtensions": { + "type": "array", + "markdownDescription": "templateExtensions gives the extensions of file names that are treateed\nas template files. (The extension\nis the part of the file name after the final dot.)\n", + "default": "[\"tmpl\",\"gotmpl\"]", + "scope": "resource" + }, "formatting.gofumpt": { "type": "boolean", "markdownDescription": "gofumpt indicates if we should run gofumpt formatting.\n", @@ -2186,7 +2186,7 @@ }, "fillreturns": { "type": "boolean", - "markdownDescription": "suggested fixes for \"wrong number of return values (want %d, got %d)\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"wrong number of return values (want %d, got %d)\". For example:\n\tfunc m() (int, string, *bool, error) {\n\t\treturn\n\t}\nwill turn into\n\tfunc m() (int, string, *bool, error) {\n\t\treturn 0, \"\", nil, nil\n\t}\n\nThis functionality is similar to https://github.com/sqs/goreturns.\n", + "markdownDescription": "suggest fixes for errors due to an incorrect number of return values\n\nThis checker provides suggested fixes for type errors of the\ntype \"wrong number of return values (want %d, got %d)\". For example:\n\tfunc m() (int, string, *bool, error) {\n\t\treturn\n\t}\nwill turn into\n\tfunc m() (int, string, *bool, error) {\n\t\treturn 0, \"\", nil, nil\n\t}\n\nThis functionality is similar to https://github.com/sqs/goreturns.\n", "default": true }, "fillstruct": { @@ -2206,7 +2206,7 @@ }, "infertypeargs": { "type": "boolean", - "markdownDescription": "check for unnecessary type arguments in call expressions\n\nExplicit type arguments may be omitted from call expressions if they can be\ninferred from function arguments, or from other type arguments:\n\nfunc f[T any](T) {}\n\nfunc _() {\n\tf[string](\"foo\") // string could be inferred\n}\n", + "markdownDescription": "check for unnecessary type arguments in call expressions\n\nExplicit type arguments may be omitted from call expressions if they can be\ninferred from function arguments, or from other type arguments:\n\n\tfunc f[T any](T) {}\n\t\n\tfunc _() {\n\t\tf[string](\"foo\") // string could be inferred\n\t}\n", "default": true }, "loopclosure": { From 94d18e4f47b4f32666900767ba9070039ad4a5f4 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Tue, 25 Jan 2022 14:27:34 -0700 Subject: [PATCH 131/189] CHANGELOG.md: Update changelog for release continued Change-Id: Ib85c505426ce87d42a9c0bc44304c16f720618fb Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/380814 Trust: Suzy Mueller Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit b5b4835b048a608c56a61b4562c38cacaade4773) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/380815 --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19510a58ce..f9542cca51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## v0.31.0 - 20 Jan, 2022 +## v0.31.0 - 26 Jan, 2022 + +A list of all issues and changes can be found in the [v0.31.0 milestone](https://github.com/golang/vscode-go/milestone/41) and [commit history](https://github.com/golang/vscode-go/compare/v0.30.0...v0.31.0). ### Fixes From 0e33c843ef2da8b560438bb85de67e0fa2ff20e3 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 24 Jan 2022 12:20:24 -0500 Subject: [PATCH 132/189] [release] src/goTest: detect Fuzz tests and list them in test explorer UI Detected fuzz functions are classified as a 'fuzz' type, so we can later add special handling for fuzzing functionality. Now they are like other test functions. For golang/vscode-go#2023 Change-Id: I7f3998ec6acf8a766c05380077d41c459d685079 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/380500 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit c42b3cd5c35ddcb1d7b3e32e7d6e9841b40f9dfd) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/383218 Reviewed-by: Robert Findley --- src/goTest/resolve.ts | 4 ++-- src/goTest/utils.ts | 8 +++++--- test/integration/goTest.resolve.test.ts | 4 +++- test/integration/goTest.utils.ts | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/goTest/resolve.ts b/src/goTest/resolve.ts index 444e3331b7..f1fb8c1972 100644 --- a/src/goTest/resolve.ts +++ b/src/goTest/resolve.ts @@ -27,7 +27,7 @@ import { walk, WalkStop } from './walk'; export type ProvideSymbols = (doc: TextDocument, token: CancellationToken) => Thenable; -const testFuncRegex = /^(?(?Test|Benchmark|Example)($|\P{Ll}.*))/u; +const testFuncRegex = /^(?(?Test|Benchmark|Example|Fuzz)($|\P{Ll}.*))/u; const testMethodRegex = /^\(\*(?[^)]+)\)\.(?(?Test)($|\P{Ll}.*))$/u; const runTestSuiteRegex = /^\s*suite\.Run\(\w+,\s*(?:&?(?\w+)\{\}|new\((?\w+)\))\)/mu; @@ -393,7 +393,7 @@ export class GoTestResolver { return suite; } - // Recursively process a Go AST symbol. If the symbol represents a test, + // Recursively process a Go AST symbol. If the symbol represents a test, fuzz test, // benchmark, or example function, a test item will be created for it, if one // does not already exist. If the symbol is not a function and contains // children, those children will be processed recursively. diff --git a/src/goTest/utils.ts b/src/goTest/utils.ts index 9cc92c4db3..95e872da8a 100644 --- a/src/goTest/utils.ts +++ b/src/goTest/utils.ts @@ -13,14 +13,15 @@ import { GoTestResolver } from './resolve'; // - A 'package' is a folder that contains .go files (and is not a module) // - A 'file' is a file ending with _test.go // - A 'test' is a Go test, e.g. func TestXxx(t *testing.T) -// - A 'benchmark' is a Go benchmark, e.g. func BenchmarkXxx(t *testing.T) +// - A 'benchmark' is a Go benchmark, e.g. func BenchmarkXxx(t *testing.B) +// - A 'fuzz' is a Fuzz test, e.g., func TestFuzz(f *testing.F) // - An 'example' is a Go example, e.g. func ExampleXxx() // // The top-level test item for a workspace folder is always either a module or a // workspace. If the user opens a file (containing tests) that is not contained // within any workspace folder, a top-level package will be created as a parent // of that file. -export type GoTestKind = 'module' | 'workspace' | 'package' | 'file' | 'test' | 'benchmark' | 'example'; +export type GoTestKind = 'module' | 'workspace' | 'package' | 'file' | 'test' | 'benchmark' | 'fuzz' | 'example'; export class GoTest { // Constructs an ID for an item. The ID of a test item consists of the URI @@ -34,6 +35,7 @@ export class GoTest { // - File: file:///path/to/mod/file.go?file // - Test: file:///path/to/mod/file.go?test#TestXxx // - Benchmark: file:///path/to/mod/file.go?benchmark#BenchmarkXxx + // - Fuzz: file:///path/to/mod/file.go?test#FuzzXxx // - Example: file:///path/to/mod/file.go?example#ExampleXxx static id(uri: vscode.Uri, kind: GoTestKind, name?: string): string { uri = uri.with({ query: kind }); @@ -49,7 +51,7 @@ export class GoTest { const u = vscode.Uri.parse(id); const kind = u.query as GoTestKind; const name = u.fragment; - return { name, kind }; + return { kind, name }; } } diff --git a/test/integration/goTest.resolve.test.ts b/test/integration/goTest.resolve.test.ts index 835f4114e8..a18e65c408 100644 --- a/test/integration/goTest.resolve.test.ts +++ b/test/integration/goTest.resolve.test.ts @@ -172,6 +172,7 @@ suite('Go Test Resolver', () => { func TestFoo(*testing.T) {} func BenchmarkBar(*testing.B) {} func ExampleBaz() {} + func FuzzFuss(*testing.F) {} ` }, item: [ @@ -181,7 +182,8 @@ suite('Go Test Resolver', () => { expect: [ 'file:///src/proj/main_test.go?test#TestFoo', 'file:///src/proj/main_test.go?benchmark#BenchmarkBar', - 'file:///src/proj/main_test.go?example#ExampleBaz' + 'file:///src/proj/main_test.go?example#ExampleBaz', + 'file:///src/proj/main_test.go?fuzz#FuzzFuss' ] } } diff --git a/test/integration/goTest.utils.ts b/test/integration/goTest.utils.ts index 9250f98051..710361f36a 100644 --- a/test/integration/goTest.utils.ts +++ b/test/integration/goTest.utils.ts @@ -13,7 +13,7 @@ import { MockTestWorkspace } from '../mocks/MockTest'; export function getSymbols_Regex(doc: TextDocument, token: unknown): Thenable { const syms: DocumentSymbol[] = []; const range = new Range(new Position(0, 0), new Position(0, 0)); - doc.getText().replace(/^func (Test|Benchmark|Example)([A-Z]\w+)(\(.*\))/gm, (m, type, name, details) => { + doc.getText().replace(/^func (Test|Benchmark|Example|Fuzz)([A-Z]\w+)(\(.*\))/gm, (m, type, name, details) => { syms.push(new DocumentSymbol(type + name, details, SymbolKind.Function, range, range)); return m; }); From c845547072ecd493f436fa12b2334bca0bb0867d Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 24 Jan 2022 12:21:41 -0500 Subject: [PATCH 133/189] [release] src/goTest: remove '#' in subtest name parsing cutset Subtests are detected dynamically - while running tests. GoTestRunner heuristically builds subtest trees by parsing the test names observed while running tests. Before this CL, it used both '/' and '#' as the separator for parsing. For example, it placed a test item for Foo as a child of TestXxx when it observed TestXxx/Foo, and a test item 01 as a child of TestXxx if it saw TestXxx#01. However, go test uses '#' to resolve conflicts in subtest names, so it's not right to assume TestXXX#01 is a subtest of TestXXX. Moreover, treating TestXXX/subtest#01 or TestXXX/subtest#02 as a subtest of TestXXX/subtest confuses the text UI API because `go test -json` will generate event sequence like TestXXX run TestXXX/subtest run TestXXX/subtest#01 run TestXXX/subtest#02 run TestXXX/subtest pass TestXXX/subtest#01 pass TestXXX/subtest#02 pass TestXXX pass That causes the test UI to show only the last item for TestXXX/subtest#02 to appear in TestXXX/subtest's child. This bug also makes Fuzz test's crasher and seed case listing confusing. This CL removes '#' from the cutset. Fixes golang/vscode-go#2023 For golang/vscode-go#1922 Change-Id: I33ba5c17e9095686a87c719d44fe7330269d9cc3 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/380501 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 2735f152fe31270cdb0595e001d37a66b540f94f) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/383935 Reviewed-by: Robert Findley --- src/goTest/run.ts | 8 +++++--- test/integration/goTest.run.test.ts | 6 ++++++ test/testdata/subTest/sub_test.go | 2 ++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/goTest/run.ts b/src/goTest/run.ts index 6958011176..5005243ef1 100644 --- a/src/goTest/run.ts +++ b/src/goTest/run.ts @@ -477,14 +477,16 @@ export class GoTestRunner { } // Resolve a test name to a test item. If the test name is TestXxx/Foo, Foo is - // created as a child of TestXxx. The same is true for TestXxx#Foo and - // TestXxx/#Foo. + // created as a child of TestXxx. resolveTestName(tests: Record, name: string): TestItem | undefined { if (!name) { return; } - const re = /[#/]+/; + // Heuristically determines whether a test is a subtest by checking the existence of "/". + // BUG: go test does not escape "/" included in the name passed to t.Run, so that + // can result in confusing presentation. + const re = /\/+/; const resolve = (parent?: TestItem, start = 0, length = 0): TestItem | undefined => { const pos = start + length; diff --git a/test/integration/goTest.run.test.ts b/test/integration/goTest.run.test.ts index 23d6833b2a..e52d7df57a 100644 --- a/test/integration/goTest.run.test.ts +++ b/test/integration/goTest.run.test.ts @@ -144,6 +144,12 @@ suite('Go Test Runner', () => { const tSub = tMain.children.get(GoTest.id(uri, 'test', 'TestMain/Sub')); assert(tSub, 'Subtest was not created'); + console.log('Locate subtests with conflicting names'); + const tSub2 = tMain.children.get(GoTest.id(uri, 'test', 'TestMain/Sub#01')); + assert(tSub2, 'Subtest #01 was not created'); + const tSub3 = tMain.children.get(GoTest.id(uri, 'test', 'TestMain/Sub#01#01')); + assert(tSub3, 'Subtest #01#01 was not created'); + // Run subtest by itself console.log('Run subtest by itself'); assert(await testExplorer.runner.run({ include: [tSub] }), 'Failed to execute `go test`'); diff --git a/test/testdata/subTest/sub_test.go b/test/testdata/subTest/sub_test.go index d78d47adc3..ce66fe98ad 100644 --- a/test/testdata/subTest/sub_test.go +++ b/test/testdata/subTest/sub_test.go @@ -5,6 +5,8 @@ import "testing" func TestMain(t *testing.T) { t.Log("Main") t.Run("Sub", func(t *testing.T) { t.Log("Sub") }) + t.Run("Sub", func(t *testing.T) { t.Log("Sub#01") }) + t.Run("Sub#01", func(t *testing.T) { t.Log("Sub#01#01") }) } func TestOther(t *testing.T) { From c8584f4fc2ec7adfc944482cbd5e17f46ca25f98 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 1 Feb 2022 18:15:42 -0500 Subject: [PATCH 134/189] [release] src/goTest: avoid a name conflicting with the proposed quickpick api src/goTest used an extended quickpick type that adds a custom property 'kind' to specify the profile type. Unfortunately, that conflicts with the proposed API added during vscode 1.63 dev cycle and breaks the extension's profile feature. Rename ours to 'profilekind'. And reenabled the profile feature tests disabled due to 1858. (but these tests don't exercise the affected code path - quickpick UI interaction) Fixes golang/vscode-go#2048 Updates golang/vscode-go#1858 Change-Id: Iedd1c5f32cdbc8438e203f8989f28bfcaf1c04b4 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/382334 Trust: Hyang-Ah Hana Kim Reviewed-by: Ethan Reesor Reviewed-by: Peter Weinberger (cherry picked from commit 037e8a3cf960e1f46a29b16a22e8daa817704ee3) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/383219 Reviewed-by: Robert Findley Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro --- src/goTest/profile.ts | 8 ++++---- test/integration/goTest.run.test.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/goTest/profile.ts b/src/goTest/profile.ts index f507bbac98..8d495112c8 100644 --- a/src/goTest/profile.ts +++ b/src/goTest/profile.ts @@ -76,16 +76,16 @@ export class GoTestProfiler { } async configure(): Promise { - const { kind } = await vscode.window.showQuickPick( - Kind.all.map((x) => ({ label: x.label, kind: x })), + const { profilekind } = await vscode.window.showQuickPick( + Kind.all.map((x) => ({ label: x.label, profilekind: x })), { title: 'Profile' } ); - if (!kind) return; + if (!profilekind) return; return { - kind: kind.id + kind: profilekind.id }; } diff --git a/test/integration/goTest.run.test.ts b/test/integration/goTest.run.test.ts index e52d7df57a..b08cbc2352 100644 --- a/test/integration/goTest.run.test.ts +++ b/test/integration/goTest.run.test.ts @@ -13,7 +13,7 @@ suite('Go Test Runner', () => { let testExplorer: GoTestExplorer; - suite.skip('Profile', () => { + suite('Profile', () => { const sandbox = sinon.createSandbox(); const ctx = MockExtensionContext.new(); From 470e554446976ca513a0317cbfeb7226745688f9 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 8 Feb 2022 10:32:04 -0500 Subject: [PATCH 135/189] [release] CHANGELOG.md: list changes for v0.31.1 For golang/vscode-go#2060 Change-Id: I9f04c64de4b1816f24d8124b4e4a20d3cde05809 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/384114 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Robert Findley (cherry picked from commit 5b290fab4ae95023f09ca1cbbf3b73411d86752c) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/384115 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9542cca51..4eadd574d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v0.31.1 - 8 Feb, 2022 + +A list of all issues and changes can be found in the [v0.31.1 milestone](https://github.com/golang/vscode-go/milestone/44) and [commit history](https://github.com/golang/vscode-go/compare/v0.31.0...v0.31.1). + +### Fixes +- Fixed the profile functionality broken by VSCode 1.63 ([Issue 2048](https://github.com/golang/vscode-go/issues/2048)) +- Include fuzz tests in test explorer UI ([Issue 2023](https://github.com/golang/vscode-go/issues/2023)) + ## v0.31.0 - 26 Jan, 2022 A list of all issues and changes can be found in the [v0.31.0 milestone](https://github.com/golang/vscode-go/milestone/41) and [commit history](https://github.com/golang/vscode-go/compare/v0.30.0...v0.31.0). From 44e78e90570ed554f42a30ad45751dc57ae8a588 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 8 Feb 2022 13:02:45 -0500 Subject: [PATCH 136/189] [release] package.json: update version to v0.31.1 For golang/vscode-go#2060 Change-Id: Ie9db402fc8fb950b6d8b14e12adc525d107f888a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/384174 Trust: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Robert Findley Reviewed-by: Suzy Mueller TryBot-Result: kokoro --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index baeb441265..7aaccc3dab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.31.0", + "version": "0.31.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.31.0", + "version": "0.31.1", "license": "MIT", "dependencies": { "deep-equal": "2.0.5", diff --git a/package.json b/package.json index 77dfc5b94e..663caa1917 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.31.0", + "version": "0.31.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From c934012fef934a13372244cfac31477593663580 Mon Sep 17 00:00:00 2001 From: Hana Date: Mon, 25 Apr 2022 17:45:11 -0400 Subject: [PATCH 137/189] [release] update LICENSE for v0.33.0 Change-Id: I914707480475bbf3991530b1a3ff933ff9596a5a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/402235 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Russ Cox Reviewed-by: Hyang-Ah Hana Kim Auto-Submit: Hyang-Ah Hana Kim --- LICENSE | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/LICENSE b/LICENSE index 5491bb7a46..3aa32625ed 100644 --- a/LICENSE +++ b/LICENSE @@ -495,25 +495,26 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- -The following software may be included in this product: debug. A copy of the source code may be downloaded from git://github.com/visionmedia/debug.git. This software contains the following license and notice below: +The following software may be included in this product: debug. A copy of the source code may be downloaded from git://github.com/debug-js/debug.git. This software contains the following license and notice below: (The MIT License) -Copyright (c) 2014 TJ Holowaychuk +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- @@ -2253,6 +2254,20 @@ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ----- +The following software may be included in this product: vscode-uri. A copy of the source code may be downloaded from git+https://github.com/microsoft/vscode-uri.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + The following software may be included in this product: web-request. A copy of the source code may be downloaded from git+https://github.com/davetemplin/web-request.git. This software contains the following license and notice below: The MIT License (MIT) From 240336f38f50257afc8b6f13e8b6ee645d986920 Mon Sep 17 00:00:00 2001 From: Hana Date: Tue, 26 Apr 2022 11:01:48 -0400 Subject: [PATCH 138/189] [release] package.json: fix version string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During merge, I forgot to drop -dev suffix. Change-Id: I50399ae9fa34d090936216ee3abbff130eaa4efd Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/402354 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Nooras Saba‎ TryBot-Result: kokoro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 59ffa9811a..5a7a5190f0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.33.0-dev", + "version": "0.33.0", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 48c6b081634cd09824a8d4f0d5fb1e6cc59059ca Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 28 Apr 2022 08:42:53 -0400 Subject: [PATCH 139/189] [release] src/goLanguageServer: timeout LanguageClient.stop call LanguageClient.stop hangs indefinitely if the language server fails to respond to the `shutdown` request. For example, in go.dev/issues/52543 we observed `gopls` crashes during shutdown. Implement a timeout from our side. (2sec) Caveat: If gopls is still active but fails to respond within 2sec, it's possible that we may end up having multiple gopls instances briefly until the previous gopls completes the shutdown process. For golang/vscode-go#1896 For golang/vscode-go#2222 Change-Id: Idbcfd3ee5f94fd3fd8dcafa228c6f03f5e14b905 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/402834 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller Reviewed-by: Jamal Carvalho (cherry picked from commit 9227019e7eca3691665e8c6a15b8cf332febdcf3) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/403414 --- src/language/goLanguageServer.ts | 42 ++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/src/language/goLanguageServer.ts b/src/language/goLanguageServer.ts index db21fcd4d2..51f2903223 100644 --- a/src/language/goLanguageServer.ts +++ b/src/language/goLanguageServer.ts @@ -358,19 +358,18 @@ export const flushGoplsOptOutConfig = (cfg: GoplsOptOutConfig, workspace: boolea async function startLanguageServer(ctx: vscode.ExtensionContext, config: LanguageServerConfig): Promise { // If the client has already been started, make sure to clear existing // diagnostics and stop it. + let cleanStop = true; if (languageClient) { - if (languageClient.diagnostics) { - languageClient.diagnostics.clear(); - } - await languageClient.stop(); + cleanStop = await stopLanguageClient(languageClient); if (languageServerDisposable) { languageServerDisposable.dispose(); } } - // Check if we should recreate the language client. This may be necessary - // if the user has changed settings in their config. - if (!deepEqual(latestConfig, config)) { + // Check if we should recreate the language client. + // This may be necessary if the user has changed settings + // in their config, or previous session wasn't stopped cleanly. + if (!cleanStop || !deepEqual(latestConfig, config)) { // Track the latest config used to start the language server, // and rebuild the language client. latestConfig = config; @@ -411,6 +410,35 @@ async function startLanguageServer(ctx: vscode.ExtensionContext, config: Languag return true; } +const race = function (promise: Promise, timeoutInMilliseconds: number) { + let token: NodeJS.Timeout; + const timeout = new Promise((resolve, reject) => { + token = setTimeout(() => reject('timeout'), timeoutInMilliseconds); + }); + return Promise.race([promise, timeout]).then(() => clearTimeout(token)); +}; + +// exported for testing. +export async function stopLanguageClient(c: LanguageClient): Promise { + if (!c) return false; + + if (c.diagnostics) { + c.diagnostics.clear(); + } + // LanguageClient.stop may hang if the language server + // crashes during shutdown before responding to the + // shutdown request. Enforce client-side timeout. + // TODO(hyangah): replace with the new LSP client API that supports timeout + // and remove this. + try { + await race(c.stop(), 2000); + } catch (e) { + c.outputChannel?.appendLine(`Failed to stop client: ${e}`); + return false; + } + return true; +} + function toServerInfo(res?: InitializeResult): ServerInfo | undefined { if (!res) return undefined; From b31fd410b5d0ed4dcc4bcb2ef12b0ee1f7553aee Mon Sep 17 00:00:00 2001 From: Hana Date: Fri, 6 May 2022 16:53:37 -0400 Subject: [PATCH 140/189] [release] build/all.bash: disable packages.json setting test Updates golang/vscode-go#2230 Change-Id: If5536535ea75a0ee396405943614863afed83790 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/404674 TryBot-Result: kokoro Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller (cherry picked from commit 29bdea3492aa44c25d8f316505a6822856fa792f) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/407879 Reviewed-by: Jamal Carvalho --- build/all.bash | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build/all.bash b/build/all.bash index a0d858a7fb..4a1a7ed387 100755 --- a/build/all.bash +++ b/build/all.bash @@ -50,8 +50,9 @@ run_test() { npm test --silent npm run lint - echo "**** Run settings generator ****" - go run tools/generate.go -w=false -gopls=true + # BUG(github.com/golang/vscode-go/issues/2230): Disable test temporarily. + # echo "**** Run settings generator ****" + # go run tools/generate.go -w=false -gopls=true echo "**** Check if vsce works ****" vsce package From 735fe4edf01c0aff3f429073698ec0371c9e4d23 Mon Sep 17 00:00:00 2001 From: Hana Date: Thu, 5 May 2022 18:02:51 -0400 Subject: [PATCH 141/189] [release] src/goDeveloperSurvey: prepare 2022 mid dev survey - Use UTC - Use lower probability - Include go version and gopls setting info Responders of the last year dev survey may be prompted again. Change-Id: I994a2c2b482960217e5712f936349fcc6fa351be Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/404074 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Jamal Carvalho Reviewed-by: Todd Kulesza (cherry picked from commit 43bc5f9de72610d9785377d7b30ffede73352f64) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/407874 TryBot-Result: kokoro --- src/goDeveloperSurvey.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/goDeveloperSurvey.ts b/src/goDeveloperSurvey.ts index a18e9c1860..9fd01a5e9a 100644 --- a/src/goDeveloperSurvey.ts +++ b/src/goDeveloperSurvey.ts @@ -10,10 +10,11 @@ import vscode = require('vscode'); import { getGoConfig } from './config'; import { lastUserAction } from './language/goLanguageServer'; import { daysBetween, flushSurveyConfig, getStateConfig, minutesBetween, timeMinute } from './goSurvey'; +import { getGoVersion } from './util'; // Start and end dates of the survey. -export const startDate = new Date('2021-10-27'); -export const endDate = new Date('2021-11-16'); +export const startDate = new Date('May 31 2022 00:00:00 GMT'); +export const endDate = new Date('June 21 2022 00:00:00 GMT'); // DeveloperSurveyConfig is the set of global properties used to determine if // we should prompt a user to take the gopls survey. @@ -86,7 +87,7 @@ export function shouldPromptForSurvey(now: Date, cfg: DeveloperSurveyConfig): De // is done by generating a random number in the range [0, 1) and checking // if it is < probability. if (cfg.prompt === undefined) { - const probability = 0.2; + const probability = 0.1; cfg.datePromptComputed = now; cfg.prompt = Math.random() < probability; } @@ -140,7 +141,10 @@ by participating in this 10-minute survey before ${endDate.toDateString()}?`, { cfg.lastDateAccepted = now; cfg.prompt = true; - const surveyURL = 'https://google.qualtrics.com/jfe/form/SV_0BwHwKSaeE9Cx2S?s=p'; + const goV = await getGoVersion(); + const goVersion = goV ? goV.format(true) : 'na'; + const useGopls = getGoConfig()?.get('useLanguageServer') === true ? 'true' : 'false'; + const surveyURL = `https://google.qualtrics.com/jfe/form/SV_7O3x4IZKiUn0QCO?s=p&go=${goVersion}&gopls=${useGopls}`; await vscode.env.openExternal(vscode.Uri.parse(surveyURL)); } break; From 7169ddef4646d5c30fba3989a7d7e59da983d6b7 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Thu, 19 May 2022 12:24:01 -0400 Subject: [PATCH 142/189] [release] package.json: sync doc with gopls@v0.8.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibdaccd11a7d65b603d78831ce7ae8e703902bf33 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/407355 TryBot-Result: kokoro Run-TryBot: Hyang-Ah Hana Kim Auto-Submit: Hyang-Ah Hana Kim Reviewed-by: Nooras Saba‎ (cherry picked from commit 27ca045b34525c39b92b39f7b503e1e785e1c624) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/407875 Reviewed-by: Jamal Carvalho --- docs/settings.md | 1 + package.json | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/settings.md b/docs/settings.md index bf0945cb7d..1370d64e94 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -734,6 +734,7 @@ Example Usage: | `composites` | check for unkeyed composite literals
    This analyzer reports a diagnostic for composite literals of struct types imported from another package that do not use the field-keyed syntax. Such literals are fragile because the addition of a new field (even if unexported) to the struct will cause compilation to fail.
    As an example,
    err = &net.DNSConfigError{err}

    should be replaced by:
    err = &net.DNSConfigError{Err: err}


    Default: `true` | | `copylocks` | check for locks erroneously passed by value
    Inadvertently copying a value containing a lock, such as sync.Mutex or sync.WaitGroup, may cause both copies to malfunction. Generally such values should be referred to through a pointer.
    Default: `true` | | `deepequalerrors` | check for calls of reflect.DeepEqual on error values
    The deepequalerrors checker looks for calls of the form:
    reflect.DeepEqual(err1, err2)
    where err1 and err2 are errors. Using reflect.DeepEqual to compare errors is discouraged.
    Default: `true` | +| `embed` | check for //go:embed directive import
    This analyzer checks that the embed package is imported when source code contains //go:embed comment directives. The embed package must be imported for //go:embed directives to function.import _ "embed".
    Default: `true` | | `errorsas` | report passing non-pointer or non-error values to errors.As
    The errorsas analysis reports calls to errors.As where the type of the second argument is not a pointer to a type implementing error.
    Default: `true` | | `fieldalignment` | find structs that would use less memory if their fields were sorted
    This analyzer find structs that can be rearranged to use less memory, and provides a suggested edit with the optimal order.
    Note that there are two different diagnostics reported. One checks struct size, and the other reports "pointer bytes" used. Pointer bytes is how many bytes of the object that the garbage collector has to potentially scan for pointers, for example:
    struct { uint32; string }

    have 16 pointer bytes because the garbage collector has to scan up through the string's inner pointer.
    struct { string; *uint32 }

    has 24 pointer bytes because it has to scan further through the *uint32.
    struct { string; uint32 }

    has 8 because it can stop immediately after the string pointer.

    Default: `false` | | `fillreturns` | suggest fixes for errors due to an incorrect number of return values
    This checker provides suggested fixes for type errors of the type "wrong number of return values (want %d, got %d)". For example:
    func m() (int, string, *bool, error) {
    return
    }
    will turn into
    func m() (int, string, *bool, error) {
    return 0, "", nil, nil
    }

    This functionality is similar to https://github.com/sqs/goreturns.

    Default: `true` | diff --git a/package.json b/package.json index 5a7a5190f0..87af6a9abf 100644 --- a/package.json +++ b/package.json @@ -2267,6 +2267,11 @@ "markdownDescription": "check for calls of reflect.DeepEqual on error values\n\nThe deepequalerrors checker looks for calls of the form:\n\n reflect.DeepEqual(err1, err2)\n\nwhere err1 and err2 are errors. Using reflect.DeepEqual to compare\nerrors is discouraged.", "default": true }, + "embed": { + "type": "boolean", + "markdownDescription": "check for //go:embed directive import\n\nThis analyzer checks that the embed package is imported when source code contains //go:embed comment directives.\nThe embed package must be imported for //go:embed directives to function.import _ \"embed\".", + "default": true + }, "errorsas": { "type": "boolean", "markdownDescription": "report passing non-pointer or non-error values to errors.As\n\nThe errorsas analysis reports calls to errors.As where the type\nof the second argument is not a pointer to a type implementing error.", From af09648c5ba61ad7bf3ed9efa47e2e5709853523 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 23 May 2022 11:02:48 -0400 Subject: [PATCH 143/189] [release] CHANGELOG.md: prepare for v0.33.1 Updates golang/vscode-go#2225 Updates golang/vscode-go#2251 Change-Id: Ie14ce5afa26454b87c2aa8dc131d0342b9d48dab Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/407876 Reviewed-by: Jamal Carvalho (cherry picked from commit 450ffa7864305a583a7d39cd3419ebce7047748e) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/407882 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca38c5e6cf..9b9a3e0765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ -## v0.33.0 - 28 Apr, 2022 +## v0.33.1 - 24 May, 2022 + +This is the last release that supports Visual Studio Code 1.66 or older. +We plan to add support for [LSP 3.17](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#whatIsNew) in the next release and the change requires Visual Studio Code [1.67+](https://code.visualstudio.com/updates/v1_67). + +### Changes + +* Updated settings to be in sync with `gopls@v0.8.4`. See [the release note](https://github.com/golang/tools/releases/tag/gopls%2Fv0.8.4) to learn new features like the `//go:embed` analyzer, and improved hover for imported packages. +* Prepared for 2022 mid-year Go developer survey. + +## v0.33.0 - 1 May, 2022 📣 [Remote attach debugging](docs/debugging.md#connecting-to-headless-delve-with-target-specified-at-server-start-up) is now available via Delve's native DAP implementation with Delve v1.7.3 or newer. It is now the default with the [Go Nightly](docs/nightly.md) and will become the default for the stable releases in mid 2022. From 797474c1e2fefd4fd5df2f8f7a231eecc6d342fe Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 23 May 2022 16:47:07 -0400 Subject: [PATCH 144/189] [release] package.json: update version to v0.33.1 Updates golang/vscode-go#2251 Change-Id: If61ba81b2348ac3c5bd69c6a4f1dbe52d835cbf3 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/407883 TryBot-Result: kokoro Reviewed-by: Jamal Carvalho Run-TryBot: Hyang-Ah Hana Kim --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93f4da3ade..ad0e2a5951 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.33.0", + "version": "0.33.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.33.0", + "version": "0.33.1", "license": "MIT", "dependencies": { "deep-equal": "2.0.5", diff --git a/package.json b/package.json index 87af6a9abf..12d320e0c9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.33.0", + "version": "0.33.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From ba052ca5b140698c2194811fb94083da8bb4614e Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 8 Jun 2022 14:01:00 -0400 Subject: [PATCH 145/189] [release] update LICENSE for v0.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I048cc35c231c17f88021c23ef4464680126d7570 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/411098 Reviewed-by: Nooras Saba‎ --- LICENSE | 446 +------------------------------------------------------- 1 file changed, 2 insertions(+), 444 deletions(-) diff --git a/LICENSE b/LICENSE index 3aa32625ed..f2da3c2273 100644 --- a/LICENSE +++ b/LICENSE @@ -104,32 +104,6 @@ SOFTWARE. ----- -The following software may be included in this product: available-typed-arrays. A copy of the source code may be downloaded from git+https://github.com/inspect-js/available-typed-arrays.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2020 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - The following software may be included in this product: aws-sign2, forever-agent, oauth-sign, request, tunnel-agent. A copy of the source code may be downloaded from https://github.com/mikeal/aws-sign (aws-sign2), https://github.com/mikeal/forever-agent (forever-agent), https://github.com/mikeal/oauth-sign (oauth-sign), https://github.com/request/request.git (request), https://github.com/mikeal/tunnel-agent (tunnel-agent). This software contains the following license and notice below: Apache License @@ -311,7 +285,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ----- -The following software may be included in this product: brace-expansion, isarray. A copy of the source code may be downloaded from git://github.com/juliangruber/brace-expansion.git (brace-expansion), git://github.com/juliangruber/isarray.git (isarray). This software contains the following license and notice below: +The following software may be included in this product: brace-expansion. A copy of the source code may be downloaded from git://github.com/juliangruber/brace-expansion.git. This software contains the following license and notice below: MIT License @@ -337,32 +311,6 @@ SOFTWARE. ----- -The following software may be included in this product: call-bind, get-intrinsic. A copy of the source code may be downloaded from git+https://github.com/ljharb/call-bind.git (call-bind), git+https://github.com/ljharb/get-intrinsic.git (get-intrinsic). This software contains the following license and notice below: - -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - The following software may be included in this product: caseless. A copy of the source code may be downloaded from https://github.com/mikeal/caseless. This software contains the following license and notice below: Apache License @@ -519,58 +467,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- -The following software may be included in this product: deep-equal. A copy of the source code may be downloaded from http://github.com/inspect-js/node-deep-equal.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2012, 2013, 2014 James Halliday , 2009 Thomas Robinson <280north.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: define-properties, es-abstract. A copy of the source code may be downloaded from git://github.com/ljharb/define-properties.git (define-properties), git://github.com/ljharb/es-abstract.git (es-abstract). This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (C) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - The following software may be included in this product: diff. A copy of the source code may be downloaded from git://github.com/kpdecker/jsdiff.git. This software contains the following license and notice below: Software License Agreement (BSD License) @@ -633,58 +529,6 @@ SOFTWARE. ----- -The following software may be included in this product: es-get-iterator, has-bigints, side-channel, unbox-primitive, which-boxed-primitive. A copy of the source code may be downloaded from git+https://github.com/ljharb/es-get-iterator.git (es-get-iterator), git+https://github.com/ljharb/has-bigints.git (has-bigints), git+https://github.com/ljharb/side-channel.git (side-channel), git+https://github.com/ljharb/unbox-primitive.git (unbox-primitive), git+https://github.com/inspect-js/which-boxed-primitive.git (which-boxed-primitive). This software contains the following license and notice below: - -MIT License - -Copyright (c) 2019 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, is-typed-array, which-typed-array. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/ljharb/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/ljharb/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/inspect-js/is-typed-array.git (is-typed-array), git://github.com/inspect-js/which-typed-array.git (which-typed-array). This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2015 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - The following software may be included in this product: es5class. A copy of the source code may be downloaded from https://github.com/pocesar/ES5-Class.git. This software contains the following license and notice below: (The MIT License) @@ -832,35 +676,6 @@ specific language governing permissions and limitations under the License. ----- -The following software may be included in this product: foreach. A copy of the source code may be downloaded from git://github.com/manuelstofer/foreach. This software contains the following license and notice below: - -The MIT License - -Copyright (c) 2013 Manuel Stofer - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - ------ - The following software may be included in this product: form-data. A copy of the source code may be downloaded from git://github.com/form-data/form-data.git. This software contains the following license and notice below: Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors @@ -933,30 +748,6 @@ the licensed code: ----- -The following software may be included in this product: function-bind. A copy of the source code may be downloaded from git://github.com/Raynos/function-bind.git. This software contains the following license and notice below: - -Copyright (c) 2013 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - The following software may be included in this product: getpass, http-signature, sshpk. A copy of the source code may be downloaded from https://github.com/arekinath/node-getpass.git (getpass), git://github.com/joyent/node-http-signature.git (http-signature), git+https://github.com/joyent/node-sshpk.git (sshpk). This software contains the following license and notice below: Copyright Joyent, Inc. All rights reserved. @@ -1038,32 +829,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ----- -The following software may be included in this product: has-symbols. A copy of the source code may be downloaded from git://github.com/inspect-js/has-symbols.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - The following software may be included in this product: http-parser-js. A copy of the source code may be downloaded from git://github.com/creationix/http-parser-js.git. This software contains the following license and notice below: Copyright (c) 2015 Tim Caswell (https://github.com/creationix) and other @@ -1218,83 +983,6 @@ PERFORMANCE OF THIS SOFTWARE. ----- -The following software may be included in this product: is-arguments, is-negative-zero, is-regex, object-is. A copy of the source code may be downloaded from git://github.com/inspect-js/is-arguments.git (is-arguments), git://github.com/inspect-js/is-negative-zero.git (is-negative-zero), git://github.com/inspect-js/is-regex.git (is-regex), git://github.com/es-shims/object-is.git (object-is). This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: is-bigint. A copy of the source code may be downloaded from git+https://github.com/ljharb/is-bigint.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2018 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: is-map, is-set, is-weakmap, is-weakset, which-collection. A copy of the source code may be downloaded from git+https://github.com/inspect-js/is-map.git (is-map), git+https://github.com/inspect-js/is-set.git (is-set), git+https://github.com/inspect-js/is-weakmap.git (is-weakmap), git+https://github.com/inspect-js/is-weakset.git (is-weakset), git+https://github.com/inspect-js/which-collection.git (which-collection). This software contains the following license and notice below: - -MIT License - -Copyright (c) 2019 Inspect JS - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - The following software may be included in this product: isstream. A copy of the source code may be downloaded from https://github.com/rvagg/isstream.git. This software contains the following license and notice below: The MIT License (MIT) @@ -1583,7 +1271,7 @@ permission of its copyright owner. ----- -The following software may be included in this product: json-stringify-safe, lru-cache, minimatch, once, semver, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver (semver), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below: +The following software may be included in this product: json-stringify-safe, lru-cache, minimatch, once, semver, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver.git (semver), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below: The ISC License @@ -1843,84 +1531,6 @@ THE SOFTWARE. ----- -The following software may be included in this product: object-inspect. A copy of the source code may be downloaded from git://github.com/inspect-js/object-inspect.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: object-keys. A copy of the source code may be downloaded from git://github.com/ljharb/object-keys.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (C) 2013 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: object.assign. A copy of the source code may be downloaded from git://github.com/ljharb/object.assign.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - The following software may be included in this product: performance-now. A copy of the source code may be downloaded from git://github.com/braveg1rl/performance-now.git. This software contains the following license and notice below: Copyright (c) 2013 Braveg1rl @@ -1980,32 +1590,6 @@ The complete list of contributors can be found at: https://github.com/hapijs/qs/ ----- -The following software may be included in this product: regexp.prototype.flags. A copy of the source code may be downloaded from git://github.com/es-shims/RegExp.prototype.flags.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (C) 2014 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - The following software may be included in this product: safe-buffer. A copy of the source code may be downloaded from git://github.com/feross/safe-buffer.git. This software contains the following license and notice below: The MIT License (MIT) @@ -2058,32 +1642,6 @@ SOFTWARE. ----- -The following software may be included in this product: string.prototype.trimend, string.prototype.trimstart. A copy of the source code may be downloaded from git://github.com/es-shims/String.prototype.trimEnd.git (string.prototype.trimend), git://github.com/es-shims/String.prototype.trimStart.git (string.prototype.trimstart). This software contains the following license and notice below: - -MIT License - -Copyright (c) 2017 Khaled Al-Ansari - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - The following software may be included in this product: tough-cookie. A copy of the source code may be downloaded from git://github.com/salesforce/tough-cookie.git. This software contains the following license and notice below: Copyright (c) 2015, Salesforce.com, Inc. From 4c7d070890af5f7e323b5f18d859e3ae2f448ad0 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Thu, 9 Jun 2022 15:38:36 -0400 Subject: [PATCH 146/189] CHANGELOG: initial CHANGELOG for v0.34.0 Change-Id: I939689b2bafa631ebd6dacbdf0160bceba61eb91 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/411078 Run-TryBot: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim TryBot-Result: kokoro --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b9a3e0765..b5a0b52452 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.34.0 - 22 June, 2022 + +This release adds support for [LSP 3.17](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#whatIsNew) and requires Visual Studio Code [1.67+](https://code.visualstudio.com/updates/v1_67). + ## v0.33.1 - 24 May, 2022 This is the last release that supports Visual Studio Code 1.66 or older. From 009baba817145c61d1453a747fe4c00b0cd5088c Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 15 Jun 2022 16:43:20 -0400 Subject: [PATCH 147/189] CHANGELOG.md: update CHANGELOG for v0.34.0 For golang/vscode-go#2252 Change-Id: If28a553503e7cc6b64ef94ad6ed4d28a089abb60 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/412316 Run-TryBot: Suzy Mueller Reviewed-by: Jamal Carvalho TryBot-Result: kokoro --- CHANGELOG.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5a0b52452..6d66d30c38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,26 @@ This release adds support for [LSP 3.17](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#whatIsNew) and requires Visual Studio Code [1.67+](https://code.visualstudio.com/updates/v1_67). +### Features +This release includes improvements to the `Go: Run Vulncheck (Experimental)` command ([Issue 2185](https://github.com/golang/vscode-go/issues/2185), [2186](https://github.com/golang/vscode-go/issues/2186), [2214](https://github.com/golang/vscode-go/issues/2214)). Use it to find security issues in your dependencies. + +### Documentation +Documentation for vscode-go can now be found on the [wiki](https://github.com/golang/vscode-go/wiki) ([Issue 2094](https://github.com/golang/vscode-go/issues/2094)). + +Thanks @thediveo for updating the debugging documentation! + +### Bug Fixes +`TestMain(m *testing.M)` is no longer treated as a test ([Issue 482](https://github.com/golang/vscode-go/issues/482), [2039](https://github.com/golang/vscode-go/issues/2039)) + +### Code Health +- Enabled strict type checking ([Issue 57](https://github.com/golang/vscode-go/issues/57)) +- Updated release notes generation script to improve release process automation +- Fixed bugs in testing + +### Thanks + +Thank you for your contribution, @hyangah, @jamalc, @polinasok, @suzmue, @thediveo, and @dle8! + ## v0.33.1 - 24 May, 2022 This is the last release that supports Visual Studio Code 1.66 or older. From 0a0827e0a974f6fecccadacefc03889a889ebd83 Mon Sep 17 00:00:00 2001 From: Jamal Carvalho Date: Tue, 21 Jun 2022 18:47:32 +0000 Subject: [PATCH 148/189] [release] src/commands: catch errors when starting language server Added a catch block to the start language server logic to ensure the rest of the extension activation completes. Change-Id: I1664da130a981ef8034d1f0e8723b72a4be2d594 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/413424 Run-TryBot: Jamal Carvalho Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 8dfd39349da7a523b4ed0f781c9d10c753be76bf) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/414458 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller --- src/commands/startLanguageServer.ts | 4 ++++ src/goMain.ts | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/commands/startLanguageServer.ts b/src/commands/startLanguageServer.ts index 466cbdfbdf..703c5eea83 100644 --- a/src/commands/startLanguageServer.ts +++ b/src/commands/startLanguageServer.ts @@ -95,6 +95,10 @@ export const startLanguageServer: CommandFactory = (ctx, goCtx) => { goCtx.serverInfo = toServerInfo(goCtx.languageClient.initializeResult); updateStatus(goCtx, goConfig, true); console.log(`Server: ${JSON.stringify(goCtx.serverInfo, null, 2)}`); + } catch (e) { + const msg = `Error starting language server: ${e}`; + console.log(msg); + goCtx.serverOutputChannel?.append(msg); } finally { goCtx.latestConfig = cfg; unlock(); diff --git a/src/goMain.ts b/src/goMain.ts index af0a71631c..0213e03536 100644 --- a/src/goMain.ts +++ b/src/goMain.ts @@ -102,13 +102,13 @@ export async function activate(ctx: vscode.ExtensionContext): Promise Date: Mon, 27 Jun 2022 13:49:23 -0400 Subject: [PATCH 149/189] [release] src/language/goLanguageServer: do not require gopls when language server is disabled This fixes a bug that made the extension to look up the path to the gopls binary when go.useLanguageServer is false. During the lookup, if the gopls wasn't available, getLanguageServerToolPath eventually triggerred the missing tool prompt and that was not appropriate. Return from buildLanguageServerConfig early if we don't need the language server. Updates golang/vscode-go#2300 Change-Id: I7572244350f953c8ce874086f4f5cbb45a7301af Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/414456 Reviewed-by: Jamal Carvalho Reviewed-by: Suzy Mueller Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro (cherry picked from commit 4dd972eb0de8849c3207c3bf981bcad7471e9f9c) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/414459 --- src/language/goLanguageServer.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/language/goLanguageServer.ts b/src/language/goLanguageServer.ts index 4ca8354d53..28fd553c4f 100644 --- a/src/language/goLanguageServer.ts +++ b/src/language/goLanguageServer.ts @@ -783,6 +783,12 @@ export function buildLanguageServerConfig(goConfig: vscode.WorkspaceConfiguratio env: toolExecutionEnvironment(), checkForUpdates: getCheckForToolsUpdatesConfig(goConfig) }; + // user has opted out of using the language server. + if (!cfg.enabled) { + return cfg; + } + + // locate the configured language server tool. const languageServerPath = getLanguageServerToolPath(); if (!languageServerPath) { // Assume the getLanguageServerToolPath will show the relevant @@ -793,10 +799,6 @@ export function buildLanguageServerConfig(goConfig: vscode.WorkspaceConfiguratio cfg.path = languageServerPath; cfg.serverName = getToolFromToolPath(cfg.path) ?? ''; - if (!cfg.enabled) { - return cfg; - } - // Get the mtime of the language server binary so that we always pick up // the right version. const stats = fs.statSync(languageServerPath); From 76ffbb07d3f6bb8862016eb6959e2e7a6969231a Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 27 Jun 2022 13:33:33 -0400 Subject: [PATCH 150/189] [release] src/language/goLanguageServer: remove redundant error popups from custom error handler From vscode-languageclient v8.0.x (LSP 3.17), the language client reports the start errors specially and surfaces them as user visible popups regardless revealOutputChannelOn setting. Thus, our error popups are no longer necessary. Remove this. When an error occurs during initialization, the connection to the server shuts down which triggers the close handler. Previously, we suggested gopls issue report from both initializationFailedHandler and errorHandler.closed handler. That now results in two gopls issue report suggestions. Instead, stash the initialization failure error, and handle the suggestion prompt from one place. Note - in case of initializtion error, there is no point of retrying 5 times. We also explicitly set the error & connection close handlers messages to empty when requesting for continue/restart action, which will suppresses the default error message popups. While we are here, we improve the go status bar's language server state report by updating it when the language server connection close is obeserved. Updates microsoft/vscode-languageserver-node#1011 Fixes golang/vscode-go#2300 Change-Id: I8b20cf11ebb61ab474950440fc46ff23f7b0b826 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/414457 Reviewed-by: Jamal Carvalho TryBot-Result: kokoro Run-TryBot: Hyang-Ah Hana Kim (cherry picked from commit 99369b626fce5bfa753405508ba6d6bd55a2647b) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/414460 Reviewed-by: Suzy Mueller --- src/commands/startLanguageServer.ts | 3 +- src/language/goLanguageServer.ts | 53 ++++++++++++++++++++--------- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/src/commands/startLanguageServer.ts b/src/commands/startLanguageServer.ts index 703c5eea83..e2c6f13bca 100644 --- a/src/commands/startLanguageServer.ts +++ b/src/commands/startLanguageServer.ts @@ -39,6 +39,7 @@ export const startLanguageServer: CommandFactory = (ctx, goCtx) => { } const unlock = await languageServerStartMutex.lock(); + goCtx.latestConfig = cfg; try { if (reason === RestartReason.MANUAL) { await suggestGoplsIssueReport( @@ -52,6 +53,7 @@ export const startLanguageServer: CommandFactory = (ctx, goCtx) => { if (goCtx.languageClient) { await stopLanguageClient(goCtx); } + updateStatus(goCtx, goConfig, false); // Before starting the language server, make sure to deregister any // currently registered language providers. @@ -100,7 +102,6 @@ export const startLanguageServer: CommandFactory = (ctx, goCtx) => { console.log(msg); goCtx.serverOutputChannel?.append(msg); } finally { - goCtx.latestConfig = cfg; unlock(); } }; diff --git a/src/language/goLanguageServer.ts b/src/language/goLanguageServer.ts index 28fd553c4f..2c2b1fd70b 100644 --- a/src/language/goLanguageServer.ts +++ b/src/language/goLanguageServer.ts @@ -56,6 +56,7 @@ import { ProvideFoldingRangeSignature } from 'vscode-languageclient/lib/common/f import { daysBetween, getStateConfig, maybePromptForGoplsSurvey, timeDay, timeMinute } from '../goSurvey'; import { maybePromptForDeveloperSurvey } from '../goDeveloperSurvey'; import { CommandFactory } from '../commands'; +import { updateLanguageServerIconGoStatusBar } from '../goStatus'; export interface LanguageServerConfig { serverName: string; @@ -360,6 +361,11 @@ export async function buildLanguageClient( { language: 'gotmpl', scheme: 'file' } ]; + // when initialization is failed after the connection is established, + // we want to handle the connection close error case specially. Capture the error + // in initializationFailedHandler and handle it in the connectionCloseHandler. + let initializationError: WebRequest.ResponseError | undefined = undefined; + const c = new LanguageClient( 'go', // id cfg.serverName, // name e.g. gopls @@ -381,41 +387,56 @@ export async function buildLanguageClient( traceOutputChannel: cfg.traceOutputChannel, revealOutputChannelOn: RevealOutputChannelOn.Never, initializationFailedHandler: (error: WebRequest.ResponseError): boolean => { - vscode.window.showErrorMessage( - `The language server is not able to serve any features. Initialization failed: ${error}. ` - ); - suggestGoplsIssueReport( - goCtx, - 'The gopls server failed to initialize', - errorKind.initializationFailure, - error - ); + initializationError = error; return false; }, errorHandler: { error: (error: Error, message: Message, count: number) => { // Allow 5 crashes before shutdown. if (count < 5) { - return { action: ErrorAction.Continue }; + return { + message: '', // suppresses error popups + action: ErrorAction.Continue + }; } - vscode.window.showErrorMessage( - `Error communicating with the language server: ${error}: ${message}.` - ); - return { action: ErrorAction.Shutdown }; + return { + action: ErrorAction.Shutdown + }; }, closed: () => { + if (initializationError !== undefined) { + suggestGoplsIssueReport( + goCtx, + 'The gopls server failed to initialize.', + errorKind.initializationFailure, + initializationError + ); + initializationError = undefined; + // In case of initialization failure, do not try to restart. + return { + message: 'The gopls server failed to initialize.', + action: CloseAction.DoNotRestart + }; + } + // Allow 5 crashes before shutdown. const { crashCount = 0 } = goCtx; goCtx.crashCount = crashCount + 1; if (goCtx.crashCount < 5) { - return { action: CloseAction.Restart }; + return { + message: '', // suppresses error popups + action: CloseAction.Restart + }; } suggestGoplsIssueReport( goCtx, 'The connection to gopls has been closed. The gopls server may have crashed.', errorKind.crash ); - return { action: CloseAction.DoNotRestart }; + updateLanguageServerIconGoStatusBar(false, true); + return { + action: CloseAction.DoNotRestart + }; } }, middleware: { From a43fce4a1bb784c392b28962a55909a2615f1209 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 28 Jun 2022 17:07:17 -0400 Subject: [PATCH 151/189] CHANGELOG.md: v0.34.1 changelog Change-Id: I1462dde4821777e8c27a50f739220096df4b5b67 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/415015 Reviewed-by: Hyang-Ah Hana Kim --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d66d30c38..726b9d9434 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## v0.34.1 - 30 June, 2022 + +A list of all issues and changes can be found in the [v0.34.1 milestone](https://github.com/golang/vscode-go/milestone/48) and [commit history](https://github.com/golang/vscode-go/compare/v0.34.0...v0.34.1). + +### Bug Fix +- Fixed (Issue [2300](https://github.com/golang/vscode-go/issues/2300)) that prevented the extension from complete activation when the language server fails to start. + +### Thanks +Thank you for your contribution, @jamalc, @hyangh! + ## v0.34.0 - 22 June, 2022 This release adds support for [LSP 3.17](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#whatIsNew) and requires Visual Studio Code [1.67+](https://code.visualstudio.com/updates/v1_67). From 65cef383936d18fe3c06786a1812b364326a2a03 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 29 Jun 2022 17:01:45 -0400 Subject: [PATCH 152/189] package.json: update version to v0.34.1 For golang/vscode-go#2308 Change-Id: I707821f3f601951f5ac2e257c9318cf1b4a7733b Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/415016 TryBot-Result: kokoro Run-TryBot: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index af1337b4f2..9dfb6dd93f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.34.0", + "version": "0.34.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.34.0", + "version": "0.34.1", "license": "MIT", "dependencies": { "diff": "4.0.2", diff --git a/package.json b/package.json index 4d5505876b..6dce7cefc4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.34.0", + "version": "0.34.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 09c9b12be5f1b9dbf39cb18699a801151338d156 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 19 Jul 2022 10:09:30 -0400 Subject: [PATCH 153/189] [release] package.json: remove 'preview' property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was accidentally added during merge for v0.35.0 Fixes golang/vscode-go#2355 Fixes golang/vscode-go#2352 Change-Id: I50d4993fd2a6d2b84142c5db9ffc4a8aeda2c7cf Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/418194 Reviewed-by: Nooras Saba‎ TryBot-Result: kokoro Run-TryBot: Hyang-Ah Hana Kim --- package-lock.json | 2 +- package.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c09230e9f..347256c625 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.35.0", + "version": "0.35.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 59e12fd45a..9884ac0dad 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.35.0", - "preview": true, + "version": "0.35.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 5e111febe693b2e94406f6c5db1596742429583d Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 19 Jul 2022 10:27:33 -0400 Subject: [PATCH 154/189] CHANGELOG.md: add v0.35.1 description Change-Id: I9f36b4f75cebea46a8a9ff36c6ecff5967d1424b Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/418195 TryBot-Result: kokoro Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Jamal Carvalho --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e92157bf1f..ea5e763df7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ -## v0.35.0 - 13 July, 2022 +## v0.35.1 - 19 July, 2022 + +A list of all issues and changes can be found in the [v0.35.1 milestone](https://github.com/golang/vscode-go/milestone/50) and [commit history](https://github.com/golang/vscode-go/compare/v0.35.0...v0.35.1). + +### Bug Fix +- Disabled experimental gopls features (e.g. semantic highlighting). + +## v0.35.0 - 18 July, 2022 A list of all issues and changes can be found in the [v0.35.0 milestone](https://github.com/golang/vscode-go/milestone/47) and [commit history](https://github.com/golang/vscode-go/compare/v0.34.1...v0.35.0). From f4db2c56372c61d69d197158ec948bcc863aad93 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 2 Nov 2022 12:21:06 -0400 Subject: [PATCH 155/189] LICENSE: update to include @vscode/codicons license notice For golang/vscode-go#2525 It's generated by tools/license.sh that runs: yarn licenses generate-disclaimer --prod Change-Id: Ic09652ec3c67becb75ca5ef0362e509365f39280 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/447262 TryBot-Result: kokoro Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Alan Donovan --- LICENSE | 400 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 400 insertions(+) diff --git a/LICENSE b/LICENSE index f2da3c2273..f6cd6e55a5 100644 --- a/LICENSE +++ b/LICENSE @@ -28,6 +28,406 @@ THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY B ----- +The following software may be included in this product: @vscode/codicons. A copy of the source code may be downloaded from git+https://github.com/microsoft/vscode-codicons.git. This software contains the following license and notice below: + +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. + +----- + The following software may be included in this product: ajv. A copy of the source code may be downloaded from https://github.com/ajv-validator/ajv.git. This software contains the following license and notice below: The MIT License (MIT) From 504beea22673c2221216573bef2bea6c63cb6ca4 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 2 Nov 2022 17:17:41 -0400 Subject: [PATCH 156/189] package.json: update version for v0.36.0 release For golang/vscode-go#2525 Change-Id: I6fcc448d06decbc97561e6f43fbcc76aa4abaf46 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/447417 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Robert Findley TryBot-Result: kokoro --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5b910db711..b6a149a493 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.35.2", + "version": "0.36.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.35.2", + "version": "0.36.0", "license": "MIT", "dependencies": { "@vscode/codicons": "0.0.32", diff --git a/package.json b/package.json index 1f7e8be8e9..03d9bb0a1e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.35.2", + "version": "0.36.0", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 6368b281dbc75b5c03d31ad6939726b5c4b4e3d8 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 13 Dec 2022 18:21:18 -0500 Subject: [PATCH 157/189] [release] update LICENSE for v0.37.0 Change-Id: Iea2050135268d3d79d3f3bf5db904ff98aa33b70 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/457478 Reviewed-by: Robert Findley Run-TryBot: Hyang-Ah Hana Kim Auto-Submit: Hyang-Ah Hana Kim TryBot-Result: kokoro --- LICENSE | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/LICENSE b/LICENSE index f6cd6e55a5..b785ca726d 100644 --- a/LICENSE +++ b/LICENSE @@ -1959,34 +1959,35 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI The following software may be included in this product: qs. A copy of the source code may be downloaded from https://github.com/ljharb/qs.git. This software contains the following license and notice below: -Copyright (c) 2014 Nathan LaFreniere and other contributors. +BSD 3-Clause License + +Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * The names of any contributors may not be used to endorse or promote - products derived from this software without specific prior written - permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. - * * * +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----- From 9caf3e37e6a6c1581e028166c8b2431168ce8ac8 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Thu, 22 Dec 2022 14:31:31 -0500 Subject: [PATCH 158/189] [release] src/goTest: do not open text document on didCreateFile The Test Explorer watches all _test.go files in the workspace in order to keep the list of tests updated in the test explorer ui. On branch switches, there may be many test files that are created, causing the test explorer to process these. Previously, part of the processing resulted in opening the file. This led to issues due to the interaction with the language server. This change updates the logic on file creation, to add the parent test item only, which will not require opening the document. Fixes golang/vscode-go#2570 Change-Id: I595f34daee257c85bafd3e5706176f73f891fdf1 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/458999 Reviewed-by: Hyang-Ah Hana Kim Run-TryBot: Suzy Mueller TryBot-Result: kokoro Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/462376 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Robert Findley --- src/goDocumentSymbols.ts | 4 ++++ src/goTest/explore.ts | 7 +++++- src/goTest/resolve.ts | 30 ++++++++++++------------- test/integration/goTest.explore.test.ts | 30 ++++++++++++++++--------- 4 files changed, 45 insertions(+), 26 deletions(-) diff --git a/src/goDocumentSymbols.ts b/src/goDocumentSymbols.ts index 5809237e8d..1aa814e9f9 100644 --- a/src/goDocumentSymbols.ts +++ b/src/goDocumentSymbols.ts @@ -25,6 +25,10 @@ export class GoplsDocumentSymbolProvider implements vscode.DocumentSymbolProvide constructor(private readonly goCtx: GoExtensionContext, private includeImports?: boolean) {} public async provideDocumentSymbols(document: vscode.TextDocument): Promise { + // TODO(suzmue): consider providing an interface for providing document symbols that only requires + // the URI. Getting a TextDocument from a filename requires opening the file, which can lead to + // files being opened that were not requested by the user in order to get information that we just + // need the URI to access. if (typeof this.includeImports !== 'boolean') { const gotoSymbolConfig = getGoConfig(document.uri)['gotoSymbol']; this.includeImports = gotoSymbolConfig ? gotoSymbolConfig['includeImports'] : false; diff --git a/src/goTest/explore.ts b/src/goTest/explore.ts index 5493b0e9c1..a9a75fe43f 100644 --- a/src/goTest/explore.ts +++ b/src/goTest/explore.ts @@ -258,7 +258,12 @@ export class GoTestExplorer { } protected async didCreateFile(file: Uri) { - await this.documentUpdate(await this.workspace.openTextDocument(file)); + // Do not use openTextDocument to get the TextDocument for file, + // since this sends a didOpen text document notification to gopls, + // leading to spurious diagnostics from gopls: + // https://github.com/golang/vscode-go/issues/2570 + // Instead, get the test item for this file only. + await this.resolver.getFile(file); } protected async didDeleteFile(file: Uri) { diff --git a/src/goTest/resolve.ts b/src/goTest/resolve.ts index 2b4d93c193..48c38bfde9 100644 --- a/src/goTest/resolve.ts +++ b/src/goTest/resolve.ts @@ -233,6 +233,21 @@ export class GoTestResolver { vscode.commands.executeCommand('setContext', 'go.tests', items); } + // Retrieve or create an item for a Go file. + public async getFile(uri: Uri): Promise { + const dir = path.dirname(uri.path); + const pkg = await this.getPackage(uri.with({ path: dir, query: '', fragment: '' })); + const existing = this.getItem(pkg, uri, 'file'); + if (existing) { + return existing; + } + + const label = path.basename(uri.path); + const item = this.getOrCreateItem(pkg, label, uri, 'file'); + item.canResolveChildren = true; + return item; + } + /* ***** Private ***** */ private shouldSetRange(item: TestItem): boolean { @@ -375,21 +390,6 @@ export class GoTestResolver { return item; } - // Retrieve or create an item for a Go file. - private async getFile(uri: Uri): Promise { - const dir = path.dirname(uri.path); - const pkg = await this.getPackage(uri.with({ path: dir, query: '', fragment: '' })); - const existing = this.getItem(pkg, uri, 'file'); - if (existing) { - return existing; - } - - const label = path.basename(uri.path); - const item = this.getOrCreateItem(pkg, label, uri, 'file'); - item.canResolveChildren = true; - return item; - } - private getTestSuite(type: string): TestSuite { if (this.testSuites.has(type)) { return this.testSuites.get(type) as TestSuite; diff --git a/test/integration/goTest.explore.test.ts b/test/integration/goTest.explore.test.ts index 0beda07255..ebef7b01fa 100644 --- a/test/integration/goTest.explore.test.ts +++ b/test/integration/goTest.explore.test.ts @@ -60,11 +60,16 @@ suite('Go Test Explorer', () => { async _didOpen(doc: TextDocument) { await this.didOpenTextDocument(doc); } + + async _didCreate(doc: TextDocument) { + await this.didCreateFile(doc.uri); + } } interface TC extends TestCase { - open: string; - expect: string[]; + uri: string; + expectCreate: string[]; + expectOpen: string[]; } const cases: Record = { @@ -76,8 +81,9 @@ suite('Go Test Explorer', () => { '/src/proj/bar_test.go': 'package main\nfunc TestBar(*testing.T) {}', '/src/proj/baz/main_test.go': 'package main\nfunc TestBaz(*testing.T) {}' }, - open: 'file:///src/proj/foo_test.go', - expect: [ + uri: 'file:///src/proj/foo_test.go', + expectCreate: ['file:///src/proj?module', 'file:///src/proj/foo_test.go?file'], + expectOpen: [ 'file:///src/proj?module', 'file:///src/proj/foo_test.go?file', 'file:///src/proj/foo_test.go?test#TestFoo' @@ -89,8 +95,9 @@ suite('Go Test Explorer', () => { '/src/proj/go.mod': 'module test', '/src/proj/foo_test.go': 'package main\nfunc TestFoo(*testing.T) {}' }, - open: 'file:///src/proj/foo_test.go', - expect: [ + uri: 'file:///src/proj/foo_test.go', + expectCreate: ['file:///src/proj?module', 'file:///src/proj/foo_test.go?file'], + expectOpen: [ 'file:///src/proj?module', 'file:///src/proj/foo_test.go?file', 'file:///src/proj/foo_test.go?test#TestFoo' @@ -100,14 +107,17 @@ suite('Go Test Explorer', () => { for (const name in cases) { test(name, async () => { - const { workspace, files, open, expect } = cases[name]; + const { workspace, files, uri: uri, expectCreate: expectCreate, expectOpen: expectOpen } = cases[name]; const { ctrl, expl, ws } = newExplorer(workspace, files, DUT); - const doc = ws.fs.files.get(open); + const doc = ws.fs.files.get(uri); assert(doc); - await expl._didOpen(doc); - assertTestItems(ctrl.items, expect); + await expl._didCreate(doc); + assertTestItems(ctrl.items, expectCreate); + + await expl._didOpen(doc); + assertTestItems(ctrl.items, expectOpen); }); } }); From 65fd89382087f1b9959a43a621f41ab80296d93c Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 10 Jan 2023 11:54:47 -0500 Subject: [PATCH 159/189] [release] src/goDeveloperSurvey: prepare for 2023 Winter developer survey Fixes golang/vscode-go#2603 Change-Id: I27bbb61bdc1b5253c4e90d8484507d4ad95ba8e3 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/461257 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Todd Kulesza TryBot-Result: kokoro Reviewed-by: Alice Merrick Auto-Submit: Hyang-Ah Hana Kim Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/462377 Reviewed-by: Robert Findley --- src/goDeveloperSurvey.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/goDeveloperSurvey.ts b/src/goDeveloperSurvey.ts index ef61afbdde..d040d94d65 100644 --- a/src/goDeveloperSurvey.ts +++ b/src/goDeveloperSurvey.ts @@ -13,8 +13,8 @@ import { GoExtensionContext } from './context'; import { getGoVersion } from './util'; // Start and end dates of the survey. -export const startDate = new Date('May 31 2022 00:00:00 GMT'); -export const endDate = new Date('June 21 2022 00:00:00 GMT'); +export const startDate = new Date('Jan 18 2023 00:00:00 GMT'); +export const endDate = new Date('Feb 8 2023 00:00:00 GMT'); // DeveloperSurveyConfig is the set of global properties used to determine if // we should prompt a user to take the gopls survey. @@ -124,9 +124,8 @@ export function shouldPromptForSurvey(now: Date, cfg: DeveloperSurveyConfig): De export async function promptForDeveloperSurvey(cfg: DeveloperSurveyConfig, now: Date): Promise { const selected = await vscode.window.showInformationMessage( - // TODO(rstambler): Figure out how to phrase this. - `Looks like you are coding in Go! Would you like to help ensure that Go is meeting your needs -by participating in this 10-minute survey before ${endDate.toDateString()}?`, + `"Help shape Go’s future! Would you like to help ensure that Go is meeting your needs +by participating in this 10-minute Go Developer Survey (2023 Winter) before ${endDate.toDateString()}?`, 'Yes', 'Remind me later', 'Never' @@ -141,10 +140,7 @@ by participating in this 10-minute survey before ${endDate.toDateString()}?`, { cfg.lastDateAccepted = now; cfg.prompt = true; - const goV = await getGoVersion(); - const goVersion = goV ? goV.format(true) : 'na'; - const useGopls = getGoConfig()?.get('useLanguageServer') === true ? 'true' : 'false'; - const surveyURL = `https://google.qualtrics.com/jfe/form/SV_7O3x4IZKiUn0QCO?s=p&go=${goVersion}&gopls=${useGopls}`; + const surveyURL = `https://google.qualtrics.com/jfe/form/SV_bNnbAtFZ0vfRTH8?s=p`; await vscode.env.openExternal(vscode.Uri.parse(surveyURL)); } break; From 11e5df9f42b9f9caef44b803a0781d8961e5bd1a Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 13 Jan 2023 17:53:37 -0500 Subject: [PATCH 160/189] [release] CHANGELOG.md: prepare for v0.37.1 Change-Id: Ibc41d860abfb9506095e8f044a15d12edbd35979 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/462155 TryBot-Result: kokoro Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Robert Findley Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/462378 --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c47efa5e5..7b927c1cdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## v0.37.1 - 17 Jan, 2023 + +### Fixes +- Fixed spurious file creation bugs on branch switches. ([Issue 2570](https://github.com/golang/vscode-go/issues/2570)) + +### Changes +- Added promotion for the annual Go developer survey (2023 Winter). + +### Thanks +Thank you for your contribution, @suzmue! + ## v0.37.0 - 19 Dec, 2022 This release includes new [static analysis features](https://github.com/golang/vscode-go/wiki/features#analyze-vulnerabilities-in-dependencies) that report known vulnerabilities in your dependencies. These vulncheck analysis tools are backed by [Go's vulnerability database](https://go.dev/security/vulndb) and the Go language server's integration of [`govulncheck`](https://golang.org/x/vuln/cmd/govulncheck"). From 63abc2dadf7a88b2c22523c2e04105531c55d787 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 17 Jan 2023 11:38:13 -0500 Subject: [PATCH 161/189] [release] prepare v0.37.1 Updates golang/vscode-go#2614 Change-Id: I8c24ec7d0666c072fc91379520d8d0240bf7d13f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/462379 Reviewed-by: Robert Findley Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4139718798..560e6c3f59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.37.0", + "version": "0.37.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index 6233d84586..33faea5d08 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.37.0", + "version": "0.37.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 86e9469c0feb1b8f7696e9eb00ffc8e191e6e6ec Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 17 Jan 2023 15:53:21 -0500 Subject: [PATCH 162/189] [release] src/goDeveloperSurvey: drop extra " from message Change-Id: I3badc68ee7b9c983ee70a836173accc794d4c913 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/462475 TryBot-Result: kokoro Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Robert Findley --- src/goDeveloperSurvey.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/goDeveloperSurvey.ts b/src/goDeveloperSurvey.ts index d040d94d65..194d65406e 100644 --- a/src/goDeveloperSurvey.ts +++ b/src/goDeveloperSurvey.ts @@ -124,7 +124,7 @@ export function shouldPromptForSurvey(now: Date, cfg: DeveloperSurveyConfig): De export async function promptForDeveloperSurvey(cfg: DeveloperSurveyConfig, now: Date): Promise { const selected = await vscode.window.showInformationMessage( - `"Help shape Go’s future! Would you like to help ensure that Go is meeting your needs + `Help shape Go’s future! Would you like to help ensure that Go is meeting your needs by participating in this 10-minute Go Developer Survey (2023 Winter) before ${endDate.toDateString()}?`, 'Yes', 'Remind me later', From 17494ce422336de3cd6958453060589bf3788735 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 22 Feb 2023 16:08:55 -0500 Subject: [PATCH 163/189] [release] update LICENSE for v0.38.0 Change-Id: Icff82b7a6e1e0479241c6fabf83fed7a9c16b8b4 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/470435 Reviewed-by: Hyang-Ah Hana Kim TryBot-Result: kokoro Run-TryBot: Suzy Mueller --- LICENSE | 402 +------------------------------------------------------- 1 file changed, 1 insertion(+), 401 deletions(-) diff --git a/LICENSE b/LICENSE index b785ca726d..c4b90c941d 100644 --- a/LICENSE +++ b/LICENSE @@ -28,406 +28,6 @@ THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY B ----- -The following software may be included in this product: @vscode/codicons. A copy of the source code may be downloaded from git+https://github.com/microsoft/vscode-codicons.git. This software contains the following license and notice below: - -Attribution 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution 4.0 International Public License ("Public License"). To the -extent this Public License may be interpreted as a contract, You are -granted the Licensed Rights in consideration of Your acceptance of -these terms and conditions, and the Licensor grants You such rights in -consideration of benefits the Licensor receives from making the -Licensed Material available under these terms and conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - d. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - e. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - f. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - g. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - h. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - i. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - j. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - k. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material; and - - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - -======================================================================= - -Creative Commons is not a party to its public -licenses. Notwithstanding, Creative Commons may elect to apply one of -its public licenses to material it publishes and in those instances -will be considered the “Licensor.” The text of the Creative Commons -public licenses is dedicated to the public domain under the CC0 Public -Domain Dedication. Except for the limited purpose of indicating that -material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the -public licenses. - -Creative Commons may be contacted at creativecommons.org. - ------ - The following software may be included in this product: ajv. A copy of the source code may be downloaded from https://github.com/ajv-validator/ajv.git. This software contains the following license and notice below: The MIT License (MIT) @@ -2181,7 +1781,7 @@ THE SOFTWARE ----- -The following software may be included in this product: vscode-debugadapter, vscode-debugadapter-testsupport, vscode-debugprotocol. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter-testsupport), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugprotocol). This software contains the following license and notice below: +The following software may be included in this product: vscode-debugadapter, vscode-debugprotocol. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugprotocol). This software contains the following license and notice below: Copyright (c) Microsoft Corporation From 170d3dccf763e7e4fff0d5ca35cf61c0ff9ac4ac Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 22 Feb 2023 17:36:38 -0500 Subject: [PATCH 164/189] src/goTools: install staticcheck@v0.3.3 when building with go1.18 staticcheck@v0.4.* requires go1.19+. Change-Id: I1299b276f8c39fc7ea6f38a0ddf9ba3108ca759f Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/470475 Run-TryBot: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller TryBot-Result: kokoro (cherry picked from commit d7419f47be7833eb3ca08007264d06771f5bbccb) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/470636 Run-TryBot: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim --- src/goTools.ts | 2 +- tools/installtools/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/goTools.ts b/src/goTools.ts index 9b23e725fa..ef6f4440ed 100644 --- a/src/goTools.ts +++ b/src/goTools.ts @@ -88,7 +88,7 @@ export function getImportPathWithVersion( } if (tool.name === 'staticcheck') { if (goVersion.lt('1.17')) return importPath + '@v0.2.2'; - if (goVersion.lt('1.18')) return importPath + '@v0.3.3'; + if (goVersion.lt('1.19')) return importPath + '@v0.3.3'; } if (tool.name === 'gofumpt') { if (goVersion.lt('1.18')) return importPath + '@v0.2.1'; diff --git a/tools/installtools/main.go b/tools/installtools/main.go index 18d070e83a..3faf1d8c84 100644 --- a/tools/installtools/main.go +++ b/tools/installtools/main.go @@ -47,7 +47,7 @@ var tools = []struct { {"github.com/sqs/goreturns", "", false, nil}, {"github.com/uudashr/gopkgs/v2/cmd/gopkgs", "", false, nil}, {"github.com/zmb3/gogetdoc", "", false, nil}, - {"honnef.co/go/tools/cmd/staticcheck", "", false, []finalVersion{{16, "v0.2.2"}, {17, "v0.3.3"}}}, + {"honnef.co/go/tools/cmd/staticcheck", "", false, []finalVersion{{16, "v0.2.2"}, {18, "v0.3.3"}}}, {"golang.org/x/tools/cmd/gorename", "", false, nil}, {"github.com/go-delve/delve/cmd/dlv", "", false, []finalVersion{{16, "v1.8.3"}, {17, "v1.9.1"}}}, } From 5ab6e77f50efbf87120309258554a53b35e8dfaa Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 21 Feb 2023 21:21:54 -0500 Subject: [PATCH 165/189] .github/workflows: adjust release nightly to use npx vsce We can use the installed vsce instead of the third-party action. We also adjust the nightly workflow to package vsix in clean state before running any tests. That will reduce the chance of including unwanted files generated during tests. Updates golang/vscode-go#2676 Change-Id: I246cd1bf99bc51e23575ef16630e8eead04b11e2 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/470195 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit 179f226cc7fbba405a861a3a69600865f65ca21c) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/470637 Run-TryBot: Suzy Mueller Auto-Submit: Suzy Mueller Reviewed-by: Hyang-Ah Hana Kim --- .github/workflows/release-nightly.yml | 16 +++++++++++----- .github/workflows/release.yml | 6 +----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index d8e92f7852..3ec8393b6a 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -39,6 +39,13 @@ jobs: - name: Prepare Release run: build/all.bash prepare_nightly + - name: Version + run: | + echo "VSCODE_GO_VERSION=$(jq .version package.json | tr -d '"')" >> $GITHUB_ENV + + - name: Package Extension + run: npx vsce package -o "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" + - name: Compile run: npm run vscode:prepublish @@ -62,8 +69,7 @@ jobs: - name: Publish if: github.ref == 'refs/heads/master' && github.repository == 'golang/vscode-go' - uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075 - with: - args: "publish -p $VSCE_TOKEN" - env: - VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} + run: | + echo "publishing ${{ env.VSCODE_GO_VERSION }}" + ls *.vsix + npx vsce publish -i "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 342a43fdbc..75623a6f92 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,10 +108,6 @@ jobs: - name: publish if: env.EXT_ISPREVIEW != 1 && github.repository == 'golang/vscode-go' - uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075 - with: - args: "publish -p $VSCE_TOKEN" - env: - VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} + run: npx vsce publish -i "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}" # TODO: check if the commit is in green state. (test-long.yml results) From 41b5c2a63605d206df4ec5424253813dcc08b674 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Thu, 23 Feb 2023 18:34:05 -0500 Subject: [PATCH 166/189] .github/workflows: fix release.yml to use npx vsce for packaging Updates golang/vscode-go#2676 Change-Id: Idba55e5976bf85e587a4cef04773c15114446087 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/470975 Run-TryBot: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Suzy Mueller (cherry picked from commit dde5592e3d5a3825cc9a68b7d7268c672d4c319a) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/471036 Run-TryBot: Suzy Mueller Reviewed-by: Jamal Carvalho --- .github/workflows/release.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75623a6f92..7ab4c6a573 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -80,10 +80,8 @@ jobs: npm ci npm run vscode:prepublish - - name: package - uses: lannonbr/vsce-action@0f3391ee0477b08fae949eb0a875e91e6d20b075 - with: - args: "package" + - name: package extension + run: npx vsce package -o "./go-${{ env.EXT_VERSION }}.vsix" - name: create release id: create_release @@ -108,6 +106,6 @@ jobs: - name: publish if: env.EXT_ISPREVIEW != 1 && github.repository == 'golang/vscode-go' - run: npx vsce publish -i "./go-nightly-${{ env.VSCODE_GO_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}" + run: npx vsce publish -i "./go-${{ env.EXT_VERSION }}.vsix" -p "${{ secrets.VSCE_TOKEN }}" # TODO: check if the commit is in green state. (test-long.yml results) From c3282189102f4577ffa39b9408b93427934d7e3b Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Thu, 8 Jun 2023 17:03:22 -0400 Subject: [PATCH 167/189] [release] update LICENSE for v0.39.0 Change-Id: I6e8259f76c658b7ecf5e07c709a22a1799081f56 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/501958 TryBot-Result: kokoro Auto-Submit: Hyang-Ah Hana Kim Reviewed-by: Suzy Mueller --- LICENSE | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/LICENSE b/LICENSE index c4b90c941d..18602338fe 100644 --- a/LICENSE +++ b/LICENSE @@ -1426,6 +1426,26 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- +The following software may be included in this product: minimatch. A copy of the source code may be downloaded from git://github.com/isaacs/minimatch.git. This software contains the following license and notice below: + +The ISC License + +Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + The following software may be included in this product: mkdirp. A copy of the source code may be downloaded from https://github.com/substack/node-mkdirp.git. This software contains the following license and notice below: Copyright 2010 James Halliday (mail@substack.net) From 7b982583d2ef08c8f69aa2409bc593d684bc5e72 Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Tue, 7 Nov 2023 13:27:25 -0800 Subject: [PATCH 168/189] [release] Update package-lock.json Results of running npm install. Change-Id: I73157a76da162f938c29123db1a0b98c43f0d6a8 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/540356 Commit-Queue: Suzy Mueller Reviewed-by: Robert Findley TryBot-Result: kokoro --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index f23f61ec97..6d9681703b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "go", - "version": "0.39.1", + "version": "0.40.0", "lockfileVersion": 2, "requires": true, "packages": { @@ -47,7 +47,7 @@ }, "engines": { "node": ">=12.0.0", - "vscode": "^1.67.0" + "vscode": "^1.75.0" } }, "node_modules/@babel/code-frame": { From 4c3660aff344e58ef8e3076b390221b3cbb61c0d Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 8 Nov 2023 09:42:18 -0800 Subject: [PATCH 169/189] tools: add max version for delve Latest delve does not support 1.18, breaking the long tests for 1.18. Change-Id: I5c5ea583d41576c2c34c273df933a2dfaf8477e3 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/540835 Commit-Queue: Suzy Mueller Reviewed-by: Robert Findley TryBot-Result: kokoro --- tools/installtools/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/installtools/main.go b/tools/installtools/main.go index 8f0f31387a..48f5942c54 100644 --- a/tools/installtools/main.go +++ b/tools/installtools/main.go @@ -39,7 +39,7 @@ var tools = []struct { {"github.com/cweill/gotests/gotests", "", false, nil}, {"github.com/haya14busa/goplay/cmd/goplay", "", false, nil}, {"honnef.co/go/tools/cmd/staticcheck", "", false, []finalVersion{{16, "v0.2.2"}, {18, "v0.3.3"}}}, - {"github.com/go-delve/delve/cmd/dlv", "", false, []finalVersion{{16, "v1.8.3"}, {17, "v1.9.1"}}}, + {"github.com/go-delve/delve/cmd/dlv", "", false, []finalVersion{{16, "v1.8.3"}, {17, "v1.9.1"}, {18, "v1.20.2"}}}, } // pickVersion returns the version to install based on the supported From e854395dc3fd68d03ca3d9408cf2cc28418b769a Mon Sep 17 00:00:00 2001 From: Suzy Mueller Date: Wed, 8 Nov 2023 10:37:07 -0800 Subject: [PATCH 170/189] CHANGELOG.md: update planned release date Change-Id: Ic7d409ee6a2a1ef2ed15cbe62bb48d7cf8545912 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/540836 Commit-Queue: Suzy Mueller TryBot-Result: kokoro Reviewed-by: Robert Findley (cherry picked from commit ed92a0c250e8941abb9adab973c129a263ba1e41) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/540838 TryBot-Bypass: Suzy Mueller Reviewed-by: Alan Donovan --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3461f98262..f6b1a0fcca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## v0.40.0 - 13 Nov, 2023 +## v0.40.0 - 15 Nov, 2023 This extension utilizes [Go Telemetry](https://telemetry.go.dev/privacy) to gather insights about the performance and stability of the extension and the language server it employs. From 49c4136803f2c05dec39f73a30c1af1e61a9f803 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 5 Jan 2024 13:58:20 -0500 Subject: [PATCH 171/189] [release] package.json: sync gopls settings (gopls@v0.15.0-pre.1) Change-Id: If55c3a89cd28fd7ea7b7c022b98ec9b6c7b3fec1 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/554060 Commit-Queue: Hyang-Ah Hana Kim TryBot-Result: kokoro Reviewed-by: Robert Findley (cherry picked from commit b01b0b756e585124235b84d49193c4bd3f3c7c5e) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556979 Auto-Submit: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim --- docs/settings.md | 64 +++++++++++++++++++++++++----------------------- package.json | 54 ++++++++++++++++++++++------------------ 2 files changed, 64 insertions(+), 54 deletions(-) diff --git a/docs/settings.md b/docs/settings.md index 1409958a55..a9a6a63550 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -577,31 +577,23 @@ env adds environment variables to external commands run by `gopls`, most notably ### `build.expandWorkspaceToModule` -(Experimental) expandWorkspaceToModule instructs `gopls` to adjust the scope of the -workspace to find the best available module root. `gopls` first looks for -a go.mod file in any parent directory of the workspace folder, expanding -the scope to that directory if it exists. If no viable parent directory is -found, gopls will check if there is exactly one child directory containing -a go.mod file, narrowing the scope to that directory if it exists. +(Experimental) expandWorkspaceToModule determines which packages are considered +"workspace packages" when the workspace is using modules. + +Workspace packages affect the scope of workspace-wide operations. Notably, +gopls diagnoses all packages considered to be part of the workspace after +every keystroke, so by setting "ExpandWorkspaceToModule" to false, and +opening a nested workspace directory, you can reduce the amount of work +gopls has to do to keep your workspace up to date. Default: `true` ### `build.memoryMode` -(Experimental) memoryMode controls the tradeoff `gopls` makes between memory usage and -correctness. - -Values other than `Normal` are untested and may break in surprising ways. -
    -Allowed Options: - -* `DegradeClosed`: `"DegradeClosed"`: In DegradeClosed mode, `gopls` will collect less information about -packages without open files. As a result, features like Find -References and Rename will miss results in such packages. -* `Normal` +(Experimental) obsolete, no effect -Default: `"Normal"` +Default: `""` ### `build.standaloneTags` standaloneTags specifies a set of build constraints that identify @@ -755,39 +747,39 @@ Example Usage: | `embed` | check //go:embed directive usage
    This analyzer checks that the embed package is imported if //go:embed directives are present, providing a suggested fix to add the import if it is missing.
    This analyzer also checks that //go:embed directives precede the declaration of a single variable.
    Default: `true` | | `errorsas` | report passing non-pointer or non-error values to errors.As
    The errorsas analysis reports calls to errors.As where the type of the second argument is not a pointer to a type implementing error.
    Default: `true` | | `fieldalignment` | find structs that would use less memory if their fields were sorted
    This analyzer find structs that can be rearranged to use less memory, and provides a suggested edit with the most compact order.
    Note that there are two different diagnostics reported. One checks struct size, and the other reports "pointer bytes" used. Pointer bytes is how many bytes of the object that the garbage collector has to potentially scan for pointers, for example:
    struct { uint32; string }

    have 16 pointer bytes because the garbage collector has to scan up through the string's inner pointer.
    struct { string; *uint32 }

    has 24 pointer bytes because it has to scan further through the *uint32.
    struct { string; uint32 }

    has 8 because it can stop immediately after the string pointer.
    Be aware that the most compact order is not always the most efficient. In rare cases it may cause two variables each updated by its own goroutine to occupy the same CPU cache line, inducing a form of memory contention known as "false sharing" that slows down both goroutines.

    Default: `false` | -| `fillreturns` | suggest fixes for errors due to an incorrect number of return values
    This checker provides suggested fixes for type errors of the type "wrong number of return values (want %d, got %d)". For example:
    func m() (int, string, *bool, error) {
    return
    }
    will turn into
    func m() (int, string, *bool, error) {
    return 0, "", nil, nil
    }

    This functionality is similar to https://github.com/sqs/goreturns.

    Default: `true` | +| `fillreturns` | suggest fixes for errors due to an incorrect number of return values
    This checker provides suggested fixes for type errors of the type "wrong number of return values (want %d, got %d)". For example:
    func m() (int, string, *bool, error) {
    return
    }

    will turn into
    func m() (int, string, *bool, error) {
    return 0, "", nil, nil
    }

    This functionality is similar to https://github.com/sqs/goreturns.
    Default: `true` | | `fillstruct` | note incomplete struct initializations
    This analyzer provides diagnostics for any struct literals that do not have any fields initialized. Because the suggested fix for this analysis is expensive to compute, callers should compute it separately, using the SuggestedFix function below.

    Default: `true` | | `httpresponse` | check for mistakes using HTTP responses
    A common mistake when using the net/http package is to defer a function call to close the http.Response Body before checking the error that determines whether the response is valid:
    resp, err := http.Head(url)
    defer resp.Body.Close()
    if err != nil {
    log.Fatal(err)
    }
    // (defer statement belongs here)

    This checker helps uncover latent nil dereference bugs by reporting a diagnostic for such mistakes.
    Default: `true` | | `ifaceassert` | detect impossible interface-to-interface type assertions
    This checker flags type assertions v.(T) and corresponding type-switch cases in which the static type V of v is an interface that cannot possibly implement the target interface T. This occurs when V and T contain methods with the same name but different signatures. Example:
    var v interface {
    Read()
    }
    _ = v.(io.Reader)

    The Read method in v has a different signature than the Read method in io.Reader, so this assertion cannot succeed.
    Default: `true` | | `infertypeargs` | check for unnecessary type arguments in call expressions
    Explicit type arguments may be omitted from call expressions if they can be inferred from function arguments, or from other type arguments:
    func f[T any](T) {}


    func _() {
    f[string]("foo") // string could be inferred
    }


    Default: `true` | -| `loopclosure` | check references to loop variables from within nested functions
    This analyzer reports places where a function literal references the iteration variable of an enclosing loop, and the loop calls the function in such a way (e.g. with go or defer) that it may outlive the loop iteration and possibly observe the wrong value of the variable.
    In this example, all the deferred functions run after the loop has completed, so all observe the final value of v.
    for _, v := range list {
    defer func() {
    use(v) // incorrect
    }()
    }

    One fix is to create a new variable for each iteration of the loop:
    for _, v := range list {
    v := v // new var per iteration
    defer func() {
    use(v) // ok
    }()
    }

    The next example uses a go statement and has a similar problem. In addition, it has a data race because the loop updates v concurrent with the goroutines accessing it.
    for _, v := range elem {
    go func() {
    use(v) // incorrect, and a data race
    }()
    }

    A fix is the same as before. The checker also reports problems in goroutines started by golang.org/x/sync/errgroup.Group. A hard-to-spot variant of this form is common in parallel tests:
    func Test(t *testing.T) {
    for _, test := range tests {
    t.Run(test.name, func(t *testing.T) {
    t.Parallel()
    use(test) // incorrect, and a data race
    })
    }
    }

    The t.Parallel() call causes the rest of the function to execute concurrent with the loop.
    The analyzer reports references only in the last statement, as it is not deep enough to understand the effects of subsequent statements that might render the reference benign. ("Last statement" is defined recursively in compound statements such as if, switch, and select.)
    See: https://golang.org/doc/go_faq.html#closures_and_goroutines
    Default: `true` | +| `loopclosure` | check references to loop variables from within nested functions
    This analyzer reports places where a function literal references the iteration variable of an enclosing loop, and the loop calls the function in such a way (e.g. with go or defer) that it may outlive the loop iteration and possibly observe the wrong value of the variable.
    Note: An iteration variable can only outlive a loop iteration in Go versions <=1.21. In Go 1.22 and later, the loop variable lifetimes changed to create a new iteration variable per loop iteration. (See go.dev/issue/60078.)
    In this example, all the deferred functions run after the loop has completed, so all observe the final value of v [
    for _, v := range list {
    defer func() {
    use(v) // incorrect
    }()
    }

    One fix is to create a new variable for each iteration of the loop:
    for _, v := range list {
    v := v // new var per iteration
    defer func() {
    use(v) // ok
    }()
    }

    After Go version 1.22, the previous two for loops are equivalent and both are correct.
    The next example uses a go statement and has a similar problem [
    for _, v := range elem {
    go func() {
    use(v) // incorrect, and a data race
    }()
    }

    A fix is the same as before. The checker also reports problems in goroutines started by golang.org/x/sync/errgroup.Group. A hard-to-spot variant of this form is common in parallel tests:
    func Test(t *testing.T) {
    for _, test := range tests {
    t.Run(test.name, func(t *testing.T) {
    t.Parallel()
    use(test) // incorrect, and a data race
    })
    }
    }

    The t.Parallel() call causes the rest of the function to execute concurrent with the loop [ The analyzer reports references only in the last statement, as it is not deep enough to understand the effects of subsequent statements that might render the reference benign. ("Last statement" is defined recursively in compound statements such as if, switch, and select.)
    See: https://golang.org/doc/go_faq.html#closures_and_goroutines
    Default: `true` | | `lostcancel` | check cancel func returned by context.WithCancel is called
    The cancellation function returned by context.WithCancel, WithTimeout, and WithDeadline must be called or the new context will remain live until its parent context is cancelled. (The background context is never cancelled.)
    Default: `true` | | `nilfunc` | check for useless comparisons between functions and nil
    A useless comparison is one like f == nil as opposed to f() == nil.
    Default: `true` | -| `nilness` | check for redundant or impossible nil comparisons
    The nilness checker inspects the control-flow graph of each function in a package and reports nil pointer dereferences, degenerate nil pointers, and panics with nil values. A degenerate comparison is of the form x==nil or x!=nil where x is statically known to be nil or non-nil. These are often a mistake, especially in control flow related to errors. Panics with nil values are checked because they are not detectable by
    if r := recover(); r != nil {

    This check reports conditions such as:
    if f == nil { // impossible condition (f is a function)
    }

    and:
    p := &v
    ...
    if p != nil { // tautological condition
    }

    and:
    if p == nil {
    print(*p) // nil dereference
    }

    and:
    if p == nil {
    panic(p)
    }

    Default: `false` | -| `nonewvars` | suggested fixes for "no new vars on left side of :="
    This checker provides suggested fixes for type errors of the type "no new vars on left side of :=". For example:
    z := 1
    z := 2
    will turn into
    z := 1
    z = 2


    Default: `true` | -| `noresultvalues` | suggested fixes for unexpected return values
    This checker provides suggested fixes for type errors of the type "no result values expected" or "too many return values". For example:
    func z() { return nil }
    will turn into
    func z() { return }


    Default: `true` | +| `nilness` | check for redundant or impossible nil comparisons
    The nilness checker inspects the control-flow graph of each function in a package and reports nil pointer dereferences, degenerate nil pointers, and panics with nil values. A degenerate comparison is of the form x==nil or x!=nil where x is statically known to be nil or non-nil. These are often a mistake, especially in control flow related to errors. Panics with nil values are checked because they are not detectable by
    if r := recover(); r != nil {

    This check reports conditions such as:
    if f == nil { // impossible condition (f is a function)
    }

    and:
    p := &v
    ...
    if p != nil { // tautological condition
    }

    and:
    if p == nil {
    print(*p) // nil dereference
    }

    and:
    if p == nil {
    panic(p)
    }

    Default: `true` | +| `nonewvars` | suggested fixes for "no new vars on left side of :="
    This checker provides suggested fixes for type errors of the type "no new vars on left side of :=". For example:
    z := 1
    z := 2

    will turn into
    z := 1
    z = 2

    Default: `true` | +| `noresultvalues` | suggested fixes for unexpected return values
    This checker provides suggested fixes for type errors of the type "no result values expected" or "too many return values". For example:
    func z() { return nil }

    will turn into
    func z() { return }

    Default: `true` | | `printf` | check consistency of Printf format strings and arguments
    The check applies to calls of the formatting functions such as [fmt.Printf] and [fmt.Sprintf], as well as any detected wrappers of those functions.
    In this example, the %d format operator requires an integer operand:
    fmt.Printf("%d", "hello") // fmt.Printf format %d has arg "hello" of wrong type string

    See the documentation of the fmt package for the complete set of format operators and their operand types.
    To enable printf checking on a function that is not found by this analyzer's heuristics (for example, because control is obscured by dynamic method calls), insert a bogus call:
    func MyPrintf(format string, args ...any) {
    if false {
    _ = fmt.Sprintf(format, args...) // enable printf checker
    }
    ...
    }

    The -funcs flag specifies a comma-separated list of names of additional known formatting functions or methods. If the name contains a period, it must denote a specific function using one of the following forms:
    dir/pkg.Function
    dir/pkg.Type.Method
    (*dir/pkg.Type).Method

    Otherwise the name is interpreted as a case-insensitive unqualified identifier such as "errorf". Either way, if a listed name ends in f, the function is assumed to be Printf-like, taking a format string before the argument list. Otherwise it is assumed to be Print-like, taking a list of arguments with no format string.
    Default: `true` | | `shadow` | check for possible unintended shadowing of variables
    This analyzer check for shadowed variables. A shadowed variable is a variable declared in an inner scope with the same name and type as a variable in an outer scope, and where the outer variable is mentioned after the inner one is declared.
    (This definition can be refined; the module generates too many false positives and is not yet enabled by default.)
    For example:
    func BadRead(f *os.File, buf []byte) error {
    var err error
    for {
    n, err := f.Read(buf) // shadows the function variable 'err'
    if err != nil {
    break // causes return of wrong value
    }
    foo(buf)
    }
    return err
    }

    Default: `false` | | `shift` | check for shifts that equal or exceed the width of the integer
    Default: `true` | -| `simplifycompositelit` | check for composite literal simplifications
    An array, slice, or map composite literal of the form:
    []T{T{}, T{}}
    will be simplified to:
    []T{{}, {}}

    This is one of the simplifications that "gofmt -s" applies.
    Default: `true` | -| `simplifyrange` | check for range statement simplifications
    A range of the form:
    for x, _ = range v {...}
    will be simplified to:
    for x = range v {...}

    A range of the form:
    for _ = range v {...}
    will be simplified to:
    for range v {...}

    This is one of the simplifications that "gofmt -s" applies.
    Default: `true` | -| `simplifyslice` | check for slice simplifications
    A slice expression of the form:
    s[a:len(s)]
    will be simplified to:
    s[a:]

    This is one of the simplifications that "gofmt -s" applies.
    Default: `true` | +| `simplifycompositelit` | check for composite literal simplifications
    An array, slice, or map composite literal of the form:
    []T{T{}, T{}}

    will be simplified to:
    []T{{}, {}}

    This is one of the simplifications that "gofmt -s" applies.
    Default: `true` | +| `simplifyrange` | check for range statement simplifications
    A range of the form:
    for x, _ = range v {...}

    will be simplified to:
    for x = range v {...}

    A range of the form:
    for _ = range v {...}

    will be simplified to:
    for range v {...}

    This is one of the simplifications that "gofmt -s" applies.
    Default: `true` | +| `simplifyslice` | check for slice simplifications
    A slice expression of the form:
    s[a:len(s)]

    will be simplified to:
    s[a:]

    This is one of the simplifications that "gofmt -s" applies.
    Default: `true` | | `slog` | check for invalid structured logging calls
    The slog checker looks for calls to functions from the log/slog package that take alternating key-value pairs. It reports calls where an argument in a key position is neither a string nor a slog.Attr, and where a final key is missing its value. For example,it would report
    slog.Warn("message", 11, "k") // slog.Warn arg "11" should be a string or a slog.Attr

    and
    slog.Info("message", "k1", v1, "k2") // call to slog.Info missing a final value

    Default: `true` | | `sortslice` | check the argument type of sort.Slice
    sort.Slice requires an argument of a slice type. Check that the interface{} value passed to sort.Slice is actually a slice.
    Default: `true` | | `stdmethods` | check signature of methods of well-known interfaces
    Sometimes a type may be intended to satisfy an interface but may fail to do so because of a mistake in its method signature. For example, the result of this WriteTo method should be (int64, error), not error, to satisfy io.WriterTo:
    type myWriterTo struct{...}
    func (myWriterTo) WriteTo(w io.Writer) error { ... }

    This check ensures that each method whose name matches one of several well-known interface methods from the standard library has the correct signature for that interface.
    Checked method names include:
    Format GobEncode GobDecode MarshalJSON MarshalXML
    Peek ReadByte ReadFrom ReadRune Scan Seek
    UnmarshalJSON UnreadByte UnreadRune WriteByte
    WriteTo

    Default: `true` | | `stringintconv` | check for string(int) conversions
    This checker flags conversions of the form string(x) where x is an integer (but not byte or rune) type. Such conversions are discouraged because they return the UTF-8 representation of the Unicode code point x, and not a decimal string representation of x as one might expect. Furthermore, if x denotes an invalid code point, the conversion cannot be statically rejected.
    For conversions that intend on using the code point, consider replacing them with string(rune(x)). Otherwise, strconv.Itoa and its equivalents return the string representation of the value in the desired base.
    Default: `true` | | `structtag` | check that struct field tags conform to reflect.StructTag.Get
    Also report certain struct tags (json, xml) used with unexported fields.
    Default: `true` | -| `stubmethods` | stub methods analyzer
    This analyzer generates method stubs for concrete types in order to implement a target interface
    Default: `true` | -| `testinggoroutine` | report calls to (*testing.T).Fatal from goroutines started by a test.
    Functions that abruptly terminate a test, such as the Fatal, Fatalf, FailNow, and Skip{,f,Now} methods of *testing.T, must be called from the test goroutine itself. This checker detects calls to these functions that occur within a goroutine started by the test. For example:
    func TestFoo(t *testing.T) {
    go func() {
    t.Fatal("oops") // error: (*T).Fatal called from non-test goroutine
    }()
    }

    Default: `true` | +| `stubmethods` | detect missing methods and fix with stub implementations
    This analyzer detects type-checking errors due to missing methods in assignments from concrete types to interface types, and offers a suggested fix that will create a set of stub methods so that the concrete type satisfies the interface.
    For example, this function will not compile because the value NegativeErr{} does not implement the "error" interface:
    func sqrt(x float64) (float64, error) {
    if x < 0 {
    return 0, NegativeErr{} // error: missing method
    }
    ...
    }

    type NegativeErr struct{}

    This analyzer will suggest a fix to declare this method:
    // Error implements error.Error.
    func (NegativeErr) Error() string {
    panic("unimplemented")
    }

    (At least, it appears to behave that way, but technically it doesn't use the SuggestedFix mechanism and the stub is created by logic in gopls's source.stub function.)
    Default: `true` | +| `testinggoroutine` | report calls to (*testing.T).Fatal from goroutines started by a test
    Functions that abruptly terminate a test, such as the Fatal, Fatalf, FailNow, and Skip{,f,Now} methods of *testing.T, must be called from the test goroutine itself. This checker detects calls to these functions that occur within a goroutine started by the test. For example:
    func TestFoo(t *testing.T) {
    go func() {
    t.Fatal("oops") // error: (*T).Fatal called from non-test goroutine
    }()
    }

    Default: `true` | | `tests` | check for common mistaken usages of tests and examples
    The tests checker walks Test, Benchmark, Fuzzing and Example functions checking malformed names, wrong signatures and examples documenting non-existent identifiers.
    Please see the documentation for package testing in golang.org/pkg/testing for the conventions that are enforced for Tests, Benchmarks, and Examples.
    Default: `true` | | `timeformat` | check for calls of (time.Time).Format or time.Parse with 2006-02-01
    The timeformat checker looks for time formats with the 2006-02-01 (yyyy-dd-mm) format. Internationally, "yyyy-dd-mm" does not occur in common calendar date standards, and so it is more likely that 2006-01-02 (yyyy-mm-dd) was intended.
    Default: `true` | -| `undeclaredname` | suggested fixes for "undeclared name: <>"
    This checker provides suggested fixes for type errors of the type "undeclared name: <>". It will either insert a new statement, such as:
    "<> := "
    or a new function declaration, such as:
    func <>(inferred parameters) {
    panic("implement me!")
    }

    Default: `true` | +| `undeclaredname` | suggested fixes for "undeclared name: <>"
    This checker provides suggested fixes for type errors of the type "undeclared name: <>". It will either insert a new statement, such as:
    <> :=

    or a new function declaration, such as:
    func <>(inferred parameters) {
    panic("implement me!")
    }

    Default: `true` | | `unmarshal` | report passing non-pointer or non-interface values to unmarshal
    The unmarshal analysis reports calls to functions such as json.Unmarshal in which the argument type is not a pointer or an interface.
    Default: `true` | | `unreachable` | check for unreachable code
    The unreachable analyzer finds statements that execution can never reach because they are preceded by an return statement, a call to panic, an infinite loop, or similar constructs.
    Default: `true` | | `unsafeptr` | check for invalid conversions of uintptr to unsafe.Pointer
    The unsafeptr analyzer reports likely incorrect uses of unsafe.Pointer to convert integers to pointers. A conversion from uintptr to unsafe.Pointer is invalid if it implies that there is a uintptr-typed word in memory that holds a pointer value, because that word will be invisible to stack copying and to the garbage collector.
    Default: `true` | | `unusedparams` | check for unused parameters of functions
    The unusedparams analyzer checks functions to see if there are any parameters that are not being used.
    To reduce false positives it ignores: - methods - parameters that do not have a name or have the name '_' (the blank identifier) - functions in test files - functions with empty bodies or those with just a return stmt
    Default: `false` | | `unusedresult` | check for unused results of calls to some functions
    Some functions like fmt.Errorf return a result and have no side effects, so it is always a mistake to discard the result. Other functions may return an error that must not be ignored, or a cleanup operation that must be called. This analyzer reports calls to functions like these when the result of the call is ignored.
    The set of functions may be controlled using flags.
    Default: `true` | -| `unusedvariable` | check for unused variables
    The unusedvariable analyzer suggests fixes for unused variables errors.

    Default: `false` | +| `unusedvariable` | check for unused variables and suggest fixes
    Default: `false` | | `unusedwrite` | checks for unused writes
    The analyzer reports instances of writes to struct fields and arrays that are never read. Specifically, when a struct object or an array is copied, its elements are copied implicitly by the compiler, and any element write to this copy does nothing with the original object.
    For example:
    type T struct { x int }

    func f(input []T) {
    for i, v := range input { // v is a copy
    v.x = i // unused write to field x
    }
    }

    Another example is about non-pointer receiver:
    type T struct { x int }

    func (t T) f() {  // t is a copy
    t.x = i // unused write to field x
    }

    Default: `false` | | `useany` | check for constraints that could be simplified to "any"
    Default: `false` | ### `ui.diagnostic.analysisProgressReporting` @@ -826,6 +818,18 @@ This option must be set to a valid duration string, for example `"250ms"`. Default: `"1s"` +### `ui.diagnostic.diagnosticsTrigger` + +(Experimental) diagnosticsTrigger controls when to run diagnostics. +
    +Allowed Options: + +* `Edit`: `"Edit"`: Trigger diagnostics on file edit and save. (default) +* `Save`: `"Save"`: Trigger diagnostics only on file save. Events like initial workspace load +or configuration change will still trigger diagnostics. + + +Default: `"Edit"` ### `ui.diagnostic.staticcheck` (Experimental) staticcheck enables additional analyses from staticcheck.io. diff --git a/package.json b/package.json index 7c2b7d44d8..30b987087e 100644 --- a/package.json +++ b/package.json @@ -1976,22 +1976,14 @@ }, "build.expandWorkspaceToModule": { "type": "boolean", - "markdownDescription": "(Experimental) expandWorkspaceToModule instructs `gopls` to adjust the scope of the\nworkspace to find the best available module root. `gopls` first looks for\na go.mod file in any parent directory of the workspace folder, expanding\nthe scope to that directory if it exists. If no viable parent directory is\nfound, gopls will check if there is exactly one child directory containing\na go.mod file, narrowing the scope to that directory if it exists.\n", + "markdownDescription": "(Experimental) expandWorkspaceToModule determines which packages are considered\n\"workspace packages\" when the workspace is using modules.\n\nWorkspace packages affect the scope of workspace-wide operations. Notably,\ngopls diagnoses all packages considered to be part of the workspace after\nevery keystroke, so by setting \"ExpandWorkspaceToModule\" to false, and\nopening a nested workspace directory, you can reduce the amount of work\ngopls has to do to keep your workspace up to date.\n", "default": true, "scope": "resource" }, "build.memoryMode": { "type": "string", - "markdownDescription": "(Experimental) memoryMode controls the tradeoff `gopls` makes between memory usage and\ncorrectness.\n\nValues other than `Normal` are untested and may break in surprising ways.\n", - "enum": [ - "DegradeClosed", - "Normal" - ], - "markdownEnumDescriptions": [ - "`\"DegradeClosed\"`: In DegradeClosed mode, `gopls` will collect less information about\npackages without open files. As a result, features like Find\nReferences and Rename will miss results in such packages.\n", - "" - ], - "default": "Normal", + "markdownDescription": "(Experimental) obsolete, no effect\n", + "default": "", "scope": "resource" }, "build.standaloneTags": { @@ -2174,7 +2166,7 @@ }, "deprecated": { "type": "boolean", - "markdownDescription": "check for use of deprecated identifiers\n\nThe deprecated analyzer looks for deprecated symbols and package imports.\n\nSee https://go.dev/wiki/Deprecated to learn about Go's convention\nfor documenting and signaling deprecated identifiers.", + "markdownDescription": "check for use of deprecated identifiers\n\nThe deprecated analyzer looks for deprecated symbols and package\nimports.\n\nSee https://go.dev/wiki/Deprecated to learn about Go's convention\nfor documenting and signaling deprecated identifiers.", "default": true }, "directive": { @@ -2199,7 +2191,7 @@ }, "fillreturns": { "type": "boolean", - "markdownDescription": "suggest fixes for errors due to an incorrect number of return values\n\nThis checker provides suggested fixes for type errors of the\ntype \"wrong number of return values (want %d, got %d)\". For example:\n\tfunc m() (int, string, *bool, error) {\n\t\treturn\n\t}\nwill turn into\n\tfunc m() (int, string, *bool, error) {\n\t\treturn 0, \"\", nil, nil\n\t}\n\nThis functionality is similar to https://github.com/sqs/goreturns.\n", + "markdownDescription": "suggest fixes for errors due to an incorrect number of return values\n\nThis checker provides suggested fixes for type errors of the\ntype \"wrong number of return values (want %d, got %d)\". For example:\n\n\tfunc m() (int, string, *bool, error) {\n\t\treturn\n\t}\n\nwill turn into\n\n\tfunc m() (int, string, *bool, error) {\n\t\treturn 0, \"\", nil, nil\n\t}\n\nThis functionality is similar to https://github.com/sqs/goreturns.", "default": true }, "fillstruct": { @@ -2224,7 +2216,7 @@ }, "loopclosure": { "type": "boolean", - "markdownDescription": "check references to loop variables from within nested functions\n\nThis analyzer reports places where a function literal references the\niteration variable of an enclosing loop, and the loop calls the function\nin such a way (e.g. with go or defer) that it may outlive the loop\niteration and possibly observe the wrong value of the variable.\n\nIn this example, all the deferred functions run after the loop has\ncompleted, so all observe the final value of v.\n\n\tfor _, v := range list {\n\t defer func() {\n\t use(v) // incorrect\n\t }()\n\t}\n\nOne fix is to create a new variable for each iteration of the loop:\n\n\tfor _, v := range list {\n\t v := v // new var per iteration\n\t defer func() {\n\t use(v) // ok\n\t }()\n\t}\n\nThe next example uses a go statement and has a similar problem.\nIn addition, it has a data race because the loop updates v\nconcurrent with the goroutines accessing it.\n\n\tfor _, v := range elem {\n\t go func() {\n\t use(v) // incorrect, and a data race\n\t }()\n\t}\n\nA fix is the same as before. The checker also reports problems\nin goroutines started by golang.org/x/sync/errgroup.Group.\nA hard-to-spot variant of this form is common in parallel tests:\n\n\tfunc Test(t *testing.T) {\n\t for _, test := range tests {\n\t t.Run(test.name, func(t *testing.T) {\n\t t.Parallel()\n\t use(test) // incorrect, and a data race\n\t })\n\t }\n\t}\n\nThe t.Parallel() call causes the rest of the function to execute\nconcurrent with the loop.\n\nThe analyzer reports references only in the last statement,\nas it is not deep enough to understand the effects of subsequent\nstatements that might render the reference benign.\n(\"Last statement\" is defined recursively in compound\nstatements such as if, switch, and select.)\n\nSee: https://golang.org/doc/go_faq.html#closures_and_goroutines", + "markdownDescription": "check references to loop variables from within nested functions\n\nThis analyzer reports places where a function literal references the\niteration variable of an enclosing loop, and the loop calls the function\nin such a way (e.g. with go or defer) that it may outlive the loop\niteration and possibly observe the wrong value of the variable.\n\nNote: An iteration variable can only outlive a loop iteration in Go versions <=1.21.\nIn Go 1.22 and later, the loop variable lifetimes changed to create a new\niteration variable per loop iteration. (See go.dev/issue/60078.)\n\nIn this example, all the deferred functions run after the loop has\ncompleted, so all observe the final value of v [\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"undeclared name: <>\". It will either insert a new statement,\nsuch as:\n\n\"<> := \"\n\nor a new function declaration, such as:\n\nfunc <>(inferred parameters) {\n\tpanic(\"implement me!\")\n}\n", + "markdownDescription": "suggested fixes for \"undeclared name: <>\"\n\nThis checker provides suggested fixes for type errors of the\ntype \"undeclared name: <>\". It will either insert a new statement,\nsuch as:\n\n\t<> :=\n\nor a new function declaration, such as:\n\n\tfunc <>(inferred parameters) {\n\t\tpanic(\"implement me!\")\n\t}", "default": true }, "unmarshal": { @@ -2359,7 +2351,7 @@ }, "unusedvariable": { "type": "boolean", - "markdownDescription": "check for unused variables\n\nThe unusedvariable analyzer suggests fixes for unused variables errors.\n", + "markdownDescription": "check for unused variables and suggest fixes", "default": false }, "unusedwrite": { @@ -2413,6 +2405,20 @@ "default": "1s", "scope": "resource" }, + "ui.diagnostic.diagnosticsTrigger": { + "type": "string", + "markdownDescription": "(Experimental) diagnosticsTrigger controls when to run diagnostics.\n", + "enum": [ + "Edit", + "Save" + ], + "markdownEnumDescriptions": [ + "`\"Edit\"`: Trigger diagnostics on file edit and save. (default)\n", + "`\"Save\"`: Trigger diagnostics only on file save. Events like initial workspace load\nor configuration change will still trigger diagnostics.\n" + ], + "default": "Edit", + "scope": "resource" + }, "ui.diagnostic.staticcheck": { "type": "boolean", "markdownDescription": "(Experimental) staticcheck enables additional analyses from staticcheck.io.\nThese analyses are documented on\n[Staticcheck's website](https://staticcheck.io/docs/checks/).\n", From 0c3385775af7feca6bb9ea2f7e9350267c4352e2 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 5 Jan 2024 15:48:43 -0500 Subject: [PATCH 172/189] [release] src/goDeveloperSurvey: prepare for 2024 dev survey Fixes golang/vscode-go#3115 Change-Id: Ic66cbc1c2e4c745ef12af1576cddd53a1f14da7e Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/554063 TryBot-Result: kokoro Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley (cherry picked from commit 16c44c5738e2caae68f9f83be5184e8f4ea6d3ca) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556978 Auto-Submit: Hyang-Ah Hana Kim Run-TryBot: Hyang-Ah Hana Kim --- src/goDeveloperSurvey.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/goDeveloperSurvey.ts b/src/goDeveloperSurvey.ts index f78fdcdc86..9a647ee656 100644 --- a/src/goDeveloperSurvey.ts +++ b/src/goDeveloperSurvey.ts @@ -12,8 +12,8 @@ import { daysBetween, flushSurveyConfig, getStateConfig, minutesBetween, timeMin import { GoExtensionContext } from './context'; // Start and end dates of the survey. -export const startDate = new Date('Jul 20 2023 00:00:00 GMT'); -export const endDate = new Date('Aug 10 2023 00:00:00 GMT'); +export const startDate = new Date('Jan 23 2024 00:00:00 GMT'); +export const endDate = new Date('Feb 11 2024 00:00:00 GMT'); // DeveloperSurveyConfig is the set of global properties used to determine if // we should prompt a user to take the gopls survey. @@ -139,7 +139,7 @@ by participating in this 10-minute Go Developer Survey (2023 H2) before ${endDat { cfg.lastDateAccepted = now; cfg.prompt = true; - const surveyURL = 'https://google.qualtrics.com/jfe/form/SV_4Vi4bNaMQhQdqSi?s=p'; + const surveyURL = 'https://google.qualtrics.com/jfe/form/SV_083SVAUCji98YeO?s=p'; await vscode.env.openExternal(vscode.Uri.parse(surveyURL)); } break; From 50a7d734f139c5637b58a40191384445dfd8a7c6 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 19 Jan 2024 16:23:52 -0500 Subject: [PATCH 173/189] [release] extension/CHANGELOG.md: add v0.40.2 entry For golang/vscode-go#3142 Change-Id: I71ef7ed943472f4e5f9b979c9f077c3f959eaaa7 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556859 Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley TryBot-Result: kokoro --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0a31c7e5a..ecae03772d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v0.40.2 - 22 Jan, 2023 + +This is a point release to update the upcoming developer survey information +([the commit history](https://github.com/golang/vscode-go/compare/v0.40.1...v0.40.2)). + ## v0.40.1 - 21 Dec, 2023 This is a point release to fix minor bugs. A comprehensive list of bug fixes and From d7e86245ef00f837a07ca99f00b3e0a309ce1f91 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 19 Jan 2024 17:59:19 -0500 Subject: [PATCH 174/189] [release] package.json: update the version for v0.40.2 release Change-Id: I2d8b818aae4abed83dc685f3f9f2e2713e924879 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/556861 Reviewed-by: Robert Findley Commit-Queue: Hyang-Ah Hana Kim TryBot-Result: kokoro --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9a2c288f0..00bcb210d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "go", - "version": "0.40.1", + "version": "0.40.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.40.1", + "version": "0.40.2", "license": "MIT", "dependencies": { "diff": "4.0.2", "glob": "7.1.7", "json-rpc2": "2.0.0", "moment": "2.29.4", - "semver": "^7.5.4", + "semver": "7.5.4", "tree-kill": "file:third_party/tree-kill", "vscode-debugadapter": "1.45.0", "vscode-debugprotocol": "1.45.0", diff --git a/package.json b/package.json index 30b987087e..21c2a6f55d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.40.1", + "version": "0.40.2", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From b72c071d683bcd4e3480cea3794e5b41e7e548e6 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 22 Jan 2024 11:20:42 -0500 Subject: [PATCH 175/189] [release] src/goDeveloperSurvey: fix the prompt text The survey page shows "Go Developer Survey - January 2024". Change-Id: I269f99511bd6000155fdc7661267e52db588376a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/557435 TryBot-Result: kokoro Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley --- CHANGELOG.md | 4 ++-- src/goDeveloperSurvey.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecae03772d..cdc23aac87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ -## v0.40.2 - 22 Jan, 2023 +## v0.40.3 - 22 Jan, 2024 This is a point release to update the upcoming developer survey information -([the commit history](https://github.com/golang/vscode-go/compare/v0.40.1...v0.40.2)). +([the commit history](https://github.com/golang/vscode-go/compare/v0.40.1...v0.40.3)). ## v0.40.1 - 21 Dec, 2023 diff --git a/src/goDeveloperSurvey.ts b/src/goDeveloperSurvey.ts index 9a647ee656..07d66101b7 100644 --- a/src/goDeveloperSurvey.ts +++ b/src/goDeveloperSurvey.ts @@ -123,8 +123,8 @@ export function shouldPromptForSurvey(now: Date, cfg: DeveloperSurveyConfig): De export async function promptForDeveloperSurvey(cfg: DeveloperSurveyConfig, now: Date): Promise { const selected = await vscode.window.showInformationMessage( - `"Help shape Go’s future! Would you like to help ensure that Go is meeting your needs -by participating in this 10-minute Go Developer Survey (2023 H2) before ${endDate.toDateString()}?`, + `Help shape Go’s future! Would you like to help ensure that Go is meeting your needs +by participating in this 10-minute Go Developer Survey (January 2024) before ${endDate.toDateString()}?`, 'Yes', 'Remind me later', 'Never' From 3cfeaa48c917a0b57b254abb6e756bda3f4f0a72 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 12 Feb 2024 21:31:35 -0500 Subject: [PATCH 176/189] [release] docs/tools.md: fix vscgo package doc link Change-Id: Ie46108795d8ec362182f2c150af3f365122be8ea Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/563363 Reviewed-by: Robert Findley Commit-Queue: Hyang-Ah Hana Kim TryBot-Result: kokoro (cherry picked from commit 6dd3745f821ed6dfb6093fcae4afe2a9a22a549f) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/563795 Auto-Submit: Hyang-Ah Hana Kim --- README.md | 2 +- docs/tools.md | 2 +- extension/CHANGELOG.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 15ca3d47e6..630dc710a2 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ traces to [telemetry.go.dev](https://telemetry.go.dev). You can inspect what data is collected and can be uploaded by running: ``` -go run golang.org/x/telemetry/cmdgotelemetry@latest view +go run golang.org/x/telemetry/cmd/gotelemetry@latest view ``` If we get enough adoption, this data can significantly advance the pace of diff --git a/docs/tools.md b/docs/tools.md index 5c93bcad05..7f998cb5ec 100644 --- a/docs/tools.md +++ b/docs/tools.md @@ -35,7 +35,7 @@ This extension uses Delve for its debug/test functionalities. The extension curr For a comprehensive overview of how to debug your Go programs, please see the [debugging guide](./debugging.md). -### [`vscgo`](https://pkg.go.dev/github.com/golang/vscode-go/cmd/vscgo) +### [`vscgo`](https://pkg.go.dev/github.com/golang/vscode-go/vscgo) This tool provides utilities needed by this extension but do not belong to the language server or debug adapter server. Examples include dependency tools management, developer survey diff --git a/extension/CHANGELOG.md b/extension/CHANGELOG.md index 1af81c4e55..e7c2527f46 100644 --- a/extension/CHANGELOG.md +++ b/extension/CHANGELOG.md @@ -59,7 +59,7 @@ history](https://github.com/golang/vscode-go/compare/v0.40.3...v0.41.0). * The extension does not require `dlv` installation until the debug feature is invoked. * The extension now installs - [`vscgo`](https://pkg.go.dev/github.com/golang/vscode-go/cmd/vscgo), an + [`vscgo`](https://pkg.go.dev/github.com/golang/vscode-go/vscgo), an optional tool used to [update the Go telemetry counters](https://github.com/golang/vscode-go/issues/3121). This tool is installed in the extension's directory. From 2cbc8fce962ffcbc4e055592035b4d3f403c0948 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 21 Feb 2024 15:09:51 -0500 Subject: [PATCH 177/189] [release] extension/src/goMain: skip vscgo installation on windows And, pass `-trimpath` when building it so the executable file hash is stable. And increase the vscgo test timeout. Fixes golang/vscode-go#3182 Change-Id: Ib86bf07ddc4a89849bb778b2621268b334f3a80a Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/565679 Reviewed-by: Peter Weinberger kokoro-CI: kokoro Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley (cherry picked from commit 0b3fabc4c832194f59ca913f36f048aecd1f78ae) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/565680 Auto-Submit: Hyang-Ah Hana Kim --- extension/CHANGELOG.md | 7 +++++++ extension/src/goInstallTools.ts | 2 +- extension/src/goMain.ts | 21 ++++++++++++--------- extension/test/gopls/telemetry.test.ts | 4 +--- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/extension/CHANGELOG.md b/extension/CHANGELOG.md index e7c2527f46..6f4f3db44b 100644 --- a/extension/CHANGELOG.md +++ b/extension/CHANGELOG.md @@ -1,3 +1,10 @@ +## v0.41.1 - 22 Feb, 2024 + +This release is a point release to skip `vscgo` installation on Windows +([Issue 3182](https://github.com/golang/vscode-go/issues/3182)). +For a detailed list of changes, refer to the complete +[commit history](https://github.com/golang/vscode-go/compare/v0.41.0...v0.41.1). + ## v0.41.0 - 14 Feb, 2024 This release introduces significant updates to the extension's UI. diff --git a/extension/src/goInstallTools.ts b/extension/src/goInstallTools.ts index 8d570c7949..490e77573c 100644 --- a/extension/src/goInstallTools.ts +++ b/extension/src/goInstallTools.ts @@ -893,7 +893,7 @@ export async function maybeInstallVSCGO( : `@v${extensionVersion}`; // build from source acquired from the module proxy if this is a non-preview version. try { - const args = ['install', `${importPath}${version}`]; + const args = ['install', '-trimpath', `${importPath}${version}`]; console.log(`installing vscgo: ${args.join(' ')}`); await execFile(getBinPath('go'), args, { cwd, env }); return progPath; diff --git a/extension/src/goMain.ts b/extension/src/goMain.ts index b1221e4bbb..73265bdd85 100644 --- a/extension/src/goMain.ts +++ b/extension/src/goMain.ts @@ -102,15 +102,18 @@ export async function activate(ctx: vscode.ExtensionContext): Promise telemetryReporter.setTool(path)) - .catch((reason) => console.error(reason)); + if (process.platform !== 'win32') { + // skip windows until Windows Defender issue reported in golang/vscode-go#3182 can be addressed + maybeInstallVSCGO( + ctx.extensionMode, + ctx.extension.id, + extensionInfo.version || '', + ctx.extensionPath, + extensionInfo.isPreview + ) + .then((path) => telemetryReporter.setTool(path)) + .catch((reason) => console.error(reason)); + } const registerCommand = commands.createRegisterCommand(ctx, goCtx); registerCommand('go.languageserver.restart', commands.startLanguageServer); diff --git a/extension/test/gopls/telemetry.test.ts b/extension/test/gopls/telemetry.test.ts index 6f409d1938..32dc1fcbc7 100644 --- a/extension/test/gopls/telemetry.test.ts +++ b/extension/test/gopls/telemetry.test.ts @@ -173,9 +173,7 @@ function testTelemetryPrompt(tc: testCase, wantPrompt: boolean) { } describe('# telemetry reporter using vscgo', async function () { - if (os.platform() === 'win32') { - this.timeout(10000); // go install is slow on windows builder. - } + this.timeout(10000); // go install can be slow. // installVSCGO expects // {extensionPath}/vscgo: vscgo source code for testing. // {extensionPath}/bin: where compiled vscgo will be stored. From 2ba3f688d16dc73a80618c17aa426a34ebc41d87 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 21 Feb 2024 16:12:24 -0500 Subject: [PATCH 178/189] [release] prepare v0.41.1 release For golang/vscode-go#3185 Change-Id: I5b1d17940890a52e6e7977e2ff69c558eb60ad34 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/565681 Reviewed-by: Robert Findley Commit-Queue: Hyang-Ah Hana Kim kokoro-CI: kokoro --- extension/package-lock.json | 4 ++-- extension/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/package-lock.json b/extension/package-lock.json index c7f428ab6e..a3e7a1aa81 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.41.0", + "version": "0.41.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.41.0", + "version": "0.41.1", "license": "MIT", "dependencies": { "diff": "4.0.2", diff --git a/extension/package.json b/extension/package.json index 8c5ae26a17..d6413d11ec 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.41.0", + "version": "0.41.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From abfa2cb8b40775618cfe3b5e8f40b8961722a727 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 19 Apr 2024 12:48:59 -0400 Subject: [PATCH 179/189] [release] extension/package.json: update version (v0.41.3) For golang/vscode-go#3348 Change-Id: If6c1892bdccb87124f3dfeba0546d651fe07fb09 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/580416 Reviewed-by: Robert Findley Commit-Queue: Hyang-Ah Hana Kim kokoro-CI: kokoro --- extension/package-lock.json | 4 ++-- extension/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/package-lock.json b/extension/package-lock.json index 5dece0c6c2..1edba78ba4 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.41.2", + "version": "0.41.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.41.2", + "version": "0.41.3", "license": "MIT", "dependencies": { "diff": "4.0.2", diff --git a/extension/package.json b/extension/package.json index 597d031785..8bce7b5a63 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.41.2", + "version": "0.41.3", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From db1036f18de03690f7a958942bd4e8bb67428483 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Tue, 23 Apr 2024 16:22:27 -0400 Subject: [PATCH 180/189] [release] extension/package.json: set version to 0.41.4 Change-Id: I8ba98d4a4c9ff81335dfda6cf0f9b155c82ff109 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/581178 Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley kokoro-CI: kokoro Auto-Submit: Hyang-Ah Hana Kim --- extension/package-lock.json | 4 ++-- extension/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/package-lock.json b/extension/package-lock.json index 1edba78ba4..ca5325dd2d 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.41.3", + "version": "0.41.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.41.3", + "version": "0.41.4", "license": "MIT", "dependencies": { "diff": "4.0.2", diff --git a/extension/package.json b/extension/package.json index 8bce7b5a63..e28ccd8bb0 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.41.3", + "version": "0.41.4", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From 27404b367dab0f3e0b8aa7537937c8231c459500 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 15 Jul 2024 19:01:28 -0400 Subject: [PATCH 181/189] [release] LICENSE, extension/LICENSE: fix LICENSE files The LICENSE files in the release branch maintain the copies of the LICENSE files embedded in the released products. This repo hosts two products * github.com/golang/vscode-go: source is in . * VS Code Go extension (.vsix): source is in ./extension As we moved the extension code to ./extension (a separate module), and started to use github.com/golang/vscode-go module to host only the go program, we needed to rearrange the LICENSE files in the release branch, but we didn't do it correctly. Fix it now. * github.com/golang/vscode-go/LICENSE: the license of the github.com/golang/vscode-go Go module. Follows the Go module convention. Still keep the MIT license. * github.com/golang/vscode-go/extension/LICENSE: the license of the VSIX file that includes all the dependencies licenses. Follows the recommendation from our product counsel. cp extension/LICENSE LICENSE.correct cp LICENSE extension/LICENSE mv LICENSE.correct LICENSE For golang/vscode-go#3453 Change-Id: Id6caa237d3c783c713081b142fdbd0d6915c23fd Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/598455 Reviewed-by: Robert Findley kokoro-CI: kokoro Auto-Submit: Hyang-Ah Hana Kim Commit-Queue: Hyang-Ah Hana Kim --- LICENSE | 1883 --------------------------------------------- extension/LICENSE | 1883 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1883 insertions(+), 1883 deletions(-) diff --git a/LICENSE b/LICENSE index 18602338fe..bec3260395 100644 --- a/LICENSE +++ b/LICENSE @@ -22,1886 +22,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE GO PRODUCT. - ------ - -The following software may be included in this product: ajv. A copy of the source code may be downloaded from https://github.com/ajv-validator/ajv.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2015-2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: asn1. A copy of the source code may be downloaded from git://github.com/joyent/node-asn1.git. This software contains the following license and notice below: - -Copyright (c) 2011 Mark Cavage, All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE - ------ - -The following software may be included in this product: asynckit. A copy of the source code may be downloaded from git+https://github.com/alexindigo/asynckit.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2016 Alex Indigo - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: aws-sign2, forever-agent, oauth-sign, request, tunnel-agent. A copy of the source code may be downloaded from https://github.com/mikeal/aws-sign (aws-sign2), https://github.com/mikeal/forever-agent (forever-agent), https://github.com/mikeal/oauth-sign (oauth-sign), https://github.com/request/request.git (request), https://github.com/mikeal/tunnel-agent (tunnel-agent). This software contains the following license and notice below: - -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - ------ - -The following software may be included in this product: aws4. A copy of the source code may be downloaded from https://github.com/mhart/aws4.git. This software contains the following license and notice below: - -Copyright 2013 Michael Hart (michael.hart.au@gmail.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: balanced-match. A copy of the source code may be downloaded from git://github.com/juliangruber/balanced-match.git. This software contains the following license and notice below: - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: bcrypt-pbkdf. A copy of the source code may be downloaded from git://github.com/joyent/node-bcrypt-pbkdf.git. This software contains the following license and notice below: - -The Blowfish portions are under the following license: - -Blowfish block cipher for OpenBSD -Copyright 1997 Niels Provos -All rights reserved. - -Implementation advice by David Mazieres . - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -The bcrypt_pbkdf portions are under the following license: - -Copyright (c) 2013 Ted Unangst - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - - -Performance improvements (Javascript-specific): - -Copyright 2016, Joyent Inc -Author: Alex Wilson - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ------ - -The following software may be included in this product: brace-expansion. A copy of the source code may be downloaded from git://github.com/juliangruber/brace-expansion.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: caseless. A copy of the source code may be downloaded from https://github.com/mikeal/caseless. This software contains the following license and notice below: - -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS - ------ - -The following software may be included in this product: combined-stream, delayed-stream. A copy of the source code may be downloaded from git://github.com/felixge/node-combined-stream.git (combined-stream), git://github.com/felixge/node-delayed-stream.git (delayed-stream). This software contains the following license and notice below: - -Copyright (c) 2011 Debuggable Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: concat-map, is-typedarray, minimist. A copy of the source code may be downloaded from git://github.com/substack/node-concat-map.git (concat-map), git://github.com/hughsk/is-typedarray.git (is-typedarray), git://github.com/substack/minimist.git (minimist). This software contains the following license and notice below: - -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: core-util-is. A copy of the source code may be downloaded from git://github.com/isaacs/core-util-is. This software contains the following license and notice below: - -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - ------ - -The following software may be included in this product: dashdash. A copy of the source code may be downloaded from git://github.com/trentm/node-dashdash.git. This software contains the following license and notice below: - -# This is the MIT license - -Copyright (c) 2013 Trent Mick. All rights reserved. -Copyright (c) 2013 Joyent Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: debug. A copy of the source code may be downloaded from git://github.com/debug-js/debug.git. This software contains the following license and notice below: - -(The MIT License) - -Copyright (c) 2014-2017 TJ Holowaychuk -Copyright (c) 2018-2021 Josh Junon - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: diff. A copy of the source code may be downloaded from git://github.com/kpdecker/jsdiff.git. This software contains the following license and notice below: - -Software License Agreement (BSD License) - -Copyright (c) 2009-2015, Kevin Decker - -All rights reserved. - -Redistribution and use of this software in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above - copyright notice, this list of conditions and the - following disclaimer. - -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -* Neither the name of Kevin Decker nor the names of its - contributors may be used to endorse or promote products - derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------ - -The following software may be included in this product: ecc-jsbn. A copy of the source code may be downloaded from https://github.com/quartzjer/ecc-jsbn.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2014 Jeremie Miller - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: es5class. A copy of the source code may be downloaded from https://github.com/pocesar/ES5-Class.git. This software contains the following license and notice below: - -(The MIT License) - -Copyright (c) 2011 Bruno Filippone - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: extend. A copy of the source code may be downloaded from https://github.com/justmoon/node-extend.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2014 Stefan Thomas - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: extsprintf, jsprim. A copy of the source code may be downloaded from git://github.com/davepacheco/node-extsprintf.git (extsprintf), git://github.com/joyent/node-jsprim.git (jsprim). This software contains the following license and notice below: - -Copyright (c) 2012, Joyent, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE - ------ - -The following software may be included in this product: fast-deep-equal, json-schema-traverse. A copy of the source code may be downloaded from git+https://github.com/epoberezkin/fast-deep-equal.git (fast-deep-equal), git+https://github.com/epoberezkin/json-schema-traverse.git (json-schema-traverse). This software contains the following license and notice below: - -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: fast-json-stable-stringify. A copy of the source code may be downloaded from git://github.com/epoberezkin/fast-json-stable-stringify.git. This software contains the following license and notice below: - -This software is released under the MIT license: - -Copyright (c) 2017 Evgeny Poberezkin -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: faye-websocket. A copy of the source code may be downloaded from git://github.com/faye/faye-websocket-node.git. This software contains the following license and notice below: - -Copyright 2010-2019 James Coglan - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - ------ - -The following software may be included in this product: form-data. A copy of the source code may be downloaded from git://github.com/form-data/form-data.git. This software contains the following license and notice below: - -Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ------ - -The following software may be included in this product: fs.realpath. A copy of the source code may be downloaded from git+https://github.com/isaacs/fs.realpath.git. This software contains the following license and notice below: - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ----- - -This library bundles a version of the `fs.realpath` and `fs.realpathSync` -methods from Node.js v0.10 under the terms of the Node.js MIT license. - -Node's license follows, also included at the header of `old.js` which contains -the licensed code: - - Copyright Joyent, Inc. and other Node contributors. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: getpass, http-signature, sshpk. A copy of the source code may be downloaded from https://github.com/arekinath/node-getpass.git (getpass), git://github.com/joyent/node-http-signature.git (http-signature), git+https://github.com/joyent/node-sshpk.git (sshpk). This software contains the following license and notice below: - -Copyright Joyent, Inc. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - ------ - -The following software may be included in this product: glob. A copy of the source code may be downloaded from git://github.com/isaacs/node-glob.git. This software contains the following license and notice below: - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -## Glob Logo - -Glob's logo created by Tanya Brassie , licensed -under a Creative Commons Attribution-ShareAlike 4.0 International License -https://creativecommons.org/licenses/by-sa/4.0/ - ------ - -The following software may be included in this product: har-schema. A copy of the source code may be downloaded from https://github.com/ahmadnassri/har-schema.git. This software contains the following license and notice below: - -Copyright (c) 2015, Ahmad Nassri - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ------ - -The following software may be included in this product: har-validator. A copy of the source code may be downloaded from https://github.com/ahmadnassri/node-har-validator.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2018 Ahmad Nassri - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: http-parser-js. A copy of the source code may be downloaded from git://github.com/creationix/http-parser-js.git. This software contains the following license and notice below: - -Copyright (c) 2015 Tim Caswell (https://github.com/creationix) and other -contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -Some files from the tests folder are from joyent/node and mscedex/io.js, a fork -of nodejs/io.js: - -- tests/iojs/test-http-parser-durability.js - - This file is from https://github.com/mscdex/io.js/blob/js-http-parser/test/pummel/test-http-parser-durability.js - with modifications by Jan Schär (jscissr). - - """ - Copyright io.js contributors. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - """ - -- tests/fixtures/* - tests/parallel/* - tests/testpy/* - tests/common.js - tests/test.py - tests/utils.py - - These files are from https://github.com/nodejs/node with changes by - Jan Schär (jscissr). - - Node.js is licensed for use as follows: - - """ - Copyright Node.js contributors. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - """ - - This license applies to parts of Node.js originating from the - https://github.com/joyent/node repository: - - """ - Copyright Joyent, Inc. and other Node contributors. All rights reserved. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. - """ - ------ - -The following software may be included in this product: inflight. A copy of the source code may be downloaded from https://github.com/npm/inflight.git. This software contains the following license and notice below: - -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ------ - -The following software may be included in this product: inherits. A copy of the source code may be downloaded from git://github.com/isaacs/inherits. This software contains the following license and notice below: - -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - ------ - -The following software may be included in this product: isstream. A copy of the source code may be downloaded from https://github.com/rvagg/isstream.git. This software contains the following license and notice below: - -The MIT License (MIT) -===================== - -Copyright (c) 2015 Rod Vagg ---------------------------- - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: jsbn. A copy of the source code may be downloaded from https://github.com/andyperlitch/jsbn.git. This software contains the following license and notice below: - -Licensing ---------- - -This software is covered under the following copyright: - -/* - * Copyright (c) 2003-2005 Tom Wu - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF - * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * In addition, the following condition applies: - * - * All redistributions must retain an intact copy of this copyright notice - * and disclaimer. - */ - -Address all questions regarding this license to: - - Tom Wu - tjw@cs.Stanford.EDU - ------ - -The following software may be included in this product: json-rpc2. A copy of the source code may be downloaded from git://github.com/pocesar/node-jsonrpc2.git. This software contains the following license and notice below: - -Copyright (C) 2009 Eric Florenzano and - Ryan Tomayko - -Permission is hereby granted, free of charge, to any person ob- -taining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without restric- -tion, including without limitation the rights to use, copy, modi- -fy, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is fur- -nished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONIN- -FRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: json-schema. A copy of the source code may be downloaded from http://github.com/kriszyp/json-schema. This software contains the following license and notice below: - -Dojo is available under *either* the terms of the BSD 3-Clause "New" License *or* the -Academic Free License version 2.1. As a recipient of Dojo, you may choose which -license to receive this code under (except as noted in per-module LICENSE -files). Some modules may not be the copyright of the Dojo Foundation. These -modules contain explicit declarations of copyright in both the LICENSE files in -the directories in which they reside and in the code itself. No external -contributions are allowed under licenses which are fundamentally incompatible -with the AFL-2.1 OR and BSD-3-Clause licenses that Dojo is distributed under. - -The text of the AFL-2.1 and BSD-3-Clause licenses is reproduced below. - -------------------------------------------------------------------------------- -BSD 3-Clause "New" License: -********************** - -Copyright (c) 2005-2015, The Dojo Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------------------- -The Academic Free License, v. 2.1: -********************************** - -This Academic Free License (the "License") applies to any original work of -authorship (the "Original Work") whose owner (the "Licensor") has placed the -following notice immediately following the copyright notice for the Original -Work: - -Licensed under the Academic Free License version 2.1 - -1) Grant of Copyright License. Licensor hereby grants You a world-wide, -royalty-free, non-exclusive, perpetual, sublicenseable license to do the -following: - -a) to reproduce the Original Work in copies; - -b) to prepare derivative works ("Derivative Works") based upon the Original -Work; - -c) to distribute copies of the Original Work and Derivative Works to the -public; - -d) to perform the Original Work publicly; and - -e) to display the Original Work publicly. - -2) Grant of Patent License. Licensor hereby grants You a world-wide, -royalty-free, non-exclusive, perpetual, sublicenseable license, under patent -claims owned or controlled by the Licensor that are embodied in the Original -Work as furnished by the Licensor, to make, use, sell and offer for sale the -Original Work and Derivative Works. - -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor hereby -agrees to provide a machine-readable copy of the Source Code of the Original -Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a -machine-readable copy of the Source Code in an information repository -reasonably calculated to permit inexpensive and convenient access by You for as -long as Licensor continues to distribute the Original Work, and by publishing -the address of that information repository in a notice immediately following -the copyright notice that applies to the Original Work. - -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or -service marks, may be used to endorse or promote products derived from this -Original Work without express prior written permission of the Licensor. Nothing -in this License shall be deemed to grant any rights to trademarks, copyrights, -patents, trade secrets or any other intellectual property of Licensor except as -expressly stated herein. No patent license is granted to make, use, sell or -offer to sell embodiments of any patent claims other than the licensed claims -defined in Section 2. No right is granted to the trademarks of Licensor even if -such marks are included in the Original Work. Nothing in this License shall be -interpreted to prohibit Licensor from licensing under different terms from this -License any Original Work that Licensor otherwise would have a right to -license. - -5) This section intentionally omitted. - -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and any -descriptive text identified therein as an "Attribution Notice." You must cause -the Source Code for any Derivative Works that You create to carry a prominent -Attribution Notice reasonably calculated to inform recipients that You have -modified the Original Work. - -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the terms -of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately proceeding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No -license to Original Work is granted hereunder except under this disclaimer. - -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for loss -of goodwill, work stoppage, computer failure or malfunction, or any and all -other commercial damages or losses. This limitation of liability shall not -apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some -jurisdictions do not allow the exclusion or limitation of incidental or -consequential damages, so this exclusion and limitation may not apply to You. - -9) Acceptance and Termination. If You distribute copies of the Original Work or -a Derivative Work, You must make a reasonable effort under the circumstances to -obtain the express assent of recipients to the terms of this License. Nothing -else but this License (or another written agreement between Licensor and You) -grants You permission to create Derivative Works based upon the Original Work -or to exercise any of the rights granted in Section 1 herein, and any attempt -to do so except under the terms of this License (or another written agreement -between Licensor and You) is expressly prohibited by U.S. copyright law, the -equivalent laws of other countries, and by international treaty. Therefore, by -exercising any of the rights granted to You in Section 1 herein, You indicate -Your acceptance of this License and all of its terms and conditions. - -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -against Licensor or any licensee alleging that the Original Work infringes a -patent. This termination provision shall not apply for an action alleging -patent infringement by combinations of the Original Work with other software or -hardware. - -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this -License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside the -scope of this License or after its termination shall be subject to the -requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et -seq., the equivalent laws of other countries, and international treaty. This -section shall survive the termination of this License. - -12) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. - -13) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. - -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal -entities, "You" includes any entity that controls, is controlled by, or is -under common control with you. For purposes of this definition, "control" means -(i) the power, direct or indirect, to cause the direction or management of such -entity, whether by contract or otherwise, or (ii) ownership of fifty percent -(50%) or more of the outstanding shares, or (iii) beneficial ownership of such -entity. - -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises not -to interfere with or be responsible for such uses by You. - -This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. -Permission is hereby granted to copy and distribute this license without -modification. This license may not be modified without the express written -permission of its copyright owner. - ------ - -The following software may be included in this product: json-stringify-safe, lru-cache, minimatch, once, semver, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver.git (semver), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below: - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ------ - -The following software may be included in this product: jsonparse. A copy of the source code may be downloaded from http://github.com/creationix/jsonparse.git. This software contains the following license and notice below: - -The MIT License - -Copyright (c) 2012 Tim Caswell - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: lodash. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git. This software contains the following license and notice below: - -Copyright OpenJS Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. - ------ - -The following software may be included in this product: mime-db. A copy of the source code may be downloaded from https://github.com/jshttp/mime-db.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: mime-types. A copy of the source code may be downloaded from https://github.com/jshttp/mime-types.git. This software contains the following license and notice below: - -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: minimatch. A copy of the source code may be downloaded from git://github.com/isaacs/minimatch.git. This software contains the following license and notice below: - -The ISC License - -Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ------ - -The following software may be included in this product: mkdirp. A copy of the source code may be downloaded from https://github.com/substack/node-mkdirp.git. This software contains the following license and notice below: - -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: moment. A copy of the source code may be downloaded from https://github.com/moment/moment.git. This software contains the following license and notice below: - -Copyright (c) JS Foundation and other contributors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: ms. A copy of the source code may be downloaded from https://github.com/zeit/ms.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2016 Zeit, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: object-assign, path-is-absolute. A copy of the source code may be downloaded from https://github.com/sindresorhus/object-assign.git (object-assign), https://github.com/sindresorhus/path-is-absolute.git (path-is-absolute). This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: performance-now. A copy of the source code may be downloaded from git://github.com/braveg1rl/performance-now.git. This software contains the following license and notice below: - -Copyright (c) 2013 Braveg1rl - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: psl. A copy of the source code may be downloaded from git@github.com:lupomontero/psl.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2017 Lupo Montero lupomontero@gmail.com - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: qs. A copy of the source code may be downloaded from https://github.com/ljharb/qs.git. This software contains the following license and notice below: - -BSD 3-Clause License - -Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------ - -The following software may be included in this product: safe-buffer. A copy of the source code may be downloaded from git://github.com/feross/safe-buffer.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: safer-buffer. A copy of the source code may be downloaded from git+https://github.com/ChALkeR/safer-buffer.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2018 Nikita Skovoroda - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: tough-cookie. A copy of the source code may be downloaded from git://github.com/salesforce/tough-cookie.git. This software contains the following license and notice below: - -Copyright (c) 2015, Salesforce.com, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------ - -The following software may be included in this product: tree-kill. A copy of the source code may be downloaded from git://github.com/pkrumins/node-tree-kill.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2018 Peter Krumins - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: tweetnacl. A copy of the source code may be downloaded from https://github.com/dchest/tweetnacl-js.git. This software contains the following license and notice below: - -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to - ------ - -The following software may be included in this product: uri-js. A copy of the source code may be downloaded from http://github.com/garycourt/uri-js. This software contains the following license and notice below: - -Copyright 2011 Gary Court. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. - ------ - -The following software may be included in this product: uuid. A copy of the source code may be downloaded from https://github.com/uuidjs/uuid.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2010-2016 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: verror. A copy of the source code may be downloaded from git://github.com/davepacheco/node-verror.git. This software contains the following license and notice below: - -Copyright (c) 2016, Joyent, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE - ------ - -The following software may be included in this product: vscode-debugadapter, vscode-debugprotocol. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugprotocol). This software contains the following license and notice below: - -Copyright (c) Microsoft Corporation - -All rights reserved. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: vscode-jsonrpc, vscode-languageclient, vscode-languageserver-protocol, vscode-languageserver-types. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-languageserver-node.git (vscode-jsonrpc), https://github.com/Microsoft/vscode-languageserver-node.git (vscode-languageclient), https://github.com/Microsoft/vscode-languageserver-node.git (vscode-languageserver-protocol), https://github.com/Microsoft/vscode-languageserver-node.git (vscode-languageserver-types). This software contains the following license and notice below: - -Copyright (c) Microsoft Corporation - -All rights reserved. - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: vscode-uri. A copy of the source code may be downloaded from git+https://github.com/microsoft/vscode-uri.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: web-request. A copy of the source code may be downloaded from git+https://github.com/davetemplin/web-request.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2016 Dave Templin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: websocket-driver. A copy of the source code may be downloaded from git://github.com/faye/websocket-driver-node.git. This software contains the following license and notice below: - -Copyright 2010-2020 James Coglan - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - ------ - -The following software may be included in this product: websocket-extensions. A copy of the source code may be downloaded from git://github.com/faye/websocket-extensions-node.git. This software contains the following license and notice below: - -Copyright 2014-2020 James Coglan - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - diff --git a/extension/LICENSE b/extension/LICENSE index bec3260395..18602338fe 100644 --- a/extension/LICENSE +++ b/extension/LICENSE @@ -22,3 +22,1886 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE GO PRODUCT. + +----- + +The following software may be included in this product: ajv. A copy of the source code may be downloaded from https://github.com/ajv-validator/ajv.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2015-2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: asn1. A copy of the source code may be downloaded from git://github.com/joyent/node-asn1.git. This software contains the following license and notice below: + +Copyright (c) 2011 Mark Cavage, All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE + +----- + +The following software may be included in this product: asynckit. A copy of the source code may be downloaded from git+https://github.com/alexindigo/asynckit.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2016 Alex Indigo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: aws-sign2, forever-agent, oauth-sign, request, tunnel-agent. A copy of the source code may be downloaded from https://github.com/mikeal/aws-sign (aws-sign2), https://github.com/mikeal/forever-agent (forever-agent), https://github.com/mikeal/oauth-sign (oauth-sign), https://github.com/request/request.git (request), https://github.com/mikeal/tunnel-agent (tunnel-agent). This software contains the following license and notice below: + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +----- + +The following software may be included in this product: aws4. A copy of the source code may be downloaded from https://github.com/mhart/aws4.git. This software contains the following license and notice below: + +Copyright 2013 Michael Hart (michael.hart.au@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: balanced-match. A copy of the source code may be downloaded from git://github.com/juliangruber/balanced-match.git. This software contains the following license and notice below: + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: bcrypt-pbkdf. A copy of the source code may be downloaded from git://github.com/joyent/node-bcrypt-pbkdf.git. This software contains the following license and notice below: + +The Blowfish portions are under the following license: + +Blowfish block cipher for OpenBSD +Copyright 1997 Niels Provos +All rights reserved. + +Implementation advice by David Mazieres . + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +The bcrypt_pbkdf portions are under the following license: + +Copyright (c) 2013 Ted Unangst + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + +Performance improvements (Javascript-specific): + +Copyright 2016, Joyent Inc +Author: Alex Wilson + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: brace-expansion. A copy of the source code may be downloaded from git://github.com/juliangruber/brace-expansion.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: caseless. A copy of the source code may be downloaded from https://github.com/mikeal/caseless. This software contains the following license and notice below: + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +1. Definitions. +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. +END OF TERMS AND CONDITIONS + +----- + +The following software may be included in this product: combined-stream, delayed-stream. A copy of the source code may be downloaded from git://github.com/felixge/node-combined-stream.git (combined-stream), git://github.com/felixge/node-delayed-stream.git (delayed-stream). This software contains the following license and notice below: + +Copyright (c) 2011 Debuggable Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: concat-map, is-typedarray, minimist. A copy of the source code may be downloaded from git://github.com/substack/node-concat-map.git (concat-map), git://github.com/hughsk/is-typedarray.git (is-typedarray), git://github.com/substack/minimist.git (minimist). This software contains the following license and notice below: + +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: core-util-is. A copy of the source code may be downloaded from git://github.com/isaacs/core-util-is. This software contains the following license and notice below: + +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +----- + +The following software may be included in this product: dashdash. A copy of the source code may be downloaded from git://github.com/trentm/node-dashdash.git. This software contains the following license and notice below: + +# This is the MIT license + +Copyright (c) 2013 Trent Mick. All rights reserved. +Copyright (c) 2013 Joyent Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: debug. A copy of the source code may be downloaded from git://github.com/debug-js/debug.git. This software contains the following license and notice below: + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: diff. A copy of the source code may be downloaded from git://github.com/kpdecker/jsdiff.git. This software contains the following license and notice below: + +Software License Agreement (BSD License) + +Copyright (c) 2009-2015, Kevin Decker + +All rights reserved. + +Redistribution and use of this software in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither the name of Kevin Decker nor the names of its + contributors may be used to endorse or promote products + derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----- + +The following software may be included in this product: ecc-jsbn. A copy of the source code may be downloaded from https://github.com/quartzjer/ecc-jsbn.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2014 Jeremie Miller + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: es5class. A copy of the source code may be downloaded from https://github.com/pocesar/ES5-Class.git. This software contains the following license and notice below: + +(The MIT License) + +Copyright (c) 2011 Bruno Filippone + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: extend. A copy of the source code may be downloaded from https://github.com/justmoon/node-extend.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2014 Stefan Thomas + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: extsprintf, jsprim. A copy of the source code may be downloaded from git://github.com/davepacheco/node-extsprintf.git (extsprintf), git://github.com/joyent/node-jsprim.git (jsprim). This software contains the following license and notice below: + +Copyright (c) 2012, Joyent, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE + +----- + +The following software may be included in this product: fast-deep-equal, json-schema-traverse. A copy of the source code may be downloaded from git+https://github.com/epoberezkin/fast-deep-equal.git (fast-deep-equal), git+https://github.com/epoberezkin/json-schema-traverse.git (json-schema-traverse). This software contains the following license and notice below: + +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: fast-json-stable-stringify. A copy of the source code may be downloaded from git://github.com/epoberezkin/fast-json-stable-stringify.git. This software contains the following license and notice below: + +This software is released under the MIT license: + +Copyright (c) 2017 Evgeny Poberezkin +Copyright (c) 2013 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: faye-websocket. A copy of the source code may be downloaded from git://github.com/faye/faye-websocket-node.git. This software contains the following license and notice below: + +Copyright 2010-2019 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +----- + +The following software may be included in this product: form-data. A copy of the source code may be downloaded from git://github.com/form-data/form-data.git. This software contains the following license and notice below: + +Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +----- + +The following software may be included in this product: fs.realpath. A copy of the source code may be downloaded from git+https://github.com/isaacs/fs.realpath.git. This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + Copyright Joyent, Inc. and other Node contributors. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: getpass, http-signature, sshpk. A copy of the source code may be downloaded from https://github.com/arekinath/node-getpass.git (getpass), git://github.com/joyent/node-http-signature.git (http-signature), git+https://github.com/joyent/node-sshpk.git (sshpk). This software contains the following license and notice below: + +Copyright Joyent, Inc. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +----- + +The following software may be included in this product: glob. A copy of the source code may be downloaded from git://github.com/isaacs/node-glob.git. This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +## Glob Logo + +Glob's logo created by Tanya Brassie , licensed +under a Creative Commons Attribution-ShareAlike 4.0 International License +https://creativecommons.org/licenses/by-sa/4.0/ + +----- + +The following software may be included in this product: har-schema. A copy of the source code may be downloaded from https://github.com/ahmadnassri/har-schema.git. This software contains the following license and notice below: + +Copyright (c) 2015, Ahmad Nassri + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: har-validator. A copy of the source code may be downloaded from https://github.com/ahmadnassri/node-har-validator.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2018 Ahmad Nassri + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: http-parser-js. A copy of the source code may be downloaded from git://github.com/creationix/http-parser-js.git. This software contains the following license and notice below: + +Copyright (c) 2015 Tim Caswell (https://github.com/creationix) and other +contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +Some files from the tests folder are from joyent/node and mscedex/io.js, a fork +of nodejs/io.js: + +- tests/iojs/test-http-parser-durability.js + + This file is from https://github.com/mscdex/io.js/blob/js-http-parser/test/pummel/test-http-parser-durability.js + with modifications by Jan Schär (jscissr). + + """ + Copyright io.js contributors. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + """ + +- tests/fixtures/* + tests/parallel/* + tests/testpy/* + tests/common.js + tests/test.py + tests/utils.py + + These files are from https://github.com/nodejs/node with changes by + Jan Schär (jscissr). + + Node.js is licensed for use as follows: + + """ + Copyright Node.js contributors. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + """ + + This license applies to parts of Node.js originating from the + https://github.com/joyent/node repository: + + """ + Copyright Joyent, Inc. and other Node contributors. All rights reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + IN THE SOFTWARE. + """ + +----- + +The following software may be included in this product: inflight. A copy of the source code may be downloaded from https://github.com/npm/inflight.git. This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: inherits. A copy of the source code may be downloaded from git://github.com/isaacs/inherits. This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: isstream. A copy of the source code may be downloaded from https://github.com/rvagg/isstream.git. This software contains the following license and notice below: + +The MIT License (MIT) +===================== + +Copyright (c) 2015 Rod Vagg +--------------------------- + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: jsbn. A copy of the source code may be downloaded from https://github.com/andyperlitch/jsbn.git. This software contains the following license and notice below: + +Licensing +--------- + +This software is covered under the following copyright: + +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ + +Address all questions regarding this license to: + + Tom Wu + tjw@cs.Stanford.EDU + +----- + +The following software may be included in this product: json-rpc2. A copy of the source code may be downloaded from git://github.com/pocesar/node-jsonrpc2.git. This software contains the following license and notice below: + +Copyright (C) 2009 Eric Florenzano and + Ryan Tomayko + +Permission is hereby granted, free of charge, to any person ob- +taining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restric- +tion, including without limitation the rights to use, copy, modi- +fy, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONIN- +FRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: json-schema. A copy of the source code may be downloaded from http://github.com/kriszyp/json-schema. This software contains the following license and notice below: + +Dojo is available under *either* the terms of the BSD 3-Clause "New" License *or* the +Academic Free License version 2.1. As a recipient of Dojo, you may choose which +license to receive this code under (except as noted in per-module LICENSE +files). Some modules may not be the copyright of the Dojo Foundation. These +modules contain explicit declarations of copyright in both the LICENSE files in +the directories in which they reside and in the code itself. No external +contributions are allowed under licenses which are fundamentally incompatible +with the AFL-2.1 OR and BSD-3-Clause licenses that Dojo is distributed under. + +The text of the AFL-2.1 and BSD-3-Clause licenses is reproduced below. + +------------------------------------------------------------------------------- +BSD 3-Clause "New" License: +********************** + +Copyright (c) 2005-2015, The Dojo Foundation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the Dojo Foundation nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------- +The Academic Free License, v. 2.1: +********************************** + +This Academic Free License (the "License") applies to any original work of +authorship (the "Original Work") whose owner (the "Licensor") has placed the +following notice immediately following the copyright notice for the Original +Work: + +Licensed under the Academic Free License version 2.1 + +1) Grant of Copyright License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license to do the +following: + +a) to reproduce the Original Work in copies; + +b) to prepare derivative works ("Derivative Works") based upon the Original +Work; + +c) to distribute copies of the Original Work and Derivative Works to the +public; + +d) to perform the Original Work publicly; and + +e) to display the Original Work publicly. + +2) Grant of Patent License. Licensor hereby grants You a world-wide, +royalty-free, non-exclusive, perpetual, sublicenseable license, under patent +claims owned or controlled by the Licensor that are embodied in the Original +Work as furnished by the Licensor, to make, use, sell and offer for sale the +Original Work and Derivative Works. + +3) Grant of Source Code License. The term "Source Code" means the preferred +form of the Original Work for making modifications to it and all available +documentation describing how to modify the Original Work. Licensor hereby +agrees to provide a machine-readable copy of the Source Code of the Original +Work along with each copy of the Original Work that Licensor distributes. +Licensor reserves the right to satisfy this obligation by placing a +machine-readable copy of the Source Code in an information repository +reasonably calculated to permit inexpensive and convenient access by You for as +long as Licensor continues to distribute the Original Work, and by publishing +the address of that information repository in a notice immediately following +the copyright notice that applies to the Original Work. + +4) Exclusions From License Grant. Neither the names of Licensor, nor the names +of any contributors to the Original Work, nor any of their trademarks or +service marks, may be used to endorse or promote products derived from this +Original Work without express prior written permission of the Licensor. Nothing +in this License shall be deemed to grant any rights to trademarks, copyrights, +patents, trade secrets or any other intellectual property of Licensor except as +expressly stated herein. No patent license is granted to make, use, sell or +offer to sell embodiments of any patent claims other than the licensed claims +defined in Section 2. No right is granted to the trademarks of Licensor even if +such marks are included in the Original Work. Nothing in this License shall be +interpreted to prohibit Licensor from licensing under different terms from this +License any Original Work that Licensor otherwise would have a right to +license. + +5) This section intentionally omitted. + +6) Attribution Rights. You must retain, in the Source Code of any Derivative +Works that You create, all copyright, patent or trademark notices from the +Source Code of the Original Work, as well as any notices of licensing and any +descriptive text identified therein as an "Attribution Notice." You must cause +the Source Code for any Derivative Works that You create to carry a prominent +Attribution Notice reasonably calculated to inform recipients that You have +modified the Original Work. + +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that +the copyright in and to the Original Work and the patent rights granted herein +by Licensor are owned by the Licensor or are sublicensed to You under the terms +of this License with the permission of the contributor(s) of those copyrights +and patent rights. Except as expressly stated in the immediately proceeding +sentence, the Original Work is provided under this License on an "AS IS" BASIS +and WITHOUT WARRANTY, either express or implied, including, without limitation, +the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. +This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No +license to Original Work is granted hereunder except under this disclaimer. + +8) Limitation of Liability. Under no circumstances and under no legal theory, +whether in tort (including negligence), contract, or otherwise, shall the +Licensor be liable to any person for any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License +or the use of the Original Work including, without limitation, damages for loss +of goodwill, work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses. This limitation of liability shall not +apply to liability for death or personal injury resulting from Licensor's +negligence to the extent applicable law prohibits such limitation. Some +jurisdictions do not allow the exclusion or limitation of incidental or +consequential damages, so this exclusion and limitation may not apply to You. + +9) Acceptance and Termination. If You distribute copies of the Original Work or +a Derivative Work, You must make a reasonable effort under the circumstances to +obtain the express assent of recipients to the terms of this License. Nothing +else but this License (or another written agreement between Licensor and You) +grants You permission to create Derivative Works based upon the Original Work +or to exercise any of the rights granted in Section 1 herein, and any attempt +to do so except under the terms of this License (or another written agreement +between Licensor and You) is expressly prohibited by U.S. copyright law, the +equivalent laws of other countries, and by international treaty. Therefore, by +exercising any of the rights granted to You in Section 1 herein, You indicate +Your acceptance of this License and all of its terms and conditions. + +10) Termination for Patent Action. This License shall terminate automatically +and You may no longer exercise any of the rights granted to You by this License +as of the date You commence an action, including a cross-claim or counterclaim, +against Licensor or any licensee alleging that the Original Work infringes a +patent. This termination provision shall not apply for an action alleging +patent infringement by combinations of the Original Work with other software or +hardware. + +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this +License may be brought only in the courts of a jurisdiction wherein the +Licensor resides or in which Licensor conducts its primary business, and under +the laws of that jurisdiction excluding its conflict-of-law provisions. The +application of the United Nations Convention on Contracts for the International +Sale of Goods is expressly excluded. Any use of the Original Work outside the +scope of this License or after its termination shall be subject to the +requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et +seq., the equivalent laws of other countries, and international treaty. This +section shall survive the termination of this License. + +12) Attorneys Fees. In any action to enforce the terms of this License or +seeking damages relating thereto, the prevailing party shall be entitled to +recover its costs and expenses, including, without limitation, reasonable +attorneys' fees and costs incurred in connection with such action, including +any appeal of such action. This section shall survive the termination of this +License. + +13) Miscellaneous. This License represents the complete agreement concerning +the subject matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent necessary to +make it enforceable. + +14) Definition of "You" in This License. "You" throughout this License, whether +in upper or lower case, means an individual or a legal entity exercising rights +under, and complying with all of the terms of, this License. For legal +entities, "You" includes any entity that controls, is controlled by, or is +under common control with you. For purposes of this definition, "control" means +(i) the power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty percent +(50%) or more of the outstanding shares, or (iii) beneficial ownership of such +entity. + +15) Right to Use. You may use the Original Work in all ways not otherwise +restricted or conditioned by this License or by law, and Licensor promises not +to interfere with or be responsible for such uses by You. + +This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. +Permission is hereby granted to copy and distribute this license without +modification. This license may not be modified without the express written +permission of its copyright owner. + +----- + +The following software may be included in this product: json-stringify-safe, lru-cache, minimatch, once, semver, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver.git (semver), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below: + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: jsonparse. A copy of the source code may be downloaded from http://github.com/creationix/jsonparse.git. This software contains the following license and notice below: + +The MIT License + +Copyright (c) 2012 Tim Caswell + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: lodash. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git. This software contains the following license and notice below: + +Copyright OpenJS Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + +----- + +The following software may be included in this product: mime-db. A copy of the source code may be downloaded from https://github.com/jshttp/mime-db.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: mime-types. A copy of the source code may be downloaded from https://github.com/jshttp/mime-types.git. This software contains the following license and notice below: + +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: minimatch. A copy of the source code may be downloaded from git://github.com/isaacs/minimatch.git. This software contains the following license and notice below: + +The ISC License + +Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +----- + +The following software may be included in this product: mkdirp. A copy of the source code may be downloaded from https://github.com/substack/node-mkdirp.git. This software contains the following license and notice below: + +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: moment. A copy of the source code may be downloaded from https://github.com/moment/moment.git. This software contains the following license and notice below: + +Copyright (c) JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: ms. A copy of the source code may be downloaded from https://github.com/zeit/ms.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: object-assign, path-is-absolute. A copy of the source code may be downloaded from https://github.com/sindresorhus/object-assign.git (object-assign), https://github.com/sindresorhus/path-is-absolute.git (path-is-absolute). This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: performance-now. A copy of the source code may be downloaded from git://github.com/braveg1rl/performance-now.git. This software contains the following license and notice below: + +Copyright (c) 2013 Braveg1rl + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: psl. A copy of the source code may be downloaded from git@github.com:lupomontero/psl.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2017 Lupo Montero lupomontero@gmail.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: qs. A copy of the source code may be downloaded from https://github.com/ljharb/qs.git. This software contains the following license and notice below: + +BSD 3-Clause License + +Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----- + +The following software may be included in this product: safe-buffer. A copy of the source code may be downloaded from git://github.com/feross/safe-buffer.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----- + +The following software may be included in this product: safer-buffer. A copy of the source code may be downloaded from git+https://github.com/ChALkeR/safer-buffer.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2018 Nikita Skovoroda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: tough-cookie. A copy of the source code may be downloaded from git://github.com/salesforce/tough-cookie.git. This software contains the following license and notice below: + +Copyright (c) 2015, Salesforce.com, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----- + +The following software may be included in this product: tree-kill. A copy of the source code may be downloaded from git://github.com/pkrumins/node-tree-kill.git. This software contains the following license and notice below: + +MIT License + +Copyright (c) 2018 Peter Krumins + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: tweetnacl. A copy of the source code may be downloaded from https://github.com/dchest/tweetnacl-js.git. This software contains the following license and notice below: + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to + +----- + +The following software may be included in this product: uri-js. A copy of the source code may be downloaded from http://github.com/garycourt/uri-js. This software contains the following license and notice below: + +Copyright 2011 Gary Court. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. + +----- + +The following software may be included in this product: uuid. A copy of the source code may be downloaded from https://github.com/uuidjs/uuid.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: verror. A copy of the source code may be downloaded from git://github.com/davepacheco/node-verror.git. This software contains the following license and notice below: + +Copyright (c) 2016, Joyent, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE + +----- + +The following software may be included in this product: vscode-debugadapter, vscode-debugprotocol. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugprotocol). This software contains the following license and notice below: + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: vscode-jsonrpc, vscode-languageclient, vscode-languageserver-protocol, vscode-languageserver-types. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-languageserver-node.git (vscode-jsonrpc), https://github.com/Microsoft/vscode-languageserver-node.git (vscode-languageclient), https://github.com/Microsoft/vscode-languageserver-node.git (vscode-languageserver-protocol), https://github.com/Microsoft/vscode-languageserver-node.git (vscode-languageserver-types). This software contains the following license and notice below: + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: vscode-uri. A copy of the source code may be downloaded from git+https://github.com/microsoft/vscode-uri.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----- + +The following software may be included in this product: web-request. A copy of the source code may be downloaded from git+https://github.com/davetemplin/web-request.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2016 Dave Templin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----- + +The following software may be included in this product: websocket-driver. A copy of the source code may be downloaded from git://github.com/faye/websocket-driver-node.git. This software contains the following license and notice below: + +Copyright 2010-2020 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +----- + +The following software may be included in this product: websocket-extensions. A copy of the source code may be downloaded from git://github.com/faye/websocket-extensions-node.git. This software contains the following license and notice below: + +Copyright 2014-2020 James Coglan + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + From 3e515c5ac4839b0b1ce89aa3a4e1815c3b5ae65f Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 15 Jul 2024 19:09:07 -0400 Subject: [PATCH 182/189] [release] extension/LICENSE: update license We didn't update the release branch's LICENSE file during the v0.41.0 release. CL 551115 replaced `web-request` with `node-fetch` and that changed indirect dependencies a lot. Regenerated the license file by running cd extension && ./tools/license.sh && mv LICENSE.prod LICENSE For golang/vscode-go#3453 Change-Id: I0f5a34c380ae8c717e86979d368ec291cc575b74 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/598458 kokoro-CI: kokoro Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley --- extension/LICENSE | 1178 +++------------------------------------------ 1 file changed, 80 insertions(+), 1098 deletions(-) diff --git a/extension/LICENSE b/extension/LICENSE index 18602338fe..c2cfe79ac0 100644 --- a/extension/LICENSE +++ b/extension/LICENSE @@ -28,166 +28,6 @@ THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY B ----- -The following software may be included in this product: ajv. A copy of the source code may be downloaded from https://github.com/ajv-validator/ajv.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2015-2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: asn1. A copy of the source code may be downloaded from git://github.com/joyent/node-asn1.git. This software contains the following license and notice below: - -Copyright (c) 2011 Mark Cavage, All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE - ------ - -The following software may be included in this product: asynckit. A copy of the source code may be downloaded from git+https://github.com/alexindigo/asynckit.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2016 Alex Indigo - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: aws-sign2, forever-agent, oauth-sign, request, tunnel-agent. A copy of the source code may be downloaded from https://github.com/mikeal/aws-sign (aws-sign2), https://github.com/mikeal/forever-agent (forever-agent), https://github.com/mikeal/oauth-sign (oauth-sign), https://github.com/request/request.git (request), https://github.com/mikeal/tunnel-agent (tunnel-agent). This software contains the following license and notice below: - -Apache License - -Version 2.0, January 2004 - -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of this License; and - -You must cause any modified files to carry prominent notices stating that You changed the files; and - -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - ------ - -The following software may be included in this product: aws4. A copy of the source code may be downloaded from https://github.com/mhart/aws4.git. This software contains the following license and notice below: - -Copyright 2013 Michael Hart (michael.hart.au@gmail.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - The following software may be included in this product: balanced-match. A copy of the source code may be downloaded from git://github.com/juliangruber/balanced-match.git. This software contains the following license and notice below: (MIT) @@ -214,77 +54,6 @@ SOFTWARE. ----- -The following software may be included in this product: bcrypt-pbkdf. A copy of the source code may be downloaded from git://github.com/joyent/node-bcrypt-pbkdf.git. This software contains the following license and notice below: - -The Blowfish portions are under the following license: - -Blowfish block cipher for OpenBSD -Copyright 1997 Niels Provos -All rights reserved. - -Implementation advice by David Mazieres . - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -The bcrypt_pbkdf portions are under the following license: - -Copyright (c) 2013 Ted Unangst - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - - -Performance improvements (Javascript-specific): - -Copyright 2016, Joyent Inc -Author: Alex Wilson - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ------ - The following software may be included in this product: brace-expansion. A copy of the source code may be downloaded from git://github.com/juliangruber/brace-expansion.git. This software contains the following license and notice below: MIT License @@ -311,64 +80,7 @@ SOFTWARE. ----- -The following software may be included in this product: caseless. A copy of the source code may be downloaded from https://github.com/mikeal/caseless. This software contains the following license and notice below: - -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -1. Definitions. -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -You must give any other recipients of the Work or Derivative Works a copy of this License; and -You must cause any modified files to carry prominent notices stating that You changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -END OF TERMS AND CONDITIONS - ------ - -The following software may be included in this product: combined-stream, delayed-stream. A copy of the source code may be downloaded from git://github.com/felixge/node-combined-stream.git (combined-stream), git://github.com/felixge/node-delayed-stream.git (delayed-stream). This software contains the following license and notice below: - -Copyright (c) 2011 Debuggable Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: concat-map, is-typedarray, minimist. A copy of the source code may be downloaded from git://github.com/substack/node-concat-map.git (concat-map), git://github.com/hughsk/is-typedarray.git (is-typedarray), git://github.com/substack/minimist.git (minimist). This software contains the following license and notice below: +The following software may be included in this product: concat-map, minimist. A copy of the source code may be downloaded from git://github.com/substack/node-concat-map.git (concat-map), git://github.com/substack/minimist.git (minimist). This software contains the following license and notice below: This software is released under the MIT license: @@ -391,58 +103,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- -The following software may be included in this product: core-util-is. A copy of the source code may be downloaded from git://github.com/isaacs/core-util-is. This software contains the following license and notice below: - -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - ------ - -The following software may be included in this product: dashdash. A copy of the source code may be downloaded from git://github.com/trentm/node-dashdash.git. This software contains the following license and notice below: - -# This is the MIT license - -Copyright (c) 2013 Trent Mick. All rights reserved. -Copyright (c) 2013 Joyent Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - The following software may be included in this product: debug. A copy of the source code may be downloaded from git://github.com/debug-js/debug.git. This software contains the following license and notice below: (The MIT License) @@ -503,32 +163,6 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----- -The following software may be included in this product: ecc-jsbn. A copy of the source code may be downloaded from https://github.com/quartzjer/ecc-jsbn.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2014 Jeremie Miller - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - The following software may be included in this product: es5class. A copy of the source code may be downloaded from https://github.com/pocesar/ES5-Class.git. This software contains the following license and notice below: (The MIT License) @@ -556,109 +190,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----- -The following software may be included in this product: extend. A copy of the source code may be downloaded from https://github.com/justmoon/node-extend.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2014 Stefan Thomas - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: extsprintf, jsprim. A copy of the source code may be downloaded from git://github.com/davepacheco/node-extsprintf.git (extsprintf), git://github.com/joyent/node-jsprim.git (jsprim). This software contains the following license and notice below: - -Copyright (c) 2012, Joyent, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE - ------ - -The following software may be included in this product: fast-deep-equal, json-schema-traverse. A copy of the source code may be downloaded from git+https://github.com/epoberezkin/fast-deep-equal.git (fast-deep-equal), git+https://github.com/epoberezkin/json-schema-traverse.git (json-schema-traverse). This software contains the following license and notice below: - -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: fast-json-stable-stringify. A copy of the source code may be downloaded from git://github.com/epoberezkin/fast-json-stable-stringify.git. This software contains the following license and notice below: - -This software is released under the MIT license: - -Copyright (c) 2017 Evgeny Poberezkin -Copyright (c) 2013 James Halliday - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - The following software may be included in this product: faye-websocket. A copy of the source code may be downloaded from git://github.com/faye/faye-websocket-node.git. This software contains the following license and notice below: Copyright 2010-2019 James Coglan @@ -676,30 +207,6 @@ specific language governing permissions and limitations under the License. ----- -The following software may be included in this product: form-data. A copy of the source code may be downloaded from git://github.com/form-data/form-data.git. This software contains the following license and notice below: - -Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ------ - The following software may be included in this product: fs.realpath. A copy of the source code may be downloaded from git+https://github.com/isaacs/fs.realpath.git. This software contains the following license and notice below: The ISC License @@ -748,29 +255,6 @@ the licensed code: ----- -The following software may be included in this product: getpass, http-signature, sshpk. A copy of the source code may be downloaded from https://github.com/arekinath/node-getpass.git (getpass), git://github.com/joyent/node-http-signature.git (http-signature), git+https://github.com/joyent/node-sshpk.git (sshpk). This software contains the following license and notice below: - -Copyright Joyent, Inc. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - ------ - The following software may be included in this product: glob. A copy of the source code may be downloaded from git://github.com/isaacs/node-glob.git. This software contains the following license and notice below: The ISC License @@ -797,38 +281,6 @@ https://creativecommons.org/licenses/by-sa/4.0/ ----- -The following software may be included in this product: har-schema. A copy of the source code may be downloaded from https://github.com/ahmadnassri/har-schema.git. This software contains the following license and notice below: - -Copyright (c) 2015, Ahmad Nassri - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ------ - -The following software may be included in this product: har-validator. A copy of the source code may be downloaded from https://github.com/ahmadnassri/node-har-validator.git. This software contains the following license and notice below: - -MIT License - -Copyright (c) 2018 Ahmad Nassri - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - The following software may be included in this product: http-parser-js. A copy of the source code may be downloaded from git://github.com/creationix/http-parser-js.git. This software contains the following license and notice below: Copyright (c) 2015 Tim Caswell (https://github.com/creationix) and other @@ -983,67 +435,6 @@ PERFORMANCE OF THIS SOFTWARE. ----- -The following software may be included in this product: isstream. A copy of the source code may be downloaded from https://github.com/rvagg/isstream.git. This software contains the following license and notice below: - -The MIT License (MIT) -===================== - -Copyright (c) 2015 Rod Vagg ---------------------------- - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: jsbn. A copy of the source code may be downloaded from https://github.com/andyperlitch/jsbn.git. This software contains the following license and notice below: - -Licensing ---------- - -This software is covered under the following copyright: - -/* - * Copyright (c) 2003-2005 Tom Wu - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF - * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * In addition, the following condition applies: - * - * All redistributions must retain an intact copy of this copyright notice - * and disclaimer. - */ - -Address all questions regarding this license to: - - Tom Wu - tjw@cs.Stanford.EDU - ------ - The following software may be included in this product: json-rpc2. A copy of the source code may be downloaded from git://github.com/pocesar/node-jsonrpc2.git. This software contains the following license and notice below: Copyright (C) 2009 Eric Florenzano and @@ -1052,242 +443,22 @@ Copyright (C) 2009 Eric Florenzano and Permission is hereby granted, free of charge, to any person ob- taining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restric- -tion, including without limitation the rights to use, copy, modi- -fy, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is fur- -nished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONIN- -FRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: json-schema. A copy of the source code may be downloaded from http://github.com/kriszyp/json-schema. This software contains the following license and notice below: - -Dojo is available under *either* the terms of the BSD 3-Clause "New" License *or* the -Academic Free License version 2.1. As a recipient of Dojo, you may choose which -license to receive this code under (except as noted in per-module LICENSE -files). Some modules may not be the copyright of the Dojo Foundation. These -modules contain explicit declarations of copyright in both the LICENSE files in -the directories in which they reside and in the code itself. No external -contributions are allowed under licenses which are fundamentally incompatible -with the AFL-2.1 OR and BSD-3-Clause licenses that Dojo is distributed under. - -The text of the AFL-2.1 and BSD-3-Clause licenses is reproduced below. - -------------------------------------------------------------------------------- -BSD 3-Clause "New" License: -********************** - -Copyright (c) 2005-2015, The Dojo Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------------------- -The Academic Free License, v. 2.1: -********************************** - -This Academic Free License (the "License") applies to any original work of -authorship (the "Original Work") whose owner (the "Licensor") has placed the -following notice immediately following the copyright notice for the Original -Work: - -Licensed under the Academic Free License version 2.1 - -1) Grant of Copyright License. Licensor hereby grants You a world-wide, -royalty-free, non-exclusive, perpetual, sublicenseable license to do the -following: - -a) to reproduce the Original Work in copies; - -b) to prepare derivative works ("Derivative Works") based upon the Original -Work; - -c) to distribute copies of the Original Work and Derivative Works to the -public; - -d) to perform the Original Work publicly; and - -e) to display the Original Work publicly. - -2) Grant of Patent License. Licensor hereby grants You a world-wide, -royalty-free, non-exclusive, perpetual, sublicenseable license, under patent -claims owned or controlled by the Licensor that are embodied in the Original -Work as furnished by the Licensor, to make, use, sell and offer for sale the -Original Work and Derivative Works. - -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor hereby -agrees to provide a machine-readable copy of the Source Code of the Original -Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a -machine-readable copy of the Source Code in an information repository -reasonably calculated to permit inexpensive and convenient access by You for as -long as Licensor continues to distribute the Original Work, and by publishing -the address of that information repository in a notice immediately following -the copyright notice that applies to the Original Work. - -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or -service marks, may be used to endorse or promote products derived from this -Original Work without express prior written permission of the Licensor. Nothing -in this License shall be deemed to grant any rights to trademarks, copyrights, -patents, trade secrets or any other intellectual property of Licensor except as -expressly stated herein. No patent license is granted to make, use, sell or -offer to sell embodiments of any patent claims other than the licensed claims -defined in Section 2. No right is granted to the trademarks of Licensor even if -such marks are included in the Original Work. Nothing in this License shall be -interpreted to prohibit Licensor from licensing under different terms from this -License any Original Work that Licensor otherwise would have a right to -license. - -5) This section intentionally omitted. - -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and any -descriptive text identified therein as an "Attribution Notice." You must cause -the Source Code for any Derivative Works that You create to carry a prominent -Attribution Notice reasonably calculated to inform recipients that You have -modified the Original Work. - -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the terms -of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately proceeding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No -license to Original Work is granted hereunder except under this disclaimer. - -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for loss -of goodwill, work stoppage, computer failure or malfunction, or any and all -other commercial damages or losses. This limitation of liability shall not -apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some -jurisdictions do not allow the exclusion or limitation of incidental or -consequential damages, so this exclusion and limitation may not apply to You. - -9) Acceptance and Termination. If You distribute copies of the Original Work or -a Derivative Work, You must make a reasonable effort under the circumstances to -obtain the express assent of recipients to the terms of this License. Nothing -else but this License (or another written agreement between Licensor and You) -grants You permission to create Derivative Works based upon the Original Work -or to exercise any of the rights granted in Section 1 herein, and any attempt -to do so except under the terms of this License (or another written agreement -between Licensor and You) is expressly prohibited by U.S. copyright law, the -equivalent laws of other countries, and by international treaty. Therefore, by -exercising any of the rights granted to You in Section 1 herein, You indicate -Your acceptance of this License and all of its terms and conditions. - -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -against Licensor or any licensee alleging that the Original Work infringes a -patent. This termination provision shall not apply for an action alleging -patent infringement by combinations of the Original Work with other software or -hardware. - -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this -License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside the -scope of this License or after its termination shall be subject to the -requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et -seq., the equivalent laws of other countries, and international treaty. This -section shall survive the termination of this License. - -12) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. - -13) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. - -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal -entities, "You" includes any entity that controls, is controlled by, or is -under common control with you. For purposes of this definition, "control" means -(i) the power, direct or indirect, to cause the direction or management of such -entity, whether by contract or otherwise, or (ii) ownership of fifty percent -(50%) or more of the outstanding shares, or (iii) beneficial ownership of such -entity. - -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises not -to interfere with or be responsible for such uses by You. - -This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. -Permission is hereby granted to copy and distribute this license without -modification. This license may not be modified without the express written -permission of its copyright owner. - ------ - -The following software may be included in this product: json-stringify-safe, lru-cache, minimatch, once, semver, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver.git (semver), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below: - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +tion, including without limitation the rights to use, copy, modi- +fy, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONIN- +FRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ----- @@ -1372,57 +543,23 @@ terms above. ----- -The following software may be included in this product: mime-db. A copy of the source code may be downloaded from https://github.com/jshttp/mime-db.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2014 Jonathan Ong me@jongleberry.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: mime-types. A copy of the source code may be downloaded from https://github.com/jshttp/mime-types.git. This software contains the following license and notice below: +The following software may be included in this product: lru-cache, minimatch, once, semver, wrappy, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/once (once), https://github.com/npm/node-semver.git (semver), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below: -(The MIT License) - -Copyright (c) 2014 Jonathan Ong -Copyright (c) 2015 Douglas Christopher Wilson +The ISC License -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Copyright (c) Isaac Z. Schlueter and Contributors -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ----- @@ -1525,11 +662,11 @@ SOFTWARE. ----- -The following software may be included in this product: object-assign, path-is-absolute. A copy of the source code may be downloaded from https://github.com/sindresorhus/object-assign.git (object-assign), https://github.com/sindresorhus/path-is-absolute.git (path-is-absolute). This software contains the following license and notice below: +The following software may be included in this product: node-fetch. A copy of the source code may be downloaded from https://github.com/bitinn/node-fetch.git. This software contains the following license and notice below: The MIT License (MIT) -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) 2016 David Frank Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1538,84 +675,24 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - ------ - -The following software may be included in this product: performance-now. A copy of the source code may be downloaded from git://github.com/braveg1rl/performance-now.git. This software contains the following license and notice below: - -Copyright (c) 2013 Braveg1rl - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: psl. A copy of the source code may be downloaded from git@github.com:lupomontero/psl.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2017 Lupo Montero lupomontero@gmail.com - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ------ - -The following software may be included in this product: qs. A copy of the source code may be downloaded from https://github.com/ljharb/qs.git. This software contains the following license and notice below: - -BSD 3-Clause License - -Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. ----- -The following software may be included in this product: safe-buffer. A copy of the source code may be downloaded from git://github.com/feross/safe-buffer.git. This software contains the following license and notice below: +The following software may be included in this product: object-assign, path-is-absolute. A copy of the source code may be downloaded from https://github.com/sindresorhus/object-assign.git (object-assign), https://github.com/sindresorhus/path-is-absolute.git (path-is-absolute). This software contains the following license and notice below: The MIT License (MIT) -Copyright (c) Feross Aboukhadijeh +Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1637,11 +714,11 @@ THE SOFTWARE. ----- -The following software may be included in this product: safer-buffer. A copy of the source code may be downloaded from git+https://github.com/ChALkeR/safer-buffer.git. This software contains the following license and notice below: +The following software may be included in this product: safe-buffer. A copy of the source code may be downloaded from git://github.com/feross/safe-buffer.git. This software contains the following license and notice below: -MIT License +The MIT License (MIT) -Copyright (c) 2018 Nikita Skovoroda +Copyright (c) Feross Aboukhadijeh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1650,33 +727,16 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: tough-cookie. A copy of the source code may be downloaded from git://github.com/salesforce/tough-cookie.git. This software contains the following license and notice below: - -Copyright (c) 2015, Salesforce.com, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. ----- @@ -1706,101 +766,6 @@ SOFTWARE. ----- -The following software may be included in this product: tweetnacl. A copy of the source code may be downloaded from https://github.com/dchest/tweetnacl-js.git. This software contains the following license and notice below: - -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to - ------ - -The following software may be included in this product: uri-js. A copy of the source code may be downloaded from http://github.com/garycourt/uri-js. This software contains the following license and notice below: - -Copyright 2011 Gary Court. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY GARY COURT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of Gary Court. - ------ - -The following software may be included in this product: uuid. A copy of the source code may be downloaded from https://github.com/uuidjs/uuid.git. This software contains the following license and notice below: - -The MIT License (MIT) - -Copyright (c) 2010-2016 Robert Kieffer and other contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ------ - -The following software may be included in this product: verror. A copy of the source code may be downloaded from git://github.com/davepacheco/node-verror.git. This software contains the following license and notice below: - -Copyright (c) 2016, Joyent, Inc. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE - ------ - The following software may be included in this product: vscode-debugadapter, vscode-debugprotocol. A copy of the source code may be downloaded from https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugadapter), https://github.com/Microsoft/vscode-debugadapter-node.git (vscode-debugprotocol). This software contains the following license and notice below: Copyright (c) Microsoft Corporation @@ -1847,29 +812,20 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ----- -The following software may be included in this product: web-request. A copy of the source code may be downloaded from git+https://github.com/davetemplin/web-request.git. This software contains the following license and notice below: +The following software may be included in this product: webidl-conversions. A copy of the source code may be downloaded from https://github.com/jsdom/webidl-conversions.git. This software contains the following license and notice below: -The MIT License (MIT) +# The BSD 2-Clause License -Copyright (c) 2016 Dave Templin +Copyright (c) 2014, Domenic Denicola +All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----- @@ -1905,3 +861,29 @@ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +----- + +The following software may be included in this product: whatwg-url. A copy of the source code may be downloaded from https://github.com/jsdom/whatwg-url.git. This software contains the following license and notice below: + +The MIT License (MIT) + +Copyright (c) 2015–2016 Sebastian Mayr + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + From c2efd1f39345d744b4321e1ff287ac216c17d4f4 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Wed, 4 Sep 2024 14:30:12 -0400 Subject: [PATCH 183/189] [release-v0.42] extension/src/goTelemetry: increase prompt rate to 25% Fixes golang/vscode-go#3519 Change-Id: Id542c6439fda16d7afc7400d621c9e1c24f18444 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/610717 kokoro-CI: kokoro Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley (cherry picked from commit d030a5eefce130bbddf54662c1fda3710269c4fb) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/610796 --- extension/src/goTelemetry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/src/goTelemetry.ts b/extension/src/goTelemetry.ts index fec57bb1d6..5321b30d09 100644 --- a/extension/src/goTelemetry.ts +++ b/extension/src/goTelemetry.ts @@ -181,7 +181,7 @@ export class TelemetryService { async promptForTelemetry( isPreviewExtension: boolean, isVSCodeTelemetryEnabled: boolean = vscode.env.isTelemetryEnabled, - samplingInterval = 50 /* prompt N out of 1000. 50 = 5% */ + samplingInterval = 250 /* prompt N out of 1000. 250 = 25% */ ) { if (!this.active) return; From 2c75908aee127ff98c8ebc8a10cbcca9246d796e Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Thu, 5 Sep 2024 16:59:49 +0000 Subject: [PATCH 184/189] [release-v0.42] extension/src/goToolsInformation: update gopls version v0.16.2 This is an automated CL which updates the gopls version. For golang/go#68916 Change-Id: Ie84c3060febfb9eed75a4c16c9778706df33a6a5 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/610658 Auto-Submit: Gopher Robot Reviewed-by: Robert Findley Reviewed-by: Hongxiang Jiang kokoro-CI: kokoro Commit-Queue: Gopher Robot Auto-Submit: Hyang-Ah Hana Kim Commit-Queue: Hyang-Ah Hana Kim --- extension/src/goToolsInformation.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extension/src/goToolsInformation.ts b/extension/src/goToolsInformation.ts index 4f9e020038..3e140a3a8d 100644 --- a/extension/src/goToolsInformation.ts +++ b/extension/src/goToolsInformation.ts @@ -103,10 +103,10 @@ export const allToolsInformation: { [key: string]: Tool } = { description: 'Language Server from Google', usePrereleaseInPreviewMode: true, minimumGoVersion: semver.coerce('1.19'), - latestVersion: semver.parse('v0.16.1'), - latestVersionTimestamp: moment('2024-07-01', 'YYYY-MM-DD'), - latestPrereleaseVersion: semver.parse('v0.16.1'), - latestPrereleaseVersionTimestamp: moment('2024-07-01', 'YYYY-MM-DD') + latestVersion: semver.parse('v0.16.2'), + latestVersionTimestamp: moment('2024-08-29', 'YYYY-MM-DD'), + latestPrereleaseVersion: semver.parse('v0.16.2'), + latestPrereleaseVersionTimestamp: moment('2024-08-29', 'YYYY-MM-DD') }, 'dlv': { name: 'dlv', From 23f4ad397cd232237eaa8218d490b1f2f99dc04d Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Thu, 22 Aug 2024 12:16:19 -0400 Subject: [PATCH 185/189] [release-v0.42] src/goToolsInformation: update tools versions gomodifytags: v1.16.0 -> v1.17.0 https://github.com/fatih/gomodifytags/releases/tag/v1.17.0 impl: v1.1.0 -> v1.4.0 https://github.com/josharian/impl/compare/v1.1.0...v1.4.0 gofumpt: v0.6.0 -> v0.7.0 https://github.com/mvdan/gofumpt/releases/tag/v0.7.0 (requires go1.22+) revive: v1.3.4 -> v1.3.9 https://github.com/mgechev/revive/releases Change-Id: Ie2ffe852e41ad6a394c37d2e7700f7b2752623c1 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/607757 kokoro-CI: kokoro Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley (cherry picked from commit 1d936eaf3b6a544e68953cd72df88d04b239410c) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/609278 Reviewed-by: Hongxiang Jiang --- extension/src/goTools.ts | 6 +++--- extension/src/goToolsInformation.ts | 8 ++++---- extension/tools/allTools.ts.in | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/extension/src/goTools.ts b/extension/src/goTools.ts index 4716f90f10..3eb3b9191e 100644 --- a/extension/src/goTools.ts +++ b/extension/src/goTools.ts @@ -82,9 +82,9 @@ export function getImportPathWithVersion( if (goVersion.lt('1.21')) return importPath + '@v0.4.7'; } if (tool.name === 'gofumpt') { - if (goVersion.lt('1.19')) return importPath + '@v0.4.0'; - if (goVersion.lt('1.20')) return importPath + '@v0.5.0'; - if (goVersion.lt('1.21')) return importPath + '@v0.6.0'; + if (goVersion.lt('1.19')) return importPath + '@v0.4.0'; // pre-go1.19 + if (goVersion.lt('1.20')) return importPath + '@v0.5.0'; // go1.19 + if (goVersion.lt('1.22')) return importPath + '@v0.6.0'; // go1.20~1.21 } if (tool.name === 'golangci-lint') { if (goVersion.lt('1.20')) return importPath + '@v1.53.3'; diff --git a/extension/src/goToolsInformation.ts b/extension/src/goToolsInformation.ts index 3e140a3a8d..f02004bf26 100644 --- a/extension/src/goToolsInformation.ts +++ b/extension/src/goToolsInformation.ts @@ -12,7 +12,7 @@ export const allToolsInformation: { [key: string]: Tool } = { replacedByGopls: false, isImportant: false, description: 'Modify tags on structs', - defaultVersion: 'v1.16.0' + defaultVersion: 'v1.17.0' }, 'goplay': { name: 'goplay', @@ -30,7 +30,7 @@ export const allToolsInformation: { [key: string]: Tool } = { replacedByGopls: false, isImportant: false, description: 'Stubs for interfaces', - defaultVersion: 'v1.1.0' + defaultVersion: 'v1.4.0' }, 'gofumpt': { name: 'gofumpt', @@ -39,7 +39,7 @@ export const allToolsInformation: { [key: string]: Tool } = { replacedByGopls: true, isImportant: false, description: 'Formatter', - defaultVersion: 'v0.6.0' + defaultVersion: 'v0.7.0' }, 'goimports': { name: 'goimports', @@ -92,7 +92,7 @@ export const allToolsInformation: { [key: string]: Tool } = { modulePath: 'github.com/mgechev/revive', isImportant: true, description: 'Linter', - defaultVersion: 'v1.3.4' + defaultVersion: 'v1.3.9' }, 'gopls': { name: 'gopls', diff --git a/extension/tools/allTools.ts.in b/extension/tools/allTools.ts.in index 2e6c1a1ff8..cbab1aef46 100644 --- a/extension/tools/allTools.ts.in +++ b/extension/tools/allTools.ts.in @@ -10,7 +10,7 @@ export const allToolsInformation: { [key: string]: Tool } = { replacedByGopls: false, isImportant: false, description: 'Modify tags on structs', - defaultVersion: 'v1.16.0' + defaultVersion: 'v1.17.0' }, 'goplay': { name: 'goplay', @@ -28,7 +28,7 @@ export const allToolsInformation: { [key: string]: Tool } = { replacedByGopls: false, isImportant: false, description: 'Stubs for interfaces', - defaultVersion: 'v1.1.0' + defaultVersion: 'v1.4.0' }, 'gofumpt': { name: 'gofumpt', @@ -37,7 +37,7 @@ export const allToolsInformation: { [key: string]: Tool } = { replacedByGopls: true, isImportant: false, description: 'Formatter', - defaultVersion: 'v0.6.0' + defaultVersion: 'v0.7.0' }, 'goimports': { name: 'goimports', @@ -90,7 +90,7 @@ export const allToolsInformation: { [key: string]: Tool } = { modulePath: 'github.com/mgechev/revive', isImportant: true, description: 'Linter', - defaultVersion: 'v1.3.4' + defaultVersion: 'v1.3.9' }, 'gopls': { name: 'gopls', From a1e69af0ee9ca755a80d4cd80e07a27a64832326 Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Fri, 30 Aug 2024 16:28:42 -0400 Subject: [PATCH 186/189] [release-v0.42] extension/src/goDeveloperSurvey: prepare for 2024 H2 go dev survey Fixes golang/vscode-go#3517 Change-Id: Idee1f0ace52cce9ec393f9dff5bd626280331d57 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/609277 Commit-Queue: Hyang-Ah Hana Kim kokoro-CI: kokoro Reviewed-by: Alice Merrick (cherry picked from commit a53c220ca7e77c297076874cf1cae47c8f321161) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/611838 Reviewed-by: Hongxiang Jiang Reviewed-by: Robert Findley --- extension/src/goDeveloperSurvey.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extension/src/goDeveloperSurvey.ts b/extension/src/goDeveloperSurvey.ts index 07d66101b7..0e63225442 100644 --- a/extension/src/goDeveloperSurvey.ts +++ b/extension/src/goDeveloperSurvey.ts @@ -12,8 +12,8 @@ import { daysBetween, flushSurveyConfig, getStateConfig, minutesBetween, timeMin import { GoExtensionContext } from './context'; // Start and end dates of the survey. -export const startDate = new Date('Jan 23 2024 00:00:00 GMT'); -export const endDate = new Date('Feb 11 2024 00:00:00 GMT'); +export const startDate = new Date('Sep 9 2024 00:00:00 GMT'); +export const endDate = new Date('Sep 23 2024 00:00:00 GMT'); // DeveloperSurveyConfig is the set of global properties used to determine if // we should prompt a user to take the gopls survey. @@ -124,7 +124,7 @@ export function shouldPromptForSurvey(now: Date, cfg: DeveloperSurveyConfig): De export async function promptForDeveloperSurvey(cfg: DeveloperSurveyConfig, now: Date): Promise { const selected = await vscode.window.showInformationMessage( `Help shape Go’s future! Would you like to help ensure that Go is meeting your needs -by participating in this 10-minute Go Developer Survey (January 2024) before ${endDate.toDateString()}?`, +by participating in this 10-minute Go Developer Survey (September 2024) before ${endDate.toDateString()}?`, 'Yes', 'Remind me later', 'Never' @@ -139,7 +139,7 @@ by participating in this 10-minute Go Developer Survey (January 2024) before ${e { cfg.lastDateAccepted = now; cfg.prompt = true; - const surveyURL = 'https://google.qualtrics.com/jfe/form/SV_083SVAUCji98YeO?s=p'; + const surveyURL = 'https://google.qualtrics.com/jfe/form/SV_ei0CDV2K9qQIsp8?s=p'; await vscode.env.openExternal(vscode.Uri.parse(surveyURL)); } break; From 4c43bdf37188df89630014022706f4fa99373b1b Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 9 Sep 2024 09:35:24 -0400 Subject: [PATCH 187/189] [release-v0.42] extension/CHANGELOG.md: prepare for v0.42.1 For golang/vscode-go#3520 Change-Id: Id21e2c86732eee2982e360e3f0356cb0f4a19a3b Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/611835 kokoro-CI: kokoro Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Robert Findley (cherry picked from commit eb5a49742a37db5b53b62b0674e187b2ff24268c) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/612039 Reviewed-by: Hongxiang Jiang --- extension/CHANGELOG.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/extension/CHANGELOG.md b/extension/CHANGELOG.md index e3cd0f9338..cecdd47239 100644 --- a/extension/CHANGELOG.md +++ b/extension/CHANGELOG.md @@ -1,6 +1,20 @@ +## v0.42.1 - 9 Sep, 2024 + +A comprehensive list of changes can be found in the complete [commit history](https://github.com/golang/vscode-go/compare/v0.42.0..v0.42.1). + +### Changes + +* Prompt users for the [2024 Go Developer survey](https://google.qualtrics.com/jfe/form/SV_ei0CDV2K9qQIsp8?s=p). ([Issue 3517](https://github.com/golang/vscode-go/issues/3517)) +* Updated the default versions of `gomodifytags`, `impl`, `gofumpt`, and `revive`. ([CL 607757](https://go.dev/cl/607757)). +* Increased the Go telemetry prompt rate to 25%. The new Go blog post ["Telemetry in Go 1.23 and beyond"](https://go.dev/blog/gotelemetry) discusses how Go telemetry helps improving the reliability and the performance of go toolchain programs. + +## v0.43.0 - 22 Aug, 2024 (pre-release) + +This is the [pre-release version](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#prerelease-extensions) of v0.44. The nightly (golang.go-nightly) extension will be deprecated in favor of the pre-release version. + ## v0.42.0 - 17 Jul, 2024 -A comprehensive list of changes can be found in the complete [commit history](https://github.com/golang/vscode-go/compare/v0.42.0...v0.41.4). +A comprehensive list of changes can be found in the complete [commit history](https://github.com/golang/vscode-go/compare/v0.41.4..v0.42.0). ### Updates in `gopls` From ed829bedfdada46b2608d43902ab8a23a20a986e Mon Sep 17 00:00:00 2001 From: "Hana (Hyang-Ah) Kim" Date: Mon, 9 Sep 2024 11:25:42 -0400 Subject: [PATCH 188/189] [release-v0.42] extension/package.json: prepare for v0.42.1 For golang/vscode-go#3520 Change-Id: I158e22239d7c857c4117ac04463eef32ed9d30a2 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/612040 kokoro-CI: kokoro Commit-Queue: Hyang-Ah Hana Kim Reviewed-by: Hongxiang Jiang --- extension/package-lock.json | 4 ++-- extension/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extension/package-lock.json b/extension/package-lock.json index db2c7b8a04..f219aa6fdb 100644 --- a/extension/package-lock.json +++ b/extension/package-lock.json @@ -1,12 +1,12 @@ { "name": "go", - "version": "0.42.0", + "version": "0.42.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "go", - "version": "0.42.0", + "version": "0.42.1", "license": "MIT", "dependencies": { "diff": "4.0.2", diff --git a/extension/package.json b/extension/package.json index eda3e53331..966ff82a59 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1,7 +1,7 @@ { "name": "go", "displayName": "Go", - "version": "0.42.0", + "version": "0.42.1", "publisher": "golang", "description": "Rich Go language support for Visual Studio Code", "author": { From c9395310bd204f02db863cd8d5de39f7eafe190d Mon Sep 17 00:00:00 2001 From: Hongxiang Jiang Date: Thu, 12 Sep 2024 20:23:07 +0000 Subject: [PATCH 189/189] [release-v0.42] extension/tools/release: skip version check in release process Both package creation and package publish will skip the version check. For golang/vscode-go#3500 Change-Id: I530f600bb983ac1e9e884bc6910bcd8f1b0717e0 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/612815 Commit-Queue: Hongxiang Jiang kokoro-CI: kokoro Auto-Submit: Hongxiang Jiang Reviewed-by: Hyang-Ah Hana Kim (cherry picked from commit 97292e324c7514a632891570213ba3e644f3d6f1) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/611845 --- extension/tools/release/release.go | 19 ++----------------- .../testdata/package-v0.0.0-rc.1.golden | 1 - .../release/testdata/package-v0.0.0.golden | 1 - .../testdata/publish-v0.0.0-rc.1.golden | 1 - .../release/testdata/publish-v0.0.0.golden | 1 - 5 files changed, 2 insertions(+), 21 deletions(-) diff --git a/extension/tools/release/release.go b/extension/tools/release/release.go index 4c12fd3e17..1d25b2c9b1 100644 --- a/extension/tools/release/release.go +++ b/extension/tools/release/release.go @@ -25,7 +25,6 @@ package main import ( - "bytes" "flag" "fmt" "os" @@ -46,7 +45,6 @@ func main() { cmd := flag.Arg(0) checkWD() - requireTools("jq", "npx", "gh", "git") requireEnvVars("TAG_NAME") tagName, version, isRC := releaseVersionInfo() @@ -54,8 +52,10 @@ func main() { switch cmd { case "package": + requireTools("npx") buildPackage(version, tagName, vsix) case "publish": + requireTools("npx", "gh", "git") requireEnvVars("VSCE_PAT", "GITHUB_TOKEN") publish(tagName, vsix, isRC) default: @@ -129,21 +129,6 @@ func releaseVersionInfo() (tagName, version string, isPrerelease bool) { } isPrerelease = true } - - cmd := exec.Command("jq", "-r", ".version", "package.json") - cmd.Stderr = os.Stderr - var buf bytes.Buffer - cmd.Stdout = &buf - if err := commandRun(cmd); err != nil { - fatalf("failed to read package.json version") - } - versionInPackageJSON := buf.Bytes() - if *flagN { - return tagName, mmp + label, isPrerelease - } - if got := string(bytes.TrimSpace(versionInPackageJSON)); got != mmp { - fatalf("package.json version %q does not match TAG_NAME %q", got, tagName) - } return tagName, mmp + label, isPrerelease } diff --git a/extension/tools/release/testdata/package-v0.0.0-rc.1.golden b/extension/tools/release/testdata/package-v0.0.0-rc.1.golden index 961e14a201..cfe14c78dc 100644 --- a/extension/tools/release/testdata/package-v0.0.0-rc.1.golden +++ b/extension/tools/release/testdata/package-v0.0.0-rc.1.golden @@ -1,3 +1,2 @@ -jq -r .version package.json cp ../README.md README.md npx vsce package -o go-0.0.0-rc.1.vsix --baseContentUrl https://github.com/golang/vscode-go/raw/v0.0.0-rc.1 --baseImagesUrl https://github.com/golang/vscode-go/raw/v0.0.0-rc.1 --no-update-package-json --no-git-tag-version 0.0.0-rc.1 diff --git a/extension/tools/release/testdata/package-v0.0.0.golden b/extension/tools/release/testdata/package-v0.0.0.golden index cf81080556..87c6fdf724 100644 --- a/extension/tools/release/testdata/package-v0.0.0.golden +++ b/extension/tools/release/testdata/package-v0.0.0.golden @@ -1,3 +1,2 @@ -jq -r .version package.json cp ../README.md README.md npx vsce package -o go-0.0.0.vsix --baseContentUrl https://github.com/golang/vscode-go/raw/v0.0.0 --baseImagesUrl https://github.com/golang/vscode-go/raw/v0.0.0 --no-update-package-json --no-git-tag-version 0.0.0 diff --git a/extension/tools/release/testdata/publish-v0.0.0-rc.1.golden b/extension/tools/release/testdata/publish-v0.0.0-rc.1.golden index 874492d9a8..c190fb452e 100644 --- a/extension/tools/release/testdata/publish-v0.0.0-rc.1.golden +++ b/extension/tools/release/testdata/publish-v0.0.0-rc.1.golden @@ -1,4 +1,3 @@ -jq -r .version package.json stat go-0.0.0-rc.1.vsix release create --generate-notes --target 4893cd984d190bdf2cd65e11c425b42819ae6f57 --title Release v0.0.0-rc.1 --draft gh release create --generate-notes --target 4893cd984d190bdf2cd65e11c425b42819ae6f57 --title Release v0.0.0-rc.1 --draft --prerelease -R github.com/golang/vscode-go v0.0.0-rc.1 go-0.0.0-rc.1.vsix diff --git a/extension/tools/release/testdata/publish-v0.0.0.golden b/extension/tools/release/testdata/publish-v0.0.0.golden index 606dc22c50..81de0dd206 100644 --- a/extension/tools/release/testdata/publish-v0.0.0.golden +++ b/extension/tools/release/testdata/publish-v0.0.0.golden @@ -1,4 +1,3 @@ -jq -r .version package.json stat go-0.0.0.vsix release create --generate-notes --target 4893cd984d190bdf2cd65e11c425b42819ae6f57 --title Release v0.0.0 --draft gh release create --generate-notes --target 4893cd984d190bdf2cd65e11c425b42819ae6f57 --title Release v0.0.0 --draft -R github.com/golang/vscode-go v0.0.0 go-0.0.0.vsix