Skip to content

Commit ebcbd60

Browse files
authored
Merge pull request #564 from aviatesk/releases/2026-02-26
release: 2026-02-26
2 parents e141508 + c3ec9f7 commit ebcbd60

69 files changed

Lines changed: 2701 additions & 400 deletions

Some content is hidden

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

.JETLSConfig.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#:schema ./schemas/config-toml.schema.json
2+
13
# TODO [JETLS]
24
# Need to properly set and parse line number information for `@namespace`
35
[[diagnostic.patterns]]
@@ -15,6 +17,23 @@ match_type = "regex"
1517
severity = "off"
1618
path = "LSP/src/LSP.jl"
1719

20+
# TODO [JETLS]
21+
# `@interface` type instability for anonymous interface definitions
22+
[[diagnostic.patterns]]
23+
pattern = "no matching method found `.*var\"AnonymousInterface.*`"
24+
match_by = "message"
25+
match_type = "regex"
26+
severity = "off"
27+
path = "LSP/src/**/*.jl"
28+
29+
# This is type instability within JSON3.jl
30+
[[diagnostic.patterns]]
31+
pattern = "no matching method found `convert(.+)`"
32+
match_by = "message"
33+
match_type = "regex"
34+
severity = "off"
35+
path = "src/testrunner/testrunner-types.jl"
36+
1837
# TODO [JuliaLowering]
1938
# Temporarily downgrade some known JuliaLowering issues to information level
2039
[[diagnostic.patterns]]

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
vendor/** linguist-generated
2+
schemas/** linguist-generated

.github/workflows/JETLS.jl.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,23 @@ on:
88
- "src/**"
99
- "test/**"
1010
- "LSP/**"
11+
- "schemas/**"
12+
- "scripts/schema/**"
1113
- "Project.toml"
1214
- ".github/workflows/JETLS.jl.yml"
15+
- ".github/workflows/test-app.yml"
1316
pull_request:
1417
branches-ignore:
1518
- release
1619
paths:
1720
- "src/**"
1821
- "test/**"
1922
- "LSP/**"
23+
- "schemas/**"
24+
- "scripts/schema/**"
2025
- "Project.toml"
2126
- ".github/workflows/JETLS.jl.yml"
27+
- ".github/workflows/test-app.yml"
2228

2329
jobs:
2430
test:
@@ -141,35 +147,11 @@ jobs:
141147
env:
142148
JULIA_NUM_THREADS: "4,2"
143149

144-
test_jetls_serve:
145-
name: Test jetls serve
146-
runs-on: ubuntu-latest
147-
steps:
148-
- uses: actions/checkout@v4
149-
- uses: julia-actions/setup-julia@v1
150-
with:
151-
version: "1.12" # most stable version
152-
arch: x64
153-
- uses: julia-actions/cache@v2
154-
- uses: julia-actions/julia-buildpkg@latest
155-
- name: run test
156-
run: |
157-
julia --startup-file=no --project=./test ./test/app/test_jetls_serve.jl
150+
test_app:
151+
uses: ./.github/workflows/test-app.yml
158152

159-
test_jetls_check:
160-
name: Test jetls check
161-
runs-on: ubuntu-latest
162-
steps:
163-
- uses: actions/checkout@v4
164-
- uses: julia-actions/setup-julia@v1
165-
with:
166-
version: "1.12" # most stable version
167-
arch: x64
168-
- uses: julia-actions/cache@v2
169-
- uses: julia-actions/julia-buildpkg@latest
170-
- name: run test
171-
run: |
172-
julia --startup-file=no --project=./test ./test/app/test_jetls_check.jl
153+
check_schemas:
154+
uses: ./.github/workflows/check-schemas.yml
173155

174156
jetls_self_check:
175157
name: Self diagnostics
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Check schemas
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
check_schemas:
8+
name: Check schemas are up to date
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: julia-actions/setup-julia@v1
13+
with:
14+
version: "1.12"
15+
arch: x64
16+
- uses: julia-actions/cache@v2
17+
- name: Instantiate schema project
18+
run: julia --startup-file=no --project=scripts/schema -e 'using Pkg; Pkg.instantiate()'
19+
- name: Check schemas
20+
run: ./scripts/schema/regenerate.sh --check

.github/workflows/jetls-client.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ on:
66
- master
77
paths:
88
- "jetls-client/**"
9+
- "src/**"
10+
- "scripts/schema/**"
911
- ".github/workflows/jetls-client.yml"
1012
pull_request:
1113
branches-ignore:
1214
- release
1315
paths:
1416
- "jetls-client/**"
17+
- "src/**"
18+
- "scripts/schema/**"
1519
- ".github/workflows/jetls-client.yml"
1620

1721
jobs:
@@ -29,3 +33,19 @@ jobs:
2933
- name: Run checks
3034
working-directory: jetls-client
3135
run: npm run check
36+
37+
check_package_json:
38+
name: Check package.json is up to date
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: julia-actions/setup-julia@v2
43+
with:
44+
version: "1.12"
45+
arch: x64
46+
- uses: julia-actions/cache@v2
47+
- name: Instantiate schema project
48+
run: julia --startup-file=no --project=scripts/schema -e 'using Pkg; Pkg.instantiate()'
49+
- name: Check package.json is up to date
50+
run: |
51+
julia --startup-file=no --project=scripts/schema scripts/schema/update-pkg-json.jl jetls-client/package.json --check

.github/workflows/release.yml

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,13 @@ jobs:
2929
- uses: julia-actions/julia-buildpkg@latest
3030
- uses: julia-actions/julia-runtest@latest
3131

32-
test_jetls_serve:
33-
name: Test jetls serve with release environment
32+
test_app:
3433
if: github.event_name == 'pull_request' && github.event.action != 'closed'
35-
runs-on: ubuntu-latest
36-
steps:
37-
- uses: actions/checkout@v4
38-
- uses: julia-actions/setup-julia@v1
39-
with:
40-
version: "1.12"
41-
arch: x64
42-
- uses: julia-actions/julia-buildpkg@latest
43-
- name: run test
44-
run: |
45-
julia --startup-file=no --project=./test ./test/app/test_jetls_serve.jl
34+
uses: ./.github/workflows/test-app.yml
4635

47-
test_jetls_check:
48-
name: Test jetls check with release environment
36+
check_schemas:
4937
if: github.event_name == 'pull_request' && github.event.action != 'closed'
50-
runs-on: ubuntu-latest
51-
steps:
52-
- uses: actions/checkout@v4
53-
- uses: julia-actions/setup-julia@v1
54-
with:
55-
version: "1.12"
56-
arch: x64
57-
- uses: julia-actions/julia-buildpkg@latest
58-
- name: run test
59-
run: |
60-
julia --startup-file=no --project=./test ./test/app/test_jetls_check.jl
38+
uses: ./.github/workflows/check-schemas.yml
6139

6240
docs:
6341
name: Documentation
@@ -163,7 +141,10 @@ jobs:
163141
gh release create "$VERSION" \
164142
--target release \
165143
--title "$VERSION" \
166-
--notes "$RELEASE_NOTES"
144+
--notes "$RELEASE_NOTES" \
145+
schemas/config-toml.schema.json \
146+
schemas/settings.schema.json \
147+
schemas/init-options.schema.json
167148
168149
- name: Strip Announcement from previous release
169150
env:

.github/workflows/test-app.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test app commands
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
test_jetls_serve:
8+
name: Test jetls serve
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: julia-actions/setup-julia@v1
13+
with:
14+
version: "1.12" # most stable version
15+
arch: x64
16+
- uses: julia-actions/cache@v2
17+
- uses: julia-actions/julia-buildpkg@latest
18+
- name: run test
19+
run: |
20+
julia --startup-file=no --project=./test ./test/app/test_jetls_serve.jl
21+
22+
test_jetls_check:
23+
name: Test jetls check
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: julia-actions/setup-julia@v1
28+
with:
29+
version: "1.12" # most stable version
30+
arch: x64
31+
- uses: julia-actions/cache@v2
32+
- uses: julia-actions/julia-buildpkg@latest
33+
- name: run test
34+
run: |
35+
julia --startup-file=no --project=./test ./test/app/test_jetls_check.jl
36+
37+
test_jetls_schema:
38+
name: Test jetls schema
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: julia-actions/setup-julia@v1
43+
with:
44+
version: "1.12" # most stable version
45+
arch: x64
46+
- uses: julia-actions/cache@v2
47+
- uses: julia-actions/julia-buildpkg@latest
48+
- name: run test
49+
run: |
50+
julia --startup-file=no --project=./test ./test/app/test_jetls_schema.jl

AGENTS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
behavior. However, even in these cases, if the function name and behavior are
6464
self-explanatory, no special docstring is needed.
6565

66+
- When modifying config structs in `src/types.jl`, follow the schema
67+
regeneration procedure in [DEVELOPMENT.md](./DEVELOPMENT.md#configuration-schema).
68+
6669
- Avoid unnecessary logs:
6770
Don't clutter the language server log with excessive information.
6871
If you must use print debugging, generally use `@info`/`@warn` behind the
@@ -185,7 +188,6 @@ end # module test_completions
185188
```
186189

187190
## Using TestRunner.jl
188-
189191
Additionally, by using `@testset` as shown above, not only are tests hierarchized,
190192
but through integration with [TestRunner.jl](https://github.com/aviatesk/TestRunner.jl),
191193
you can also selectively execute specific `@testset`s, without executing the

CHANGELOG.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1919
## Unreleased
2020
2121
- Commit: [`HEAD`](https://github.com/aviatesk/JETLS.jl/commit/HEAD)
22-
- Diff: [`150f880...HEAD`](https://github.com/aviatesk/JETLS.jl/compare/150f880...HEAD)
22+
- Diff: [`e141508...HEAD`](https://github.com/aviatesk/JETLS.jl/compare/e141508...HEAD)
2323
2424
### Announcement
2525
@@ -47,6 +47,51 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4747
4848
### Added
4949
50+
- Added `jetls schema` CLI command that prints the JSON Schema for JETLS
51+
configuration. Supports `--settings`, `--init-options`, and
52+
`--config-toml` options.
53+
- Added schema generation infrastructure under `scripts/schema/` and
54+
committed generated schema files under `schemas/`. CI now checks that
55+
the schema files and `jetls-client/package.json` stay in sync with
56+
`src/types.jl`.
57+
58+
- Added [`inference/method-error`](https://aviatesk.github.io/JETLS.jl/release/diagnostic/#diagnostic/inference/method-error)
59+
diagnostic that detects function calls where no matching method exists for
60+
the inferred argument types. This catches potential `MethodError`s that would
61+
occur at runtime. For union-split calls, the diagnostic reports only the
62+
failing branches with their count (e.g., "1/2 union split").
63+
64+
### Changed
65+
66+
- `textDocument/documentSymbol` now shows `for`, `let`, `while`, and
67+
`try`/`catch`/`else`/`finally` blocks inside functions as hierarchical
68+
`Namespace` symbols. Previously, all local bindings within a function were
69+
shown as flat children; now, bindings inside scope constructs are nested
70+
under the scope construct, matching the existing behavior for top-level
71+
scope constructs.
72+
73+
- `textDocument/documentSymbol` now strips redundant name prefixes from
74+
symbol details. (e.g., a symbol named `foo` with detail `foo = func(args...)`
75+
now shows ` = func(args...)` as the detail.
76+
77+
### Fixed
78+
79+
- Fixed `textDocument/rename` for macro bindings.
80+
81+
- Fixed bindings in `let`/`for`/`while` blocks inside nested functions
82+
not appearing as children of those functions in the document outline.
83+
84+
## 2026-02-16
85+
86+
- Commit: [`e141508`](https://github.com/aviatesk/JETLS.jl/commit/e141508)
87+
- Diff: [`150f880...e141508`](https://github.com/aviatesk/JETLS.jl/compare/150f880...e141508)
88+
- Installation:
89+
```bash
90+
julia -e 'using Pkg; Pkg.Apps.add(; url="https://github.com/aviatesk/JETLS.jl", rev="2026-02-16")'
91+
```
92+
93+
### Added
94+
5095
- Anonymous function assignments (`f = (x) -> x + 1` and
5196
`clos = function (y) ... end`) are now analyzed as `Function` symbols
5297
for `textDocument/documentSymbol`, with their arguments as children.

DEVELOPMENT.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ which has been organized to be easily recognized by AI agents.
1111
During development, you can run JETLS directly from your local checkout using
1212
Julia's `-m` (module run) flag:
1313
```bash
14-
julia --startup-file=no --project=/path/to/JETLS -m JETLS
14+
julia --startup-file=no --project=/path/to/JETLS -m JETLS serve
1515
```
1616

1717
This is useful for testing changes without installing the `jetls` executable.
@@ -314,6 +314,30 @@ Use `--top=N` to control how many entries to show (default: 50).
314314
- The snapshot process itself requires additional memory, so for very large
315315
processes, ensure sufficient memory is available
316316

317+
## Configuration schema
318+
319+
The configuration schema is generated from the config structs
320+
in `src/types.jl` by two scripts under `scripts/schema/`:
321+
322+
- `generate.jl` generates standalone schema files under `schemas/`:
323+
- `config-toml.schema.json` (complete schema for `.JETLSConfig.toml`)
324+
- `settings.schema.json` (settings only)
325+
- `init-options.schema.json` (initialization options only)
326+
- `update-pkg-json.jl` updates VSCode configuration properties inside
327+
`jetls-client/package.json` (with `$defs` inlined and `description`
328+
renamed to `markdownDescription`).
329+
330+
When you modify the config structs, update `schemas/description.toml`
331+
with descriptions for any new or changed fields, then regenerate all
332+
schemas by running:
333+
```bash
334+
./scripts/schema/regenerate.sh
335+
```
336+
337+
Both scripts support a `--check` flag that exits with an error
338+
if the output is out of date. CI runs them in this mode to
339+
ensure the generated files are kept in sync.
340+
317341
## Release process
318342

319343
JETLS avoids dependency conflicts with packages being analyzed by rewriting the
@@ -476,7 +500,8 @@ To use a local JETLS.jl checkout with the development extension (see
476500
"--history-file=no",
477501
"--project=/path/to/JETLS",
478502
"-m",
479-
"JETLS"
503+
"JETLS",
504+
"serve"
480505
]
481506
}
482507
```

0 commit comments

Comments
 (0)