Repository navigation
fix(compiler): preserve TSRX expression and comment spans - #3787
Conversation
🦋 Changeset detectedLatest commit: 4e3b938 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 |
|
I checked the 4,000-row mount regression between Independent Linux builds produced identical output for all 79 files in
Neither local pair reproduced the reported slowdown. This does not clear the remote alert: CI uses a different environment, and its runs have no downloadable build artifacts to compare. The fresh CI run passed. CodSpeed now reports 188 unchanged benchmarks, and all seven PR checks are green. Commit c64668b is an empty CI revalidation commit with the same tree as 650dfb1. |
# Conflicts: # packages/compiler/src/tsrx/leaf.rs
|
Native TSRX compilation rejected keys such as
key(item.id)and annotated@forloops used directly as a component body. Deeply parenthesized iterables and conditions could also leave parser scaffolds behind. Keep exact aliases for authored parentheses and use the authored iterable to find annotated loop anchors.This also fixes projected comments reaching code generation with offsets into the wrong source. With source maps enabled, that could produce invalid JavaScript or panic when an offset split a Unicode character. Discard scaffold comments and map authored comments back to the original source before code generation.
The parser revision, supported grammar, and Rust 1.95 minimum stay unchanged.
Validation:
next.CI: Solid CI, both size checks, and Socket Security passed. CodSpeed flagged one Signals benchmark,
mount 4000 rows / memo + sync render effect only (reference), at 26.9 ms versus 29.7 ms (-9.42%); the other 187 were unchanged. The report warns that the runtime environments differ. The Signals source tree, benchmark, build configuration, and lockfile are identical between the base and this commit, and the measured code does not call the TSRX compiler. That does not establish identical remote artifacts or environments. I could not rerun the workflow because GitHub requires repository admin access, so the performance result remains unresolved.