Skip to content

Commit 3003264

Browse files
committed
Merge branch 'main' into jabaile/symbol-baseline-fixes-but-always-host
2 parents 2122679 + 8cf32b4 commit 3003264

File tree

1,372 files changed

+86003
-8671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,372 files changed

+86003
-8671
lines changed

.custom-gcl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/custom-gcl.jsonschema.json
22

3-
version: v2.4.0
3+
version: v2.5.0
44

55
destination: ./_tools
66

NOTICE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
221221

222222
---------------------------------------------------------
223223

224-
github.com/go-json-experiment/json v0.0.0-20250813233538-9b1f9ea2e11b - BSD-3-Clause
224+
github.com/go-json-experiment/json v0.0.0-20250910080747-cc2cfa0554c3 - BSD-3-Clause
225225

226226

227227
Copyright 2010 The Go Authors

_extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
},
107107
"devDependencies": {
108108
"@types/vscode": "^1.100.0",
109-
"@vscode/vsce": "^3.6.0",
110-
"esbuild": "^0.25.8"
109+
"@vscode/vsce": "^3.6.2",
110+
"esbuild": "^0.25.10"
111111
}
112112
}

_submodules/TypeScript

Submodule TypeScript updated 1509 files

_tools/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ go 1.25
55
require (
66
github.com/golangci/plugin-module-register v0.1.2
77
golang.org/x/mod v0.28.0
8-
golang.org/x/tools v0.36.0
8+
golang.org/x/tools v0.37.0
99
gotest.tools/v3 v3.5.2
1010
)
1111

1212
require (
1313
github.com/google/go-cmp v0.6.0 // indirect
14-
golang.org/x/sync v0.16.0 // indirect
14+
golang.org/x/sync v0.17.0 // indirect
1515
)

_tools/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
44
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
55
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
66
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
7-
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
8-
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
9-
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
10-
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
7+
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
8+
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
9+
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
10+
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
1111
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
1212
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.25
44

