Repository navigation
Read a JSON string's \u escapes, and write a Char's \u escape with its own four hexits - #724
Merged
Merged
Conversation
lagergren
added a commit
that referenced
this pull request
Oct 23, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
ggleyzer
requested changes
Oct 24, 2026
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
Review of #724: eatHexits(), which only eatString() calls, is a local function of eatString() instead of a member of the Lexer; the comment on surrogate pairs is one line, and the comment that repeated the message of the unexpected low surrogate's exception is gone. Validation: :xdk:lib-json:testXtc, forced to run again: JsonTest passes 179, ParsingTest 7, with its \u escape and surrogate pair tests. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
Review of #724: eatHexits(), which only eatString() calls, is a local function of eatString() instead of a member of the Lexer; the comment on surrogate pairs is one line, and the comment that repeated the message of the unexpected low surrogate's exception is gone. Validation: :xdk:lib-json:testXtc, forced to run again: JsonTest passes 179, ParsingTest 7, with its \u escape and surrogate pair tests. Limits: none.
lagergren
force-pushed
the
lagergren/fix-json-unicode-escape
branch
from
October 26, 2026 11:05
8a37676 to
68c6446
Compare
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
Review of #724: eatHexits(), which only eatString() calls, is a local function of eatString() instead of a member of the Lexer; the comment on surrogate pairs is one line, and the comment that repeated the message of the unexpected low surrogate's exception is gone. Validation: :xdk:lib-json:testXtc, forced to run again: JsonTest passes 179, ParsingTest 7, with its \u escape and surrogate pair tests. Limits: none.
lagergren
force-pushed
the
lagergren/fix-json-unicode-escape
branch
from
October 26, 2026 16:25
68c6446 to
cfa0ea1
Compare
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md's master candidates now name the pull requests for the two library bugs found while fixing #723 and #724: #730 writes a Char's \u escape with its own four hexits, and #731 gives a Nibble one byte as its bytes and makes a Nibble from one. Issue #729 asks whether an escaped backslash should keep a \u after it from being a Unicode escape, which #730's test has to work around. Validation: records only; the pull requests carry their own. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
docs/remaining.md's master candidates now name the pull requests for the two library bugs found while fixing #723 and #724: #730 writes a Char's \u escape with its own four hexits, and #731 gives a Nibble one byte as its bytes and makes a Nibble from one. Issue #729 asks whether an escaped backslash should keep a \u after it from being a Unicode escape, which #730's test has to work around. Validation: records only; the pull requests carry their own. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 26, 2026
Review of #724: eatHexits(), which only eatString() calls, is a local function of eatString() instead of a member of the Lexer; the comment on surrogate pairs is one line, and the comment that repeated the message of the unexpected low surrogate's exception is gone. Validation: :xdk:lib-json:testXtc, forced to run again: JsonTest passes 179, ParsingTest 7, with its \u escape and surrogate pair tests. Limits: none.
lagergren
force-pushed
the
lagergren/fix-json-unicode-escape
branch
from
October 26, 2026 21:31
cfa0ea1 to
3a4b169
Compare
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
remaining.md ticks the soak on macOS and Linux, parity between the editors, current docs and each runtime PR validated on its own, and adds the soak on Windows as open. The execution plan and the integration plan say the same. The R8 entries now cite the commits on the current history, as the 2026-10-26b rebase map gives them. Validation: - Linux: arm64, JDK 25, in a Podman container on the Mac, as a user other than root, with one test fork, at 6b8f5bb. javatools' 686 tests pass (42 skipped). With --init on a quiet host, lsp-server's 2401 tests pass but the 2 always skipped, with the soak at 50 rounds (56 s), in 34 minutes. EmbeddedExecutionTest alone passes, 46 tests in 50 s, and its console test alone passes 3 times out of 3. - Parity at 718ddd6: VS Code passes all 34 run and debug cases; IntelliJ passes 21 of its 32 and the other 11 are partial, each with its recorded limit (the test driver, or LSP4IJ 0.21.0's UP32-UP42). - #716, #717, #718, #724, #731 and #693 pass CI on their heads, rebased onto master ddaa3d0. - CI's lang checks run on ubuntu-latest only (commit.yml), which is why Windows stays open. Problems found, as recorded in remaining.md: - As root, the read-only tests failed; they skip there (e4a8e68). - With Gradle as the container's PID 1, which does not reap, a killed server's worker stayed a zombie and the worker-exit test timed out. It passes with --init. - Under a load average of 37-75 on the Mac's 10 cores, time limits failed: XdkOnTypeFormattingTest's 20 ms, and the runtime's 1 s limit on a lazy toString() in the console test, whose program then stayed stopped on the class's shared worker, so three later tests failed. Limits: docs only. Windows is not validated. Dated records elsewhere keep the hashes they were written with.
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
Review of #724: eatHexits(), which only eatString() calls, is a local function of eatString() instead of a member of the Lexer; the comment on surrogate pairs is one line, and the comment that repeated the message of the unexpected low surrogate's exception is gone. Validation: :xdk:lib-json:testXtc, forced to run again: JsonTest passes 179, ParsingTest 7, with its \u escape and surrogate pair tests. Limits: none.
lagergren
force-pushed
the
lagergren/fix-json-unicode-escape
branch
from
October 27, 2026 09:09
b7c1a2b to
2a334d6
Compare
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
docs/remaining.md's master candidates now name the pull requests for the two library bugs found while fixing #723 and #724: #730 writes a Char's \u escape with its own four hexits, and #731 gives a Nibble one byte as its bytes and makes a Nibble from one. Issue #729 asks whether an escaped backslash should keep a \u after it from being a Unicode escape, which #730's test has to work around. Validation: records only; the pull requests carry their own. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
remaining.md ticks the soak on macOS and Linux, parity between the editors, current docs and each runtime PR validated on its own, and adds the soak on Windows as open. The execution plan and the integration plan say the same. The R8 entries now cite the commits on the current history, as the 2026-10-26b rebase map gives them. Validation: - Linux: arm64, JDK 25, in a Podman container on the Mac, as a user other than root, with one test fork, at 6b8f5bb. javatools' 686 tests pass (42 skipped). With --init on a quiet host, lsp-server's 2401 tests pass but the 2 always skipped, with the soak at 50 rounds (56 s), in 34 minutes. EmbeddedExecutionTest alone passes, 46 tests in 50 s, and its console test alone passes 3 times out of 3. - Parity at 718ddd6: VS Code passes all 34 run and debug cases; IntelliJ passes 21 of its 32 and the other 11 are partial, each with its recorded limit (the test driver, or LSP4IJ 0.21.0's UP32-UP42). - #716, #717, #718, #724, #731 and #693 pass CI on their heads, rebased onto master ddaa3d0. - CI's lang checks run on ubuntu-latest only (commit.yml), which is why Windows stays open. Problems found, as recorded in remaining.md: - As root, the read-only tests failed; they skip there (e4a8e68). - With Gradle as the container's PID 1, which does not reap, a killed server's worker stayed a zombie and the worker-exit test timed out. It passes with --init. - Under a load average of 37-75 on the Mac's 10 cores, time limits failed: XdkOnTypeFormattingTest's 20 ms, and the runtime's 1 s limit on a lazy toString() in the console test, whose program then stayed stopped on the class's shared worker, so three later tests failed. Limits: docs only. Windows is not validated. Dated records elsewhere keep the hashes they were written with.
lagergren
added a commit
that referenced
this pull request
Oct 27, 2026
errs-integration-plan.md records the rebase of errs, #693, #716, #717 and #724 onto master bcd8e30, and errs-rebase-2026-10-27.tsv maps errs' 1037 old commits to their 1035 replays: two absorbed by #718, and one that keeps only its lsp-server test. Validation: every replayed commit has its old subject; the rebased tree differs from the old tip only in the files #731 and #718 change. :javatools:test 688 (42 skipped) and :lang:lsp-server:test 2401 (2 skipped) pass on the rebased errs. Limits: records only.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
remaining.md: L82's uninterrupted full-catalog VS Code run is done (run-Pc161s, 332 of 333 with UP23's accepted X218; again on vscode-languageclient 11.0.0); the master candidates name what merged (#716, #717, #718, #720, #723, #731, #735), what closed, and #724 as the one still open; #693's sync line has its rebase onto #742 and its commit 71. The plan's opening and inventory name the 2026-10-28 full-catalog runs in both editors instead of the October 7 checkpoint. Validation: docs only; each state read from GitHub and the run reports on 2026-10-29; spotlessCheck and git diff --check pass.
lagergren
enabled auto-merge (squash)
October 29, 2026 13:08
lib_json's Lexer read the four hexits of a \u escape, shifted each of them 8 bits where it meant to make one 16-bit value of them, and then added nothing to the string: every \u escape was dropped. lib_json's own Printer writes control characters as \u escapes, so it could not read them back. The hexits went through Nibble.of(), which on master gives 0 for every hexit (#723), so the value was 0 as well. - The four hexits are read with Char.asciiHexit(), which does not use Nibble, into one 16-bit value, and the character is added. - A character beyond the Basic Multilingual Plane, which JSON writes as a UTF-16 surrogate pair, is read as one Char; a Char cannot hold a surrogate. - A character that is not a hexit, a low surrogate on its own, and a high surrogate that no low one follows are IOExceptions, as the lexer's other malformed input is. Tests, in lib_json's ParsingTest: - shouldParseUnicodeEscapes: A, é and É, with upper and lower case hexits, and U+2028. - shouldParseASurrogatePairAsOneCharacter: 😀 reads as U+1F600. - shouldReadBackTheControlCharactersItWrites: Printer writes U+0001 and U+001F as \u escapes, and they read back as the string written. - shouldRejectABadUnicodeEscape: the three malformed cases above, and a high surrogate followed by a \u escape that is not a low surrogate. The tests make each escape as "\\" + "u" + hexits: the compiler reads a backslash, a "u" and four hexits as that character, also in a String literal, which is why Printer's table is written that way too. Validation: the four new tests fail without the fix, and pass with it; JsonTest passes 179, forced to run again. check passes; :javatools:test passes 456 tests, the 42 existing skips; spotlessCheck passes. Problems found and fixed: - Found while looking at Nibble.of()'s callers for #723. - Found, not fixed here: Char.appendEscaped() writes the first three hexits of a \u escape as 0, since `codepoint & 0xF000 >>> 24` is `codepoint & 0`, so U+2028 is written as \u0008. Limits: the runtime keeps a String's chars as Java chars, so a Char beyond the Basic Multilingual Plane still becomes the one char a Char[] holds for it; the surrogate pair test compares with that Char's own String. Other escapes the lexer does not know are still dropped without an error, as before.
A comment at the escape's range checks says that UTF-16 keeps 0xD800..0xDFFF for surrogates, which are no character of their own, and that a character above 0xFFFF is written as a high surrogate, 0xD800..0xDBFF, with the top 10 bits of the codepoint less 0x10000, and then a low one, 0xDC00..0xDFFF, with the bottom 10; and that the else branch is a low surrogate with no high one before it. Validation: comments only; JsonTest passes 179, forced to run again; spotlessCheck passes. Limits: none.
Review of #724: eatHexits(), which only eatString() calls, is a local function of eatString() instead of a member of the Lexer; the comment on surrogate pairs is one line, and the comment that repeated the message of the unexpected low surrogate's exception is gone. Validation: :xdk:lib-json:testXtc, forced to run again: JsonTest passes 179, ParsingTest 7, with its \u escape and surrogate pair tests. Limits: none.
Char.appendEscaped() writes a C0 or C1 control character with no escape of its own, or a line or paragraph separator, as a backslash, a "u" and four hexits. Each hexit was computed as (codepoint & 0xF000 >>> 24), (codepoint & 0x0F00 >>> 16) and so on. Shifts and & have the same precedence in Ecstasy, left to right, so that is (codepoint & 0xF000) >>> 24: zero for every character it escapes, and the shifts were twice too large anyway. Only the last hexit was right, so U+2028 was written as \u0008, U+0085 as \u0005 and U+001F as \u000F, while U+0001 came out right by accident. Each hexit is now the code point shifted by 12, 8, 4 or 0, masked to four bits. Char.quoted(), String.quoted() and String.appendEscaped() write their escapes through it. Test: a new testEscapes() in manualTests' literals.x, which CI runs as TestLiterals, asserts the quoted forms of U+0001, U+001F, U+0085, U+2028 and a String holding U+2029. Each expected text is joined from two literals, since the compiler reads a backslash, a "u" and four hexits as the character they name anywhere in the source, also after an escaped backslash; that is issue #729.
The test's u() helper built "\\" + "u" + hexits, on the grounds that
the compiler reads a backslash, a "u" and four hexits as that
character. That holds only when the hexits follow in the source, and
here they come at run time, so $"\\u{hexits}" is the same text.
Validation: :xdk:lib-json:testXtc passes 179 tests, ParsingTest's 7
among them, with the four unicode escape cases.
lagergren
force-pushed
the
lagergren/fix-json-unicode-escape
branch
from
October 29, 2026 13:09
13b4e9b to
80186ec
Compare
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md's master candidates now name the pull requests for the two library bugs found while fixing #723 and #724: #730 writes a Char's \u escape with its own four hexits, and #731 gives a Nibble one byte as its bytes and makes a Nibble from one. Issue #729 asks whether an escaped backslash should keep a \u after it from being a Unicode escape, which #730's test has to work around. Validation: records only; the pull requests carry their own. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
remaining.md ticks the soak on macOS and Linux, parity between the editors, current docs and each runtime PR validated on its own, and adds the soak on Windows as open. The execution plan and the integration plan say the same. The R8 entries now cite the commits on the current history, as the 2026-10-26b rebase map gives them. Validation: - Linux: arm64, JDK 25, in a Podman container on the Mac, as a user other than root, with one test fork, at 6b8f5bb. javatools' 686 tests pass (42 skipped). With --init on a quiet host, lsp-server's 2401 tests pass but the 2 always skipped, with the soak at 50 rounds (56 s), in 34 minutes. EmbeddedExecutionTest alone passes, 46 tests in 50 s, and its console test alone passes 3 times out of 3. - Parity at 718ddd6: VS Code passes all 34 run and debug cases; IntelliJ passes 21 of its 32 and the other 11 are partial, each with its recorded limit (the test driver, or LSP4IJ 0.21.0's UP32-UP42). - #716, #717, #718, #724, #731 and #693 pass CI on their heads, rebased onto master ddaa3d0. - CI's lang checks run on ubuntu-latest only (commit.yml), which is why Windows stays open. Problems found, as recorded in remaining.md: - As root, the read-only tests failed; they skip there (e4a8e68). - With Gradle as the container's PID 1, which does not reap, a killed server's worker stayed a zombie and the worker-exit test timed out. It passes with --init. - Under a load average of 37-75 on the Mac's 10 cores, time limits failed: XdkOnTypeFormattingTest's 20 ms, and the runtime's 1 s limit on a lazy toString() in the console test, whose program then stayed stopped on the class's shared worker, so three later tests failed. Limits: docs only. Windows is not validated. Dated records elsewhere keep the hashes they were written with.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
errs-integration-plan.md records the rebase of errs, #693, #716, #717 and #724 onto master bcd8e30, and errs-rebase-2026-10-27.tsv maps errs' 1037 old commits to their 1035 replays: two absorbed by #718, and one that keeps only its lsp-server test. Validation: every replayed commit has its old subject; the rebased tree differs from the old tip only in the files #731 and #718 change. :javatools:test 688 (42 skipped) and :lang:lsp-server:test 2401 (2 skipped) pass on the rebased errs. Limits: records only.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
remaining.md: L82's uninterrupted full-catalog VS Code run is done (run-Pc161s, 332 of 333 with UP23's accepted X218; again on vscode-languageclient 11.0.0); the master candidates name what merged (#716, #717, #718, #720, #723, #731, #735), what closed, and #724 as the one still open; #693's sync line has its rebase onto #742 and its commit 71. The plan's opening and inventory name the 2026-10-28 full-catalog runs in both editors instead of the October 7 checkpoint. Validation: docs only; each state read from GitHub and the run reports on 2026-10-29; spotlessCheck and git diff --check pass.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
docs/remaining.md's master candidates now name the pull requests for the two library bugs found while fixing #723 and #724: #730 writes a Char's \u escape with its own four hexits, and #731 gives a Nibble one byte as its bytes and makes a Nibble from one. Issue #729 asks whether an escaped backslash should keep a \u after it from being a Unicode escape, which #730's test has to work around. Validation: records only; the pull requests carry their own. Limits: none.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
remaining.md ticks the soak on macOS and Linux, parity between the editors, current docs and each runtime PR validated on its own, and adds the soak on Windows as open. The execution plan and the integration plan say the same. The R8 entries now cite the commits on the current history, as the 2026-10-26b rebase map gives them. Validation: - Linux: arm64, JDK 25, in a Podman container on the Mac, as a user other than root, with one test fork, at 6b8f5bb. javatools' 686 tests pass (42 skipped). With --init on a quiet host, lsp-server's 2401 tests pass but the 2 always skipped, with the soak at 50 rounds (56 s), in 34 minutes. EmbeddedExecutionTest alone passes, 46 tests in 50 s, and its console test alone passes 3 times out of 3. - Parity at 718ddd6: VS Code passes all 34 run and debug cases; IntelliJ passes 21 of its 32 and the other 11 are partial, each with its recorded limit (the test driver, or LSP4IJ 0.21.0's UP32-UP42). - #716, #717, #718, #724, #731 and #693 pass CI on their heads, rebased onto master ddaa3d0. - CI's lang checks run on ubuntu-latest only (commit.yml), which is why Windows stays open. Problems found, as recorded in remaining.md: - As root, the read-only tests failed; they skip there (e4a8e68). - With Gradle as the container's PID 1, which does not reap, a killed server's worker stayed a zombie and the worker-exit test timed out. It passes with --init. - Under a load average of 37-75 on the Mac's 10 cores, time limits failed: XdkOnTypeFormattingTest's 20 ms, and the runtime's 1 s limit on a lazy toString() in the console test, whose program then stayed stopped on the class's shared worker, so three later tests failed. Limits: docs only. Windows is not validated. Dated records elsewhere keep the hashes they were written with.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
errs-integration-plan.md records the rebase of errs, #693, #716, #717 and #724 onto master bcd8e30, and errs-rebase-2026-10-27.tsv maps errs' 1037 old commits to their 1035 replays: two absorbed by #718, and one that keeps only its lsp-server test. Validation: every replayed commit has its old subject; the rebased tree differs from the old tip only in the files #731 and #718 change. :javatools:test 688 (42 skipped) and :lang:lsp-server:test 2401 (2 skipped) pass on the rebased errs. Limits: records only.
lagergren
added a commit
that referenced
this pull request
Oct 29, 2026
remaining.md: L82's uninterrupted full-catalog VS Code run is done (run-Pc161s, 332 of 333 with UP23's accepted X218; again on vscode-languageclient 11.0.0); the master candidates name what merged (#716, #717, #718, #720, #723, #731, #735), what closed, and #724 as the one still open; #693's sync line has its rebase onto #742 and its commit 71. The plan's opening and inventory name the 2026-10-28 full-catalog runs in both editors instead of the October 7 checkpoint. Validation: docs only; each state read from GitHub and the run reports on 2026-10-29; spotlessCheck and git diff --check pass.
lagergren
added a commit
that referenced
this pull request
Nov 2, 2026
The register and remaining.md still said that LSP4IJ #1740, UP03's UI wait during the will* requests of an IDE rename or move, was open. Our #1755, which asks for workspace/willRenameFiles before a refactoring's write action, fixed it on 2026-10-26 (d85f2c9b). UP03's guarded entry points stay until a release with it passes X103 and X130 without them. remaining.md also still called xvm #724 open; it merged on 2026-10-29 (5ba865f). The lsp-server README and the manual test plan said "reanalyse" where the code now says analyze. Validation: gh pr view on LSP4IJ #1755 and xvm #724 (merged, with those commits). No code changed. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 2, 2026
docs/remaining.md gives each master candidate its pull request: the weak map fix #720, also on #693 as a5e25c7, the EvalCompiler fixes #721, native toString() #722, the Nibble fix #723, which now covers its bits and String constructor as well, and lib_json's \u escapes #724, found through Nibble.of()'s callers. A bug found with #724 and not fixed is added: Char.appendEscaped() writes the first three hexits of a \u escape as 0. Validation: records only; each pull request's validation is in its commit and description. The appendEscaped() output was checked on master: 0x2028.toChar().quoted() is '\u0008'. Limits: none of the pull requests has a review yet.
lagergren
added a commit
that referenced
this pull request
Nov 2, 2026
docs/remaining.md: #723 is merged as 80bf83f. #722 is closed after review, since the interpreter keeps natural Ecstasy code and speed is the JIT's; its item is declined. #717 no longer carries the UID change, as decided on #677, which stays on this branch only. #719 replaces #718: both fix the hang, neither test catches it, and #719 has no debugger a host supplies, which now comes with the DAP work, and with it the refiling of the EvalCompiler fixes. #720's and #724's review changes are recorded, #720's with this branch's copy, 7fe6450. Validation: records only. The hang was reproduced with a program that runs a module with assert:debug through EmbeddingSupport and a standard input that stays open: master waits at "Enter command:", #718 and #719 end. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 2, 2026
docs/remaining.md's master candidates now name the pull requests for the two library bugs found while fixing #723 and #724: #730 writes a Char's \u escape with its own four hexits, and #731 gives a Nibble one byte as its bytes and makes a Nibble from one. Issue #729 asks whether an escaped backslash should keep a \u after it from being a Unicode escape, which #730's test has to work around. Validation: records only; the pull requests carry their own. Limits: none.
lagergren
added a commit
that referenced
this pull request
Nov 2, 2026
remaining.md ticks the soak on macOS and Linux, parity between the editors, current docs and each runtime PR validated on its own, and adds the soak on Windows as open. The execution plan and the integration plan say the same. The R8 entries now cite the commits on the current history, as the 2026-10-26b rebase map gives them. Validation: - Linux: arm64, JDK 25, in a Podman container on the Mac, as a user other than root, with one test fork, at 6b8f5bb. javatools' 686 tests pass (42 skipped). With --init on a quiet host, lsp-server's 2401 tests pass but the 2 always skipped, with the soak at 50 rounds (56 s), in 34 minutes. EmbeddedExecutionTest alone passes, 46 tests in 50 s, and its console test alone passes 3 times out of 3. - Parity at 718ddd6: VS Code passes all 34 run and debug cases; IntelliJ passes 21 of its 32 and the other 11 are partial, each with its recorded limit (the test driver, or LSP4IJ 0.21.0's UP32-UP42). - #716, #717, #718, #724, #731 and #693 pass CI on their heads, rebased onto master ddaa3d0. - CI's lang checks run on ubuntu-latest only (commit.yml), which is why Windows stays open. Problems found, as recorded in remaining.md: - As root, the read-only tests failed; they skip there (e4a8e68). - With Gradle as the container's PID 1, which does not reap, a killed server's worker stayed a zombie and the worker-exit test timed out. It passes with --init. - Under a load average of 37-75 on the Mac's 10 cores, time limits failed: XdkOnTypeFormattingTest's 20 ms, and the runtime's 1 s limit on a lazy toString() in the console test, whose program then stayed stopped on the class's shared worker, so three later tests failed. Limits: docs only. Windows is not validated. Dated records elsewhere keep the hashes they were written with.
lagergren
added a commit
that referenced
this pull request
Nov 2, 2026
errs-integration-plan.md records the rebase of errs, #693, #716, #717 and #724 onto master bcd8e30, and errs-rebase-2026-10-27.tsv maps errs' 1037 old commits to their 1035 replays: two absorbed by #718, and one that keeps only its lsp-server test. Validation: every replayed commit has its old subject; the rebased tree differs from the old tip only in the files #731 and #718 change. :javatools:test 688 (42 skipped) and :lang:lsp-server:test 2401 (2 skipped) pass on the rebased errs. Limits: records only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two bugs with
\uescapes, one on each side, combined here at Gene's suggestion (this replaces #730):lib_jsondrops every\uescape in a JSON string:"A"parses as"". Its ownPrinterwrites control characters as\uescapes, solib_jsoncan't read back a string with one that it wrote.Char.appendEscaped()writes the wrong\uescape for every character it escapes that way, apart from those below U+0010: U+2028 comes out as\u0008, U+0085 as\u0005and U+001F as\u000F.Char.quoted(),String.quoted()andString.appendEscaped()write their escapes through it.Root cause
Lexer.eatString()reads the four hexits of a\uescape and then adds nothing to the string. The value it computes is wrong too: it shifts each hexit 8 bits instead of building one 16-bit value. Its hexits also go throughNibble.of(), which on master gave 0 for every hexit (Give a Nibble the value of its four bits #723).Char.appendEscaped(), each hexit was(codepoint & 0xF000 >>> 24).toHexit(), and so on for the others. In Ecstasy, shifts and&have the same precedence and group left to right, so that is(codepoint & 0xF000) >>> 24, which is 0 for every character this escapes: the C0 and C1 control characters with no escape of their own, and U+2028 and U+2029. The shifts were also twice what they should be. Only the last hexit,(codepoint & 0x000F) >>> 0, was right.Change
Char.asciiHexit(), which doesn't useNibble, into one 16-bit value, and the character is added to the string. A character beyond the Basic Multilingual Plane, which JSON writes as a UTF-16 surrogate pair, is read as oneChar; aCharcan't hold a surrogate. A character that isn't a hexit, a low surrogate on its own, and a high surrogate with no low one after it raiseIOException, as the lexer's other malformed input does.Char: each hexit is the code point shifted by 12, 8, 4 or 0, masked to four bits.Validation
lib_json'sParsingTest. All four fail without the fix and pass with it:shouldParseUnicodeEscapes:A,éandÉ, with upper- and lower-case hexits, andU+2028.shouldParseASurrogatePairAsOneCharacter:😀reads asU+1F600.shouldReadBackTheControlCharactersItWrites:PrinterwritesU+0001andU+001Fas\uescapes, and they read back as the string written.shouldRejectABadUnicodeEscape: the three malformed cases above, and a high surrogate followed by a\uescape that isn't a low surrogate.testEscapes()inmanualTests'literals.xassertsChar.quoted()for U+0001, U+001F, U+0085 and U+2028, andString.quoted()for"a", U+2029,"b". CI runs it asTestLiterals. With master'sChar.xit fails at its second assert, U+001F.JsonTestpasses 179 tests;checkpasses;:javatools:testpasses, the 42 existing skips;spotlessCheckpasses. On this branch, after the two were combined,TestLiteralspasses throughmanualTests:runOne.Limits
Stringas Java chars, so aCharbeyond the Basic Multilingual Plane still becomes the one char that aChar[]holds for it. The surrogate pair test compares with thatChar's ownString."\\" + "u" + hexits), since the compiler reads a backslash, auand four hexits as the character they name anywhere in the source, also after an escaped backslash. Should an escaped backslash keep a \u after it from being a Unicode escape? #729 asks whether that should change.