Better error message for wrong-cased XML tags - #1793
Merged
Merged
Conversation
Roku requires structural tags like `<children>`, `<interface>` and `<script>` to be all lower case. Previously a wrong-cased tag fell through the parser's exact-case matching and surfaced as a generic "Unexpected tag 'Children'", which doesn't hint at the actual problem. The parser now matches structural tags case-insensitively so they build the correct AST node, and XmlFileValidator reports the casing separately. Transpile still emits the tag verbatim, so this reports the problem without silently rewriting the author's markup. Fixes #1399. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
TwitchBronBron
enabled auto-merge (squash)
September 8, 2026 17:11
Merged
TwitchBronBron
added a commit
that referenced
this pull request
Sep 9, 2026
Ports every master commit since 0.73.1 (through 0.73.3). Where master's code collided with v1's rewrites, v1's architecture wins and the change was re-implemented against it rather than taken verbatim. Features ported: - `continue` transpiles to a goto label for firmware below 11.5 (#489) - go-to-definition for file path strings in BRS/BS/XML (#1648) - `isTerminal`/`previousInChain` on AstNode (#1788) - nested curly braces in template strings (#1539) - regex literals after `${` and `,` (#1789) - wrong-cased XML tag diagnostic (#1793) - duplicate/crashing "find all references" fix (#1791) - duplicate sourceMappingURL fix (#1786) - findAncestor type-guard inference (#1787) - lexer token-text interning (#1712) - memory-aware default for max worker threads (#1798) - js-yaml override bumped to ^4.3.2 (#1796) Notable adaptations: - master's whitespace fast-path skipped `addToken`, which in v1 is also what routes a token into `leadingTrivia`. Kept the Token allocation (trivia depends on it) and took only the interning half of that optimization. - #1798 rewrote WorkerPool around master's simpler worker tracking. v1 has an `isDead` crashed-worker feature master lacks, so only the `getDefaultMaxWorkerThreads` logic was ported, on top of v1's tracking. - `no-unsafe-argument` is a warning, not an error: master enabled it after cleaning up v0's call sites, and v1's rewrites carry ~76 more that were never part of that cleanup. - three tests from master assert v0 behavior v1 changed on purpose (Comment tokens are trivia, `getReferences` returns `[]` not null, and the NamespacedVariableNameExpression chain step is gone). Updated to v1's contract. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Roku requires
<children>,<interface>,<script>etc. to be lower case. Wrong-cased tags used to fall through the parser's exact-case matching and report a genericUnexpected tag 'Children', which doesn't hint at the real problem. Now they reportTag 'Children' must be all lower case. Use 'children' instead.Supersedes #1540, which went stale (its diagnostic code 1143 is now taken).
xmlTagWrongCasediagnostic, code 1157SGParsermatches structural tags case-insensitively, so wrong-cased tags build a real AST node instead of hitting the unexpected-tag pathXmlFileValidator.validateTagCasingreports the casing, alongside the existingvalidateTagClosingsTwo deliberate choices:
<children>— node names in there are author-defined and legitimately mixed-case.Fixes #1399.