Skip to content

Commit df0e6e9

Browse files
committed
Merge branch 'main' into jabaile/symbol-tweaks
2 parents 216dff4 + 52db494 commit df0e6e9

File tree

2,910 files changed

+74312
-50256
lines changed

Some content is hidden

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

2,910 files changed

+74312
-50256
lines changed

.dprint.jsonc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"cwd": "${configDir}",
4242
"cacheKey": "4",
4343
"commands": [
44-
{ "command": "gofumpt -lang=go1.24", "exts": ["go"] }
44+
{ "command": "go tool mvdan.cc/gofumpt -lang=go1.24", "exts": ["go"] }
4545
]
4646
},
4747
"excludes": [
@@ -53,13 +53,15 @@
5353
"**/*_generated.go",
5454
"internal/bundled/libs/**",
5555
"internal/lsp/lsproto/_generate/*.json",
56-
"internal/lsp/lsproto/_generate/metaModelSchema.mts"
56+
"internal/lsp/lsproto/_generate/metaModelSchema.mts",
57+
// Needs to be LF to have a working shebang.
58+
"_packages/native-preview/bin/tsgo.js"
5759
],
5860
// Note: if adding new languages, make sure settings.template.json is updated too.
5961
// Also, if updating typescript, update the one in package.json.
6062
"plugins": [
61-
"https://plugins.dprint.dev/typescript-0.93.3.wasm",
62-
"https://plugins.dprint.dev/json-0.19.4.wasm",
63+
"https://plugins.dprint.dev/typescript-0.94.0.wasm",
64+
"https://plugins.dprint.dev/json-0.20.0.wasm",
6365
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm",
6466
"https://plugins.dprint.dev/exec-0.5.1.json@492414e39dea4dccc07b4af796d2f4efdb89e84bae2bd4e1e924c0cc050855bf"
6567
]

.github/ls-screenshot.png

66 KB
Loading

.github/workflows/ci.yml

Lines changed: 71 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
pull_request:
88
branches:
99
- main
10+
merge_group:
11+
branches:
12+
- main
1013

1114
permissions:
1215
contents: read
@@ -22,7 +25,8 @@ jobs:
2225
runs-on: ubuntu-latest
2326
steps:
2427
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
28+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
29+
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
2630
- uses: ./.github/actions/setup-go
2731
with:
2832
cache-name: build
@@ -35,7 +39,8 @@ jobs:
3539
runs-on: ubuntu-latest
3640
steps:
3741
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
42+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
43+
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
3944

4045
- run: npm ci
4146

@@ -45,51 +50,58 @@ jobs:
4550
strategy:
4651
fail-fast: false
4752
matrix:
48-
include:
53+
config:
4954
- os: ubuntu-latest
5055
coverage: true
5156
- os: windows-latest
5257
coverage: true
58+
skip: ${{ github.event_name == 'merge_group' }}
5359
- os: macos-latest
5460
coverage: true
61+
skip: ${{ github.event_name == 'merge_group' }}
5562
- os: ubuntu-latest
5663
name: 'no submodules'
5764
no-submodules: true
5865
- os: ['self-hosted', '1ES.Pool=TypeScript-1ES-GitHub-XL', '1ES.ImageOverride=mariner-2.0']
5966
name: 'race mode'
6067
race: true
68+
skip: ${{ github.event_name == 'merge_group' }}
6169
- os: ubuntu-latest
6270
name: 'noembed'
6371
noembed: true
6472
- os: ubuntu-latest
6573
name: 'concurrent test programs'
6674
concurrent-test-programs: true
6775
coverage: true
76+
exclude:
77+
- config:
78+
skip: true
6879

69-
name: test (${{ matrix.name || matrix.os }})
80+
name: test (${{ matrix.config.name || matrix.config.os }})
7081

71-
runs-on: ${{ matrix.os }}
82+
runs-on: ${{ matrix.config.os }}
7283

7384
permissions:
7485
id-token: write
7586
contents: read
7687