55
require (
66
github.com/dlclark/regexp2 v1.11.5
7-
github.com/go-json-experiment/json v0.0.0-20250813233538-9b1f9ea2e11b
7+
github.com/go-json-experiment/json v0.0.0-20250910080747-cc2cfa0554c3
88
github.com/google/go-cmp v0.7.0
99
github.com/peter-evans/patience v0.3.0
1010
github.com/zeebo/xxh3 v1.0.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
22
github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
3-
github.com/go-json-experiment/json v0.0.0-20250813233538-9b1f9ea2e11b h1:6Q4zRHXS/YLOl9Ng1b1OOOBWMidAQZR3Gel0UKPC/KU=
4-
github.com/go-json-experiment/json v0.0.0-20250813233538-9b1f9ea2e11b/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M=
3+
github.com/go-json-experiment/json v0.0.0-20250910080747-cc2cfa0554c3 h1:02WINGfSX5w0Mn+F28UyRoSt9uvMhKguwWMlOAh6U/0=
4+
github.com/go-json-experiment/json v0.0.0-20250910080747-cc2cfa0554c3/go.mod h1:uNVvRXArCGbZ508SxYYTC5v1JWoz2voff5pm25jU1Ok=
55
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
66
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
77
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=

internal/api/api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func (api *API) GetSymbolAtPosition(ctx context.Context, projectId Handle[projec
160160
return nil, errors.New("project not found")
161161
}
162162

163-
languageService := ls.NewLanguageService(project, snapshot.Converters())
163+
languageService := ls.NewLanguageService(project.GetProgram(), snapshot)
164164
symbol, err := languageService.GetSymbolAtPosition(ctx, fileName, position)
165165
if err != nil || symbol == nil {
166166
return nil, err
@@ -202,7 +202,7 @@ func (api *API) GetSymbolAtLocation(ctx context.Context, projectId Handle[projec
202202
if node == nil {
203203
return nil, fmt.Errorf("node of kind %s not found at position %d in file %q", kind.String(), pos, sourceFile.FileName())
204204
}
205-
languageService := ls.NewLanguageService(project, snapshot.Converters())
205+
languageService := ls.NewLanguageService(project.GetProgram(), snapshot)
206206
symbol := languageService.GetSymbolAtLocation(ctx, node)
207207
if symbol == nil {
208208
return nil, nil
@@ -232,7 +232,7 @@ func (api *API) GetTypeOfSymbol(ctx context.Context, projectId Handle[project.Pr
232232
if !ok {
233233
return nil, fmt.Errorf("symbol %q not found", symbolHandle)
234234
}
235-
languageService := ls.NewLanguageService(project, snapshot.Converters())
235+
languageService := ls.NewLanguageService(project.GetProgram(), snapshot)
236236
t := languageService.GetTypeOfSymbol(ctx, symbol)
237237
if t == nil {
238238
return nil, nil

internal/binder/binder.go

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,9 @@ func (b *Binder) declareSymbolAndAddToSymbolTable(node *ast.Node, symbolFlags as
443443
return b.declareClassMember(node, symbolFlags, symbolExcludes)
444444
case ast.KindEnumDeclaration:
445445
return b.declareSymbol(ast.GetExports(b.container.Symbol()), b.container.Symbol(), node, symbolFlags, symbolExcludes)
446-
case ast.KindTypeLiteral, ast.KindJSDocTypeLiteral, ast.KindObjectLiteralExpression, ast.KindInterfaceDeclaration, ast.KindJsxAttributes:
446+
case ast.KindTypeLiteral, ast.KindObjectLiteralExpression, ast.KindInterfaceDeclaration, ast.KindJsxAttributes:
447447
return b.declareSymbol(ast.GetMembers(b.container.Symbol()), b.container.Symbol(), node, symbolFlags, symbolExcludes)
448-
case ast.KindFunctionType, ast.KindConstructorType, ast.KindCallSignature, ast.KindConstructSignature, ast.KindJSDocSignature,
448+
case ast.KindFunctionType, ast.KindConstructorType, ast.KindCallSignature, ast.KindConstructSignature,
449449
ast.KindIndexSignature, ast.KindMethodDeclaration, ast.KindMethodSignature, ast.KindConstructor, ast.KindGetAccessor,
450450
ast.KindSetAccessor, ast.KindFunctionDeclaration, ast.KindFunctionExpression, ast.KindArrowFunction,
451451
ast.KindClassStaticBlockDeclaration, ast.KindTypeAliasDeclaration, ast.KindJSTypeAliasDeclaration, ast.KindMappedType:
@@ -672,10 +672,8 @@ func (b *Binder) bind(node *ast.Node) bool {
672672
case ast.KindSetAccessor:
673673
b.bindPropertyOrMethodOrAccessor(node, ast.SymbolFlagsSetAccessor, ast.SymbolFlagsSetAccessorExcludes)
674674
case ast.KindFunctionType, ast.KindConstructorType:
675-
// !!! KindJSDocSignature
676675
b.bindFunctionOrConstructorType(node)
677676
case ast.KindTypeLiteral, ast.KindMappedType:
678-
// !!! KindJSDocTypeLiteral
679677
b.bindAnonymousDeclaration(node, ast.SymbolFlagsTypeLiteral, ast.InternalSymbolNameType)
680678
case ast.KindObjectLiteralExpression:
681679
b.bindAnonymousDeclaration(node, ast.SymbolFlagsObjectLiteral, ast.InternalSymbolNameObject)
@@ -1121,10 +1119,6 @@ func (b *Binder) bindVariableDeclarationOrBindingElement(node *ast.Node) {
11211119
}
11221120

11231121
func (b *Binder) bindParameter(node *ast.Node) {
1124-
// !!!
1125-
// if node.kind == KindJSDocParameterTag && b.container.kind != KindJSDocSignature {
1126-
// return
1127-
// }
11281122
decl := node.AsParameterDeclaration()
11291123
if b.inStrictMode && node.Flags&ast.NodeFlagsAmbient == 0 {
11301124
// It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a
@@ -1190,17 +1184,6 @@ func (b *Binder) bindBlockScopedDeclaration(node *ast.Node, symbolFlags ast.Symb
11901184
}
11911185

11921186
func (b *Binder) bindTypeParameter(node *ast.Node) {
1193-
// !!!
1194-
// if isJSDocTemplateTag(node.parent) {
1195-
// var container *HasLocals = getEffectiveContainerForJSDocTemplateTag(node.parent)
1196-
// if container {
1197-
// Debug.assertNode(container, canHaveLocals)
1198-
// /* TODO(TS-TO-GO) QuestionQuestionEqualsToken BinaryExpression: container.locals ??= createSymbolTable() */ TODO
1199-
// b.declareSymbol(container.locals /*parent*/, nil, node, SymbolFlagsTypeParameter, SymbolFlagsTypeParameterExcludes)
1200-
// } else {
1201-
// b.declareSymbolAndAddToSymbolTable(node, SymbolFlagsTypeParameter, SymbolFlagsTypeParameterExcludes)
1202-
// }
1203-
// }
12041187
if node.Parent.Kind == ast.KindInferType {
12051188
container := b.getInferTypeContainer(node.Parent)
12061189
if container != nil {
@@ -1633,10 +1616,6 @@ func (b *Binder) bindChildren(node *ast.Node) {
16331616
b.bindCallExpressionFlow(node)
16341617
case ast.KindNonNullExpression:
16351618
b.bindNonNullExpressionFlow(node)
1636-
// case *JSDocTypedefTag, *JSDocCallbackTag, *JSDocEnumTag:
1637-
// b.bindJSDocTypeAlias(node)
1638-
// case *JSDocImportTag:
1639-
// b.bindJSDocImportTag(node)
16401619
case ast.KindSourceFile:
16411620
sourceFile := node.AsSourceFile()
16421621
b.bindEachStatementFunctionsFirst(sourceFile.Statements)
@@ -2565,7 +2544,7 @@ func SetValueDeclaration(symbol *ast.Symbol, node *ast.Node) {
25652544
func GetContainerFlags(node *ast.Node) ContainerFlags {
25662545
switch node.Kind {
25672546
case ast.KindClassExpression, ast.KindClassDeclaration, ast.KindEnumDeclaration, ast.KindObjectLiteralExpression, ast.KindTypeLiteral,
2568-
ast.KindJSDocTypeLiteral, ast.KindJsxAttributes:
2547+
ast.KindJsxAttributes:
25692548
return ContainerFlagsIsContainer
25702549
case ast.KindInterfaceDeclaration:
25712550
return ContainerFlagsIsContainer | ContainerFlagsIsInterface
@@ -2580,7 +2559,7 @@ func GetContainerFlags(node *ast.Node) ContainerFlags {
25802559
fallthrough
25812560
case ast.KindConstructor, ast.KindClassStaticBlockDeclaration:
25822561
return ContainerFlagsIsContainer | ContainerFlagsIsControlFlowContainer | ContainerFlagsHasLocals | ContainerFlagsIsFunctionLike | ContainerFlagsIsThisContainer
2583-
case ast.KindMethodSignature, ast.KindCallSignature, ast.KindJSDocSignature, ast.KindFunctionType, ast.KindConstructSignature, ast.KindConstructorType:
2562+
case ast.KindMethodSignature, ast.KindCallSignature, ast.KindFunctionType, ast.KindConstructSignature, ast.KindConstructorType:
25842563
return ContainerFlagsIsContainer | ContainerFlagsIsControlFlowContainer | ContainerFlagsHasLocals | ContainerFlagsIsFunctionLike
25852564
case ast.KindFunctionDeclaration:
25862565
return ContainerFlagsIsContainer | ContainerFlagsIsControlFlowContainer | ContainerFlagsHasLocals | ContainerFlagsIsFunctionLike | ContainerFlagsIsThisContainer
@@ -2617,9 +2596,6 @@ func isNarrowingExpression(expr *ast.Node) bool {
26172596
case ast.KindCallExpression:
26182597
return hasNarrowableArgument(expr)
26192598
case ast.KindParenthesizedExpression:
2620-
// if isJSDocTypeAssertion(expr) {
2621-
// return false
2622-
// }
26232599
return isNarrowingExpression(expr.AsParenthesizedExpression().Expression)
26242600
case ast.KindNonNullExpression:
26252601
return isNarrowingExpression(expr.AsNonNullExpression().Expression)

0 commit comments

Comments
 (0)