Repository navigation
fix(compiler): preserve TSRX setup spans at synthetic semicolons - #3779
Merged
Merged
Conversation
The parser projection inserts a semicolon before line-leading markup. Exclude that synthetic terminator when mapping a statement back to its authored span. Require contiguous authored segments and markup directly after the separator, preserving exact matching and authored semicolons. Cover DOM, SSR and universal output, source maps, nearby statements, comments, Unicode text and LF/CRLF input. Reject unrelated synthetic gaps. Validation: the reported example fails before the fix and passes after it. Rust passes in all three feature configurations. Compiler JavaScript revalidation on next passes, including the rerun of seven timed-out tests. Fixes solidjs#3762.
🦋 Changeset detectedLatest commit: b02ccb0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merging this PR will not alter performance
Comparing Footnotes
|
This was referenced Oct 4, 2026
Member
|
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
The parser projection inserts a semicolon before line-leading markup. For a setup statement without an authored semicolon, that extra byte made the native compiler fail to match the statement to its source span.
Exclude the synthetic terminator when mapping the span back to the source. The adjustment requires contiguous authored segments and markup immediately after the generated separator, so exact statement matching and authored semicolons are preserved.
Fixes #3762.
How did you test this change?
Unable to load authored TSRX statement at 25..45and passes in DOM, SSR and universal modes after it.nextat1b9ceb67. Rust passed the default, no-default-features and TSRX-only configurations.style=""/class=""for a nullishstyle/class#3773: 6,047 compiler tests passed initially, with seven five-second timeouts. The two affected files then passed all 216 tests with one worker and a 15-second limit. No assertion failures remained.git diff --checkpassed.Semicolonless setup before a dynamic tag such as
<{Tag} />, and U+2028/U+2029 statement boundaries, still fail earlier in the pinned parsers. Those fixes are being prepared upstream; this PR keeps the current dependency versions. Existing Clippy and rustfmt failures are being repaired separately. WASI and other platforms were not tested.