7788
env:
78-
TSGO_HEREBY_RACE: ${{ (matrix.race && 'true') || 'false' }}
79-
TSGO_HEREBY_NOEMBED: ${{ (matrix.noembed && 'true') || 'false' }}
80-
TSGO_HEREBY_CONCURRENT_TEST_PROGRAMS: ${{ (matrix.concurrent-test-programs && 'true') || 'false' }}
81-
TSGO_HEREBY_COVERAGE: ${{ (matrix.coverage && 'true') || 'false' }}
89+
TSGO_HEREBY_RACE: ${{ (matrix.config.race && 'true') || 'false' }}
90+
TSGO_HEREBY_NOEMBED: ${{ (matrix.config.noembed && 'true') || 'false' }}
91+
TSGO_HEREBY_CONCURRENT_TEST_PROGRAMS: ${{ (matrix.config.concurrent-test-programs && 'true') || 'false' }}
92+
TSGO_HEREBY_COVERAGE: ${{ (matrix.config.coverage && 'true') || 'false' }}
8293

8394
steps:
8495
- run: git config --system core.longpaths true
85-
if: ${{ matrix.os == 'windows-latest' }}
96+
if: ${{ matrix.config.os == 'windows-latest' }}
8697

8798
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8899
with:
89-
submodules: ${{ !matrix.no-submodules }}
90-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
100+
submodules: ${{ !matrix.config.no-submodules }}
101+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
91102
with:
92103
node-version: 'lts/*'
104+
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
93105
- uses: ./.github/actions/setup-go
94106
with:
95107
cache-name: test
@@ -99,19 +111,28 @@ jobs:
99111
- run: go install gotest.tools/gotestsum@latest
100112
# Installing gotestsum is super slow on Windows.
101113
# Also, avoid using it in race mode so we get the full output.
102-
if: ${{ matrix.os != 'windows-latest' && !matrix.race }}
114+
if: ${{ matrix.config.os != 'windows-latest' && !matrix.config.race }}
103115

104116
- name: Tests
105117
id: test
106-
run: npx hereby test:all
118+
run: npx hereby test
119+
120+
- name: Benchmarks
121+
run: npx hereby test:benchmarks
122+
123+
- name: Tools Tests
124+
run: npx hereby test:tools
125+
126+
- name: API Tests
127+
run: npx hereby test:api
107128

108129
- run: git add .
109130

110-
- uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
111-
if: ${{ always() && matrix.coverage }}
131+
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
132+
if: ${{ always() && matrix.config.coverage && github.event_name != 'merge_group' }}
112133
with:
113-
use_oidc: true
114-
name: ${{ matrix.name || matrix.os }}
134+
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
135+
name: ${{ matrix.config.name || matrix.config.os }}
115136
directory: ./coverage
116137

117138
- run: git diff --staged --exit-code --stat
@@ -125,34 +146,41 @@ jobs:
125146
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
126147
if: ${{ failure() && steps.test.conclusion == 'failure' }}
127148
with:
128-
name: ${{ matrix.os }}-${{ (matrix.race && 'race') || 'norace' }}-new-baselines-artifact
149+
name: ${{ matrix.config.os }}-${{ (matrix.config.race && 'race') || 'norace' }}-new-baselines-artifact
129150
path: testdata/baselines/local
130151

131152
lint:
132153
strategy:
133154
fail-fast: false
134155
matrix:
135-
include:
156+
config:
136157
- os: ubuntu-latest
137158
- os: windows-latest
159+
skip: ${{ github.event_name == 'merge_group' }}
138160
- os: macos-latest
161+
skip: ${{ github.event_name == 'merge_group' }}
139162
- os: ubuntu-latest
140163
name: 'noembed'
141164
noembed: true
165+
skip: ${{ github.event_name == 'merge_group' }}
166+
exclude:
167+
- config:
168+
skip: true
142169

143-
name: lint (${{ matrix.name || matrix.os }})
170+
name: lint (${{ matrix.config.name || matrix.config.os }})
144171

145-
runs-on: ${{ matrix.os }}
172+
runs-on: ${{ matrix.config.os }}
146173

147174
env:
148-
TSGO_HEREBY_NOEMBED: ${{ (matrix.noembed && 'true') || 'false' }}
175+
TSGO_HEREBY_NOEMBED: ${{ (matrix.config.noembed && 'true') || 'false' }}
149176

