Skip to content

Fix nested array-of-tables generating wrong source map paths#7

Open
thatch wants to merge 1 commit into
mainfrom
thatch/nested-aot
Open

Fix nested array-of-tables generating wrong source map paths#7
thatch wants to merge 1 commit into
mainfrom
thatch/nested-aot

Conversation

@thatch
Copy link
Copy Markdown
Member

@thatch thatch commented May 1, 2026

[[a.b]] and deeper nested AoTs were stored at /a/b/0 instead of /a/0/b/0 because _process_aot did not inject parent AoT indices.

Two related fixes:

  • _process_aot: expand only the prefix segments (all but the last, which names the AoT being defined), so parent AoT indices are injected without the AoT injecting its own index into itself.
  • _expand_aot_segments: rewrite to walk segments left-to-right and insert an index after each segment that resolves to a known AoT pointer, instead of stopping after the first match. This correctly handles arbitrarily deep nesting.

[[a.b]] and deeper nested AoTs were stored at /a/b/0 instead of
/a/0/b/0 because _process_aot did not inject parent AoT indices.

Two related fixes:
- _process_aot: expand only the prefix segments (all but the last,
  which names the AoT being defined), so parent AoT indices are
  injected without the AoT injecting its own index into itself.
- _expand_aot_segments: rewrite to walk segments left-to-right and
  insert an index after each segment that resolves to a known AoT
  pointer, instead of stopping after the first match. This correctly
  handles arbitrarily deep nesting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant