Repository navigation
gxt: use @lifeart/gxt 0.0.89; the item reference runtime comes with the templates that need it; the compat app built from source boots - #34
Merged
Conversation
0.0.89 is 0.0.88 plus lifeart/glimmer-next#280, made for this integration: - under the Ember dialect, a template that keys a list by position or renders a native `{{#each-in}}` imports the item reference runtime itself; - the render-tree capture reads a list's rows without importing the list classes; - `@lifeart/gxt/runtime-scope` exports the runtime symbol table and `setupGlobalScope` from a module that imports no compiler; - the vite plugin's `precompileTemplate` option compiles Ember `precompileTemplate` call sites at build time under the plugin's own flags; - a TypeScript module whose only templates are `precompileTemplate` calls compiles, and DOM that the Ember compat manager returns for a template-only component is that component's output. The compiler and the runtime must be the same version; this repo uses the pinned gxt for both. The package's manifest and dependencies are those of 0.0.88 but for the version and a new `./runtime-scope` export, so the lockfile entries change only in version and integrity. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ates that key a list by position Not by every app: the strict modern app keys no list by position and renders no each-in, so it carried the runtime for nothing. (The compiler half, emitting the install for the Ember dialect, is a gxt change.) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A template compiled at build time that keys a list by position or renders
{{#each-in}} imports the item reference runtime from @lifeart/gxt/item-references.
The bare @lifeart/gxt alias, a string, also matched that specifier and resolved
it inside the main entry's file, so every test module with such a template
failed to load. It now has its own alias ahead of the bare one, in the compat
and the native config.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… only with the template that needs it
smoke-tests/modern-app/app-lists: one route with a list keyed by position
(key="@index") and an {{#each-in}}, the two list shapes whose compiled templates
install gxt's item reference runtime. Its boot check renders the rows, replaces
each list's source and checks that the rows update in place (a positional row
keeps its DOM node and shows the item now at its position). --assert-native
checks the closure both ways: the lists app ships `@lifeart/gxt/item-references`,
the strict and loose apps do not.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…inks
The strict modern app, built from source on the compat build, rendered its
application template and no route below it, with no error, and both of its
`<LinkTo>`s linked to the last route. Three causes:
- The compat build compiles an app's `.gjs` / `.gts` with the gxt compiler,
whose dialect read `{{outlet}}` as a yield to the default block, which
renders nothing. The compat vite pipeline now compiles them with gxt's
EMBER_OUTLET flag: `{{outlet}}` is `$_outlet(ctx)`, which renders the
component the compat backend registers as gxt's `outletComponent` host hook.
It renders `<ember-outlet>`, the element a runtime-compiled `{{outlet}}`
becomes.
- A route template compiled at build time is a gxt template function. The
root template rendered the application's, but an `<ember-outlet>` called a
child route's as a template factory, without a context. Such a function now
renders as a runtime-compiled template renders gxt's own template function,
at every level (compile.ts `templateForFunction`). A template factory chain
registered as a function still renders as before.
- Internal components (`<LinkTo>`, `<Input>`, `<Textarea>`) keep one instance
per invocation, found by owner, component and call order within a render
generation. An app renders in generation 0 (only the test harness advances
it), which `|| -1` read as no generation: the call counters were reset at
every invocation, and every `<LinkTo>` of a template rendered the first one's
instance with the last one's arguments.
The modern-app job boots the compat app built from source and gates it like
the native apps.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
📊 Size reportTarball size — dist/dev No changes
dist/prod No changes
smoke-tests/v2-app-template/dist No changes
smoke-tests/v2-app-hello-world-template/dist No changes
🤖 This report was automatically generated by wyvox/pkg-size |
lifeart
changed the base branch from
gxt-tree-shaking-dist
to
glimmer-next-fresh
November 19, 2026 12:10
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.
Uses
@lifeart/gxt0.0.89 (lifeart/glimmer-next#280) in emberjs#21340, and with it:The item reference runtime comes with the templates that need it
@lifeart/gxt/item-referencesunder the Ember dialect too, for a template that keys a list by position (key="@index",@key) or renders a native{{#each-in}}. The native layer'sinstall.tsno longer callsregisterItemReferenceRuntime()for every app.$_itemRefKeyfrom the main entry, and calling it installs the runtime; the compatsetupGlobalScopestill installs it. No Ember-side template keys a list by position or uses{{#each-in}}.@lifeart/gxt/item-referencesto its own entry. The@lifeart/gxtalias, a string, also matched that subpath.smoke-tests/modern-app/app-lists), boot-checked in the GXT native workflow, renderskey="@index"and{{#each-in}}lists, replaces their sources, and checks the rows: positional rows keep their DOM nodes and show the item now at their position; each-in rows of kept entries keep theirs.--assert-nativechecks both ways that only this app ships@lifeart/gxt/item-references.The compat app built from source boots
The strict modern app, built from source on the compat build, rendered its application template and no route below it, with no error, and both of its
<LinkTo>s linked to the last route. Three causes:.gjs/.gtswith a gxt dialect that reads{{outlet}}as a yield to the default block, which renders nothing. It now compiles them with gxt'sEMBER_OUTLETflag:{{outlet}}renders the compat backend'soutletComponenthost hook, which renders<ember-outlet>.<ember-outlet>called a child route's build-time template, a gxt template function, as a template factory. Such a function now renders as a runtime-compiled template renders gxt's own template function (compile.ts,templateForFunction).<LinkTo>,<Input>,<Textarea>) keep one instance per invocation within a render generation. An app renders in generation 0, which|| -1read as no generation, so every<LinkTo>of a template rendered the first one's instance with the last one's arguments. It is?? -1.The GXT native workflow's modern-app job now builds this app and gates it like the native apps.
Verification
The checks of this PR, and GXT Full dispatched on its head, all against the npm
@lifeart/gxt0.0.89:diff -rq, 290 files); the native dist is VM-free and within budgetorigin/main, which this fork does not haveBytes, brotli:
@lifeart/gxt/item-referencesThe strict app is 1,118 B smaller: the item reference runtime it no longer installs, and the async list 0.0.89's render-tree capture no longer keeps.
🤖 Generated with Claude Code