150177
steps:
151178
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
152-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
179+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
180+
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
153181
- uses: ./.github/actions/setup-go
154182
with:
155-
cache-name: lint${{ (matrix.noembed && '-noembed') || ''}}
183+
cache-name: lint${{ (matrix.config.noembed && '-noembed') || ''}}
156184

157185
- run: npm ci
158186

@@ -162,14 +190,14 @@ jobs:
162190
runs-on: ubuntu-latest
163191
steps:
164192
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
165-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
193+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
194+
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
166195
- uses: ./.github/actions/setup-go
167196
with:
168197
cache-name: format
169198

170199
- run: npm ci
171200

172-
- run: npx hereby install-tools
173201
- run: npx hereby check:format
174202

175203
generate:
@@ -178,7 +206,8 @@ jobs:
178206
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
179207
with:
180208
submodules: true
181-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
209+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
210+
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
182211
- uses: ./.github/actions/setup-go
183212
with:
184213
cache-name: generate
@@ -187,6 +216,9 @@ jobs:
187216

188217
- run: npx hereby generate
189218

219+
- run: node ./internal/lsp/lsproto/_generate/fetchModel.mjs
220+
- run: node ./internal/lsp/lsproto/_generate/generate.mjs
221+
190222
- run: git add .
191223
- run: git diff --staged --exit-code --stat
192224

@@ -207,7 +239,8 @@ jobs:
207239
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
208240
with:
209241
submodules: true
210-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
242+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
243+
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
211244
- uses: ./.github/actions/setup-go
212245
with:
213246
cache-name: smoke
@@ -238,7 +271,8 @@ jobs:
238271
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
239272
with:
240273
submodules: true
241-
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
274+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
275+
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # stable
242276
- uses: ./.github/actions/setup-go
243277
with:
244278
cache-name: baselines
@@ -288,17 +322,20 @@ jobs:
288322
runs-on: ubuntu-latest
289323
if: ${{ always() }}
290324
needs:
325+
- baselines
291326
- build
292-
- test
293-
- lint
327+
- extension
294328
- format
295329
- generate
296-
- tidy
330+
- lint
331+
- misc
297332
- smoke
333+
- test
334+
- tidy
298335

299336
steps:
300337
- name: Check required jobs
301338
env:
302339
NEEDS: ${{ toJson(needs) }}
303340
run: |
304-
! echo $NEEDS | jq -e 'to_entries[] | { job: .key, result: .value.result } | select(.result != "success")'
341+
! echo $NEEDS | jq -e 'to_entries[] | { job: .key, result: .value.result } | select((.result == "success" or .result == "skipped") | not)'

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848

4949
# Initializes the CodeQL tools for scanning.
5050
- name: Initialize CodeQL
51-
uses: github/codeql-action/init@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14
51+
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
5252
with:
5353
config-file: ./.github/codeql/codeql-configuration.yml
5454
# Override language selection by uncommenting this and choosing your languages
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below).
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14
61+
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -72,4 +72,4 @@ jobs:
7272
# make release
7373

7474
- name: Perform CodeQL Analysis
75-
uses: github/codeql-action/analyze@fc7e4a0fa01c3cca5fd6a1fddec5c0740c977aa2 # v3.28.14
75+
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18

.github/workflows/merge-queue.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,5 @@ custom-gcl.hash
194194
.idea
195195

196196
!testdata/submoduleAccepted.txt
197+
198+
!NOTICE.txt

.vscode/launch.template.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@
2828
"-test.run",
2929
"TestSubmodule/${fileBasename}"
3030
]
31+
},
32+
{
33+
"name": "Launch submodule test (with profiling)",
34+
"type": "go",
35+
"request": "launch",
36+
"mode": "test",
37+
"program": "${workspaceFolder}/internal/testrunner",
38+
"args": [
39+
"-test.cpuprofile",
40+
"${workspaceFolder}/test.prof",
41+
"-test.run",
42+
"TestSubmodule/${fileBasename}"
43+
]
3144
}
3245
]
3346
}

0 commit comments

Comments
 (0)