Skip to content

Fix automatic lifting through extension chains - #3

Merged
camoy merged 3 commits into
camoy:masterfrom
jasonhemann:epoch-aware-lift-cache
Sep 3, 2026
Merged

Fix automatic lifting through extension chains#3
camoy merged 3 commits into
camoy:masterfrom
jasonhemann:epoch-aware-lift-cache

Conversation

@jasonhemann

Copy link
Copy Markdown
Contributor

Hi. My friend Claude and I fixed this using the conservative per-language extension counter approach we discussed in #2.

This commit makes 3 fixes:

  • Explicit extensions remain in exts, while automatically generated lifts are cached separately with the current value of the target language's extension counter. Parameter resolution still prefers an exact explicit extension. Otherwise, parameter resolution reuses a cached automatic lift only when the counter value recorded with the lift matches the target language's current extension counter; registering an explicit extension advances the corresponding language's extension counter.
  • Extended objects no longer capture their already-lifted base when first defined. Whenever an extended object is reconstructed for a target language, the object's originally declared immediate base is automatically lifted to that target language. Base reconstruction uses automatic lifting directly, since consulting explicit extensions while rebuilding the base could select the descendant currently being reconstructed.
  • Explicit extensions are now registered through the stored base chain, so lookup through any ancestor sees the new descendant. The language generation still advances only once per explicit declaration.

@camoy
camoy merged commit 1912df0 into camoy:master Sep 3, 2026
1 check passed
@camoy

camoy commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Thanks!

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.

2 participants