Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions complex_scenarios_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ func TestDiagnostics(t *testing.T) {
Severity: lsp.SeverityError,
Code: "unused",
Source: "go",
Message: "variable 'x' is unused",
Message: lsp.Or_Diagnostic_message{
Value: "variable 'x' is unused",
},
RelatedInformation: []lsp.DiagnosticRelatedInformation{
{
Location: lsp.Location{
Expand All @@ -109,8 +111,10 @@ func TestDiagnostics(t *testing.T) {
Severity: lsp.SeverityWarning,
Code: "deprecated",
Source: "go",
Message: "function is deprecated",
Tags: []lsp.DiagnosticTag{lsp.Deprecated},
Message: lsp.Or_Diagnostic_message{
Value: "function is deprecated",
},
Tags: []lsp.DiagnosticTag{lsp.Deprecated},
},
},
}
Expand Down Expand Up @@ -200,7 +204,9 @@ func TestCodeAction(t *testing.T) {
},
Severity: lsp.SeverityError,
Code: "unused",
Message: "unused variable",
Message: lsp.Or_Diagnostic_message{
Value: "unused variable",
},
},
},
Only: []lsp.CodeActionKind{lsp.QuickFix},
Expand Down
11 changes: 8 additions & 3 deletions generate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ const vscodeRepo = "https://github.com/microsoft/vscode-languageserver-node"

// lspGitRef names a branch or tag in vscodeRepo.
// It implicitly determines the protocol version of the LSP used by gopls.
// For example, tag release/protocol/3.17.3 of the repo defines
// protocol version 3.17.0 (as declared by the metaData.version field).
// For example, tag release/protocol/3.18.1 of the repo defines
// protocol version 3.18.0 (as declared by the metaData.version field).
// (Point releases are reflected in the git tag version even when they are cosmetic
// and don't change the protocol.)
var lspGitRef = "release/protocol/3.17.6-next.16"
// TODO: Remove the hard-coded version in processinline() when the next release tag is created.
var lspGitRef = "release/protocol/3.18.1"

var (
repodir = flag.String("d", "", "directory containing clone of "+vscodeRepo)
Expand Down Expand Up @@ -71,6 +72,10 @@ func processinline() {
}

model := parse(filepath.Join(*repodir, "protocol/metaModel.json"))
// The release tag is 3.18.1, but the metaModel.json file declares version 3.17.0.
// This was fixed in a later commit, but there is no release tag for that commit.
// We need to hard-code this version until the next release tag is created.
model.Version.Version = "3.18.0"

findTypeNames(model)
generateOutput(model)
Expand Down
48 changes: 24 additions & 24 deletions tsclient.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 63 additions & 3 deletions tsjson.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading