Repository navigation
Conversation
This was referenced Apr 25, 2026
Closed
lifeart
added a commit
to lifeart/ember.js
that referenced
this pull request
May 5, 2026
The $_dc_ember dynamic-component path tracks the rendered Ember instance
via __gxtDcCaptureCallback so that swap-outs (`{{component this.name}}`
when this.name changes) can fire willDestroy on the previous instance.
That callback was only invoked from renderClassicComponent. If the
resolved class went down the glimmerish branch
(renderGlimmerComponent — tagless/Glimmer.Component shapes), the
callback never fired and _dcEmberInstance stayed null, so
destroyCurrentDcInstance() short-circuited at swap time and the
previous instance never got its willDestroy hook.
Cumulative-state symptom (PR emberjs#21340): "component helper destroys
underlying component when it is swapped out" asserts
`{ 'foo-bar': 1, 'foo-bar-baz': 0 }` after the first swap but observes
`{ 'foo-bar': 0, ... }`. The classic-componentTemplate path resolves
foo-bar through renderGlimmerComponent in some cumulative-state code
paths (likely after pool reuse / stale state).
Fix: mirror the callback fire+clear from renderClassicComponent into
renderGlimmerComponent. setInstanceCapture (stack-based) is already
called above; this adds the global-callback path used by $_dc_ember.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lifeart
added a commit
to lifeart/ember.js
that referenced
this pull request
May 7, 2026
The 8 _gxtEffect(...) call sites in gxt-backend/manager.ts each install a GXT formula (sourceTag + tag + opcode) but ignored the cleanup function returned by effect(). When a component instance / DOM element was torn down between tests, those formulas stayed live in the global formula tracker. Across hundreds of cumulative tests, leaked formulas accumulated. The leak surface explains the cumulative-state cascade observed in PR emberjs#21340: a single @tracked-property dirty in the failing test propagated to every leaked formula, each of which re-evaluated its closure (re-reading `get person`, which constructs a fresh Person and dirties five more tags), saturating the main thread with __gxtExternalSchedule calls (493k+ in 10 minutes) and starving the 16ms interval-fallback sync. Wrap each call site with `_gxtEffectWithOwner(owner, cb)`, which: * Calls _gxtEffect(cb) and captures its cleanup. * Increments / decrements globalThis.__gxtActiveEffectCount (a diagnostic counter — useful for catching future leaks via QUnit.testDone instrumentation; cost is one ++/-- per effect). * Registers the cleanup on the owning destroyable via ./destroyable.registerDestructor, so when Ember tears down the component / element the formula's sourceTag, tag, and opcode all destruct, releasing the formula tracker entry. Owner mapping per call site: * manager.ts:1593 (createComponentInstance arg-cell effect) -> instance * manager.ts:2369 (updateInstanceWithNewArgs arg-cell effect) -> instance * manager.ts:5627 (createRenderContext path 4) -> instance || renderContext * manager.ts:5748 (createRenderContext path 3) -> instance || renderContext * manager.ts:9467 (renderCustomElement modifier ON_CREATED) -> el * manager.ts:9742 (renderLinkToElement modifier ON_CREATED) -> instance || el * manager.ts:10451 (Input/Textarea modifier ON_CREATED) -> instance || el * manager.ts:10879 (renderClassicComponent wrapper ON_CREATED) -> instance || wrapper Verification: * Component Tracked Properties module-isolation: 17/17 (no regression). * Smoke suite (14 modules / 333 tests): 333/333 PASS. * Diagnostic short repro (chromium loading just the Component Tracked Properties module): __gxtActiveEffectCount is now stable at 2 across 13 consecutive testDone events including the previously cascading "tracked properties rerender when updated outside of a runloop" test (was: count grew unboundedly per testDone before fix). The compile.ts:8165 site is intentionally not patched here: that reference to _gxtEffect is currently a free identifier wrapped in try/catch (silent ReferenceError), so it never installs a leaking effect in practice. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
lifeart
added a commit
to lifeart/ember.js
that referenced
this pull request
May 23, 2026
…dlers + lower-footprint args Prevents the laptop-freeze observed during parallel agent test runs: each runner spawned 1 chromium + ~8 child processes, and concurrent runs accumulated 17+ chrome-headless-shell at 55%+ CPU each. Symptom captured in PR emberjs#21340 session. Additions: - Lockfile at /tmp/gxt-test-runner.lock — refuses concurrent runs (with stale-pid detection) - SIGINT/SIGTERM/SIGHUP handlers + uncaughtException handler — guaranteed browser.close() - Idempotent cleanup() helper via cleanupRan flag - Lower-footprint chromium args: --disable-gpu, --disable-extensions, --disable-audio-output, --disable-software-rasterizer, --no-sandbox, --disable-features=...IsolateOrigins, site-per-process Default behavior unchanged for single-runner invocations. Concurrent runs now refuse to start instead of compounding resource exhaustion.
lifeart
force-pushed
the
glimmer-next-fresh
branch
3 times, most recently
from
June 11, 2026 03:53
109ea71 to
99f0b68
Compare
lifeart
added a commit
to lifeart/ember.js
that referenced
this pull request
Jun 11, 2026
…machinery Closes the @glimmer/component import-identity fork on the GXT side (PR emberjs#21340 Known-limitations bullet) with the documented Option-2 fallback, while leaving protocol extraction as the committed Option-1 target. - packages/@glimmer/component-gxt/: workspace-private sibling. `.` re-exports @glimmer/component 2.x's public surface (default Component); `./reactive` re-exports createTag/CURRENT_TAG/tracked/cached/createCache/getValue from the @ember/-internals/gxt-backend shims so its reactive symbols are identity-equal with the GXT build (not a second copy). Thin re-export, not reimplementation. Excluded from the root tsconfig like the gxt-backend shims (specifiers resolve only under the GXT rollup alias map); own tsconfig + ambient .d.ts keep it independently type-checkable. - identity test (__tests__/identity.test.ts) + demo vitest config: asserts === between symbols reached through @glimmer/component-gxt and through the shims, and demonstrates the fork by showing they differ from the classic @glimmer/validator copy. - scripts/ember-cli-gxt.mjs: `enable` now runs the import-identity guard (scans package.json deps + optional app-source grep, excluding the -gxt sibling) and refuses with the RFC-mandated message + non-zero exit on a direct @glimmer/component; `status` reports guard state. Self-contained node. - RFC §6: records the fallback as implemented/tested in-repo, notes real shipping still needs the ember-source-gxt packaging from §5.5. Gates (light gate: new files + script + tsconfig exclude; no gxt-backend runtime source touched): root `tsc --noEmit` 22/22 unchanged; package-local tsc clean; identity test 4/4; ember-cli-gxt status/enable-refusal/clean-enable node-smoked. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lifeart
added a commit
to lifeart/ember.js
that referenced
this pull request
Jun 11, 2026
… outcome) Addresses the last open Known-limitations bullet of PR emberjs#21340: the FastBoot/SSR pipeline blockers. Phase 4.1 (root-context isolation in gxt-backend/compile.ts): mapped every piece of root-scoped singleton state and classified (a)/(b)/(c). Outcome is analysis-only, not a refactor. The genuinely root-scoped state in compile.ts (_gxtRootContext, _gxtTopOutletRef, _gxtEngineInstances) is a thin, already-bridged layer, but the real "one root" boundary -- GXT's module-global node counter, rehydration stack, and setupGlobalScope -- lives in upstream @lifeart/gxt and cannot be isolated from compile.ts. Threading N roots through compile.ts while the upstream counter stays global would be cosmetic and regression-prone on the backend's most load-bearing file. Documented the smallest correct shape (upstream seedable counter + a synchronous withRootContext swap API) for when an SSR driver exists. Phase 4.2 (nested-engine outlet cursor-ID translation): located the lossy point -- GxtPartialRehydrationDelegate re-renders the sub-tree from scratch (innerHTML='') because GXT's node counter exposes only resetNodeCounter() (reset to 0), with no setNodeCounter(n) seed, so a mid-tree boundary cannot resume the parent's counter namespace on the client. Documented the fix shape (upstream seedable counter + boundary base-offset in withRehydration; delegate reads the boundary data-node-id). No code change; documentation-only, so the full GXT gate is not triggered. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lifeart
force-pushed
the
glimmer-next-fresh
branch
2 times, most recently
from
June 12, 2026 12:10
96acc59 to
e401aaa
Compare
Contributor
📊 Size reportTarball size — dist/dev 3%↑
Show files (29 files)
dist/prod 3%↑
Show files (28 files)
smoke-tests/v2-app-template/dist 2%↑
smoke-tests/v2-app-hello-world-template/dist 3%↑
🤖 This report was automatically generated by wyvox/pkg-size |
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Jun 12, 2026
The vite compiler plugin's .ts/.js content sniff (/hbs\s*`/) false-positived on doc-comment prose containing the byte sequence hbs-backtick — e.g. "components were authored in paired `.hbs` and `.js` files", where the closing backtick of the inline-code span follows "hbs" directly. The plugin then routed the entire module through the template transform and mangled its exports (emberjs/ember.js#21340: "FunctionBasedHelper is not exported" broke the GXT vite build on the PR merge ref after an upstream api-docs sweep). The sniff now requires a genuine tag position via negative lookbehind (excluding `.hbs`, 'hbs', "hbs", `hbs and identifier tails like stubhbs`), extracted as hasHbsTaggedTemplate() with unit coverage. Gates: tsc clean, vitest full suite green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Jun 13, 2026
…integration APIs (#222) * feat(host): registerHostHooks() formal host-integration API Replaces the optional globalThis.__gxt* extension slots with module-local hook slots behind an explicit registration API (HOST_HOOKS table). Covered hooks: toBool, scheduleRevalidate (__gxtExternalSchedule), registerListMarker, rebindEachItem, registerObjectValueOwner, getCurrentTemplateThis, isFunctionalHelper/markFunctionalHelper (the EmberFunctionalHelpers Set), and dynamicEval (the globalThis.$_eval fallback). Every runtime call site reads the hook slot first and falls back to the historical global, so hosts running the legacy wiring keep working unchanged (no lockstep upgrade). Gates: tsc clean, vitest 3817/3817, qunit 1219/0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(host): registerHostManagers() formal manager-registration API Companion to registerHostHooks: replaces the legacy contract of hunting down the module-original $_MANAGERS object reference (bridge accessors + deferred microtask retries on the host side) and mutating it from outside. The function lives in the same module instance the runtime call sites close over, so registration always reaches the canonical table regardless of how the host resolved the package — no object-identity hazards. Slots are replaced wholesale (hosts carry extra private state on their manager objects). Gates: tsc clean, vitest 3819/3819, qunit 1219/0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(compiler): don't treat hbs-extension prose as a tagged template The vite compiler plugin's .ts/.js content sniff (/hbs\s*`/) false-positived on doc-comment prose containing the byte sequence hbs-backtick — e.g. "components were authored in paired `.hbs` and `.js` files", where the closing backtick of the inline-code span follows "hbs" directly. The plugin then routed the entire module through the template transform and mangled its exports (emberjs/ember.js#21340: "FunctionBasedHelper is not exported" broke the GXT vite build on the PR merge ref after an upstream api-docs sweep). The sniff now requires a genuine tag position via negative lookbehind (excluding `.hbs`, 'hbs', "hbs", `hbs and identifier tails like stubhbs`), extracted as hasHbsTaggedTemplate() with unit coverage. Gates: tsc clean, vitest full suite green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Jun 13, 2026
…228) Two independent regressions shipped in 0.0.66 broke the Ember dual-backend integration (emberjs/ember.js#21340). Both root-caused by bisect against the Ember GXT suite (each: 266 fail, Helpers: 666 fail under 0.0.66; 0/0 here). 1. Frame mode (#226) wrongly engaged for Ember hosts. frameHostHooksInstalled() detected the host via three globalThis.__gxt* slots, but the Ember integration migrated exactly those channels off globalThis into registerHostHooks (HOST_HOOKS module-local table). Worse, HOST_HOOKS is duplicated across entry chunks, so even a direct HOST_HOOKS probe from the frame-gate chunk sees an empty copy. Fix: registerHostHooks sets a single cross-instance globalThis sentinel (__gxtHostHooksInstalled) — restoring the cross-module-instance visibility the legacy __gxt* slots had — and frameHostHooksInstalled checks it (plus the legacy slots for pre-API hosts). Frame mode stays ON for standalone consumers; Ember bails to v1. 2. The drain-overhead diet (#227) broke the Ember formula-bridge reactivity (stale values, wrong arg order) despite its "semantics unchanged" claim. Reverted pending a re-attempt with the Ember integration suite as a gate — it was a modest constant-factor refactor, no functional dependency. Validated against the full Ember GXT suite (both probes and gates): the six affected suites (each/Helpers/dynamic-component/strict-mode/engine/rehydration) return to 0 failures. gxt's own suite: 3905 functional tests pass. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Jun 15, 2026
Two independent regressions shipped in 0.0.66 broke the Ember dual-backend integration (emberjs/ember.js#21340). Both root-caused by bisect against the Ember GXT suite (each: 266 fail, Helpers: 666 fail under 0.0.66; 0/0 here). 1. Frame mode (#226) wrongly engaged for Ember hosts. frameHostHooksInstalled() detected the host via three globalThis.__gxt* slots, but the Ember integration migrated exactly those channels off globalThis into registerHostHooks (HOST_HOOKS module-local table). Worse, HOST_HOOKS is duplicated across entry chunks, so even a direct HOST_HOOKS probe from the frame-gate chunk sees an empty copy. Fix: registerHostHooks sets a single cross-instance globalThis sentinel (__gxtHostHooksInstalled) — restoring the cross-module-instance visibility the legacy __gxt* slots had — and frameHostHooksInstalled checks it (plus the legacy slots for pre-API hosts). Frame mode stays ON for standalone consumers; Ember bails to v1. 2. The drain-overhead diet (#227) broke the Ember formula-bridge reactivity (stale values, wrong arg order) despite its "semantics unchanged" claim. Reverted pending a re-attempt with the Ember integration suite as a gate — it was a modest constant-factor refactor, no functional dependency. Validated against the full Ember GXT suite (both probes and gates): the six affected suites (each/Helpers/dynamic-component/strict-mode/engine/rehydration) return to 0 failures. gxt's own suite: 3905 functional tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lifeart
force-pushed
the
glimmer-next-fresh
branch
from
July 4, 2026 10:11
78a9661 to
bfee346
Compare
This was referenced Oct 11, 2026
Merged
lifeart
force-pushed
the
glimmer-next-fresh
branch
from
October 13, 2026 09:08
68874e5 to
8679ee1
Compare
This was referenced Oct 13, 2026
lifeart
force-pushed
the
glimmer-next-fresh
branch
from
October 25, 2026 14:49
bc3fda9 to
2d71e91
Compare
lifeart
force-pushed
the
glimmer-next-fresh
branch
from
November 6, 2026 01:43
5d48546 to
e4f2cd0
Compare
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 6, 2026
In the Ember dialect a component's named args are emitted as
`$_args({ key: () => value }, …)`, where reactive values are zero-arg
getters the arg-access layer (ArgProxyHandler / the DEV $_args getter)
invokes on read. The layer historically invoked ANY function-valued arg,
so it could not tell a compiler-emitted reactive getter apart from a
function that is itself the arg value — a host-forwarded action or a
{{fn}}/helper bound result. Those got invoked on every read
(emberjs/ember.js#21340, "Components test: contextual components ::
renders with dot path and updates attributes": 4/8/15/22 instead of
1/1/2/3).
The compiler now wraps the reactive getters it emits in buildArgsObject
with `$_argThunk`, and the arg layer invokes ONLY branded thunks; every
other function value passes through unchanged. The marker is a plain
string-keyed property (like `$_nt`), minification-proof; `isArgThunk` is
exported so a host can retire its `fn.length`/`fn.prototype` shape
heuristic.
Gated to the Ember dialect (WITH_EMBER_INTEGRATION + IS_GLIMMER_COMPAT_MODE):
that is the only layer that forwards bare function values into gxt args,
so standalone gxt keeps byte-identical codegen and its
invoke-every-getter arg semantics.
- src/core/dom.ts: $_argThunk / isArgThunk; brand-only invocation in
ArgProxyHandler + the DEV $_args getter (gated).
- compiler: emit $_argThunk around reactive arg getters (reactiveGetter /
zero-arg arrow / $__cached memoized getter) in buildArgsObject.
- register ARG_THUNK in both symbol registries, GXT_RUNTIME_SYMBOLS.
- tests: emission + gate + runtime predicate + AOT auto-import guard.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 6, 2026
A dynamic modifier whose name is a `this.*` path was emitted as a plain member read (`$s.dyn`). On an EmberObject with a non-@Tracked `dyn` that read taps no tag, so the modifier formula is treated as const and a later `set(ctx, 'dyn', X)` never re-installs the modifier — it is never destroyed/created. Under EMBER_PROPERTY_TAGS the modifier-name path now goes through the same `$__tag(obj, "key")` chain as a value path (buildPathExpression → buildEmberMemberChain), so resolution is reactive. Standalone keeps the plain read. Unblocks the native emberjs/ember.js#21340 test "Basic Custom Modifier Manager: 3.22 :: destroys a dynamic modifier that was set after the initial render". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 6, 2026
The compiler reduced a thrown parse error to a one-line `message`
(`parseError.message.split('\n')[0]` + token/expected hints) and
discarded the original, so a host could only re-wrap the reduced string,
losing the `@glimmer/syntax` SyntaxError's code-frame and position. Both
the compiler and the Ember host pin the same `@glimmer/syntax`, so the
original error's message/code-frame/position already match what the host
would produce.
Preserve it on `CompilerError.originalError` (threaded through
`enrichError` from all three catch branches) so the host can rethrow it
unchanged when there is a single error. Synthesized diagnostics (unknown
binding, W-codes) leave it undefined.
Unblocks the emberjs/ember.js#21340 compile-time error group
(`compile errors` + `general syntax errors`, ~21 tests) once the Ember
host rethrows `originalError`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 6, 2026
`(mut this.foo)` / `(mut @bar)` pass the path as a string the host parses to build a setter, but a lexical JS head (`state.arg1`, a block param) cannot be resolved by name at runtime, so it was dropped and the host's `mut` asserted "You can only pass a path to mut". A lexical-head mut (head is a known binding, dotted tail) now lowers to the existing `(mut (get obj key))` machinery — `__mutGet(() => head, "rest")` — a parent getter + key the host writes through with `set(parent, key, v)`. The parent getter is buildValue's own read of the head, so it yields the real parent object whatever the binding's compiled shape, and a dotted tail is passed as __mutGet's dotted key. this./@ heads and non-compat builds are unchanged. Mirrored in the SubExpression (visitors/index.ts) and mustache (visitors/mustache.ts) handlers. Unblocks the emberjs/ember.js#21340 tests "Helpers test: {{fn}} :: can be used on the result of `mut`" and its "… with a falsy value" variant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 6, 2026
The `(mut <lexical path>)` lowering from the previous commit built its
`__mutGet` helper with
`helper('__mutGet', [parentGetter, literal(restKey)], range, pathRange)`,
omitting the `named` Map argument. `range` (a SourceRange) therefore landed
in the `named: Map<string, SerializedValue>` slot, so at serialize time
`value.named.values()` threw (reported as compile error E001) and the three
lexical-head lowering tests in mut-lexical-head.test.ts failed with a stray
errors entry. It is also a `tsc` type error (TS2345: SourceRange not
assignable to Map), which failed the `tsc &&` step of `pnpm dev:playwright`,
so the Playwright webServer could not start (exit code 2) — the same root
cause.
Pass `new Map()` as the named args, matching the sibling `(mut (get obj key))`
__mutGet calls, in both the SubExpression (index.ts) and mustache (mustache.ts)
handlers.
Part of the fix for the emberjs/ember.js#21340 tests "Helpers test:
{{fn}} :: can be used on the result of `mut`" and its "… with a falsy
value" variant.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 6, 2026
DRAFT. The root template is built detached and inserted only after the whole template evaluates, so an in-element whose destination is a sibling rendered earlier in the same render (document.getElementById) sees null and the host's _emberInElement asserts. gxt already defers in-element to the mount hook for the native runtime, but the Ember compat path resolves the destination during build, so the fix must make the root render stream nodes into their parent as they are built. This commit adds the target-behaviour regression spec as todos; the streaming implementation is described in the PR and relies on CI / the emberjs/ember.js#21340 test "[integration] jit :: Application test: debug render tree :: in-element in tree" for validation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 6, 2026
…ction Adds `HOST_HOOKS.onCellRead(object, key)`, fired from the property-tag tap `$__tag` for every reactive read of an object/function head — the compiler-emitted equivalent of Glimmer's "consumed tags". A host snapshots the (object, key) pairs read during a render pass and raises the backtracking assertion when a later non-tracked set() dirties one of them — detection compat silently lost for Glimmer (template-only) components, whose reads were never recorded (manager.ts checkBacktracking only fired for template-rendered objects, which handleCustomManagedComponent never populated). Scope: this is the gxt-side SEAM only. It is hook-presence gated (a single branch, zero-cost when absent) and installed only by a DEBUG host, so it is a no-op for standalone gxt and every existing test. The snapshot + assertion logic lives Ember-side and is validated there; the three emberjs/ember.js#21340 backtracking tests that never see the assertion ("Components test: curly components :: when a shared dependency is changed during children's rendering", "Components test: dynamic components :: component helper emits useful backtracking re-render assertion message" and "Components test: template-only components (glimmer components) :: asserts when a shared dependency is changed during rendering, and keeps original context") go green once the Ember consumer lands and pins a gxt release carrying this hook. Fired before the getProp delegation so the read is captured whichever tag path runs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 6, 2026
gxt rewrote `@index` to `@identity` at compile time (W003), so the list
keyed rows by VALUE and a reorder moved/re-created rows — `@index` yielded
the wrong index and nodes "changed" on reorder. Now:
- compiler (serializers/control.ts normalizeEachKey): emit `@index`
verbatim, drop the `@index -> @identity` rewrite + W003.
- runtime (control-flow/list.ts):
- setupKeyForItem: `@index` keys each row by its POSITION, so a reorder
leaves every key in place — the diff keeps (never moves) the row node
and rebindReusedRow updates its bound item.
- the index block param is a const formula equal to the row's fixed
position (not the bound item's current position).
- exclude `@index` from the property-name stale-key eviction (a
positional key has no `item['@index']`, which would wrongly evict
every reused row on reorder).
Standalone gxt has no body-proxy, so a reused row's displayed item only
updates through the host `rebindEachItem` seam (fired here); node identity
+ positional index are the standalone-observable core. tests: compiler
passthrough + runtime (nodes stay vs @identity moves, positional index,
rebind seam fires).
For the emberjs/ember.js#21340 tests "[integration] jit :: Updating ::
The each helper yields the index of the current item current item when
using the @index key" and the native "Syntax test: {{#each}} keys and DOM
identity :: @key keys items by position".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 6, 2026
Native `{{#each-in obj key=KEY}}` forwarded `key=` but it was resolved
against the lowered `[key,value]` PAIR, so `@key`/path keys resolved to
`undefined` (rows collapsed) and `@index` degraded to `@identity`. Now:
- compiler (visitors/block.ts + serializers/value.ts): a non-identity
`key=` is forwarded to `$__eachIn(obj, "key")`, and the lowered `each`
keys by `@identity` on the returned pairs ($__eachIn owns the keying).
`@identity`/default stays the historic 1-arg `$__eachIn(obj)`.
- runtime (helpers/each-in.ts): `$__eachIn(obj, key)` resolves the key
against each ENTRY (Glimmer toEachInIterator / Ember keyEachInEntries):
`@identity` keys by the entry (value change → new pair → new row);
`@key`/`@index`/path key by the entry key / position / resolved path
value, retaining the pair and updating its value in place while the row
key is unchanged. Per-mode caches keyed by the row key directly (object
or primitive, by reference — no String() collapse) so distinct key modes
over one object don't clobber.
Standalone gxt observes the KEYING (which rows kept/recreated); the
retained row's displayed value re-reads through the host body-proxy
(Ember), validated there. tests: unit ($__eachIn per-mode stability +
in-place update), compiler (key forwarding), render (native: path key
retains the row node on same-id replace vs @identity recreates).
For the five native emberjs/ember.js#21340 tests of "Syntax test:
{{#each-in}} with the key option" (the default value key, key="@key",
key="@index", a path key, and key="@index" over a Map keyed by objects).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
force-pushed
the
glimmer-next-fresh
branch
from
November 13, 2026 07:23
a31347d to
2e5f452
Compare
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 17, 2026
…, mut lexical head (#273) * fix(modifier): tap property tag for dynamic this.* modifier names A dynamic modifier whose name is a `this.*` path was emitted as a plain member read (`$s.dyn`). On an EmberObject with a non-@Tracked `dyn` that read taps no tag, so the modifier formula is treated as const and a later `set(ctx, 'dyn', X)` never re-installs the modifier — it is never destroyed/created. Under EMBER_PROPERTY_TAGS the modifier-name path now goes through the same `$__tag(obj, "key")` chain as a value path (buildPathExpression → buildEmberMemberChain), so resolution is reactive. Standalone keeps the plain read. Unblocks the native emberjs/ember.js#21340 test "Basic Custom Modifier Manager: 3.22 :: destroys a dynamic modifier that was set after the initial render". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(compile): keep the original SyntaxError on CompilerError The compiler reduced a thrown parse error to a one-line `message` (`parseError.message.split('\n')[0]` + token/expected hints) and discarded the original, so a host could only re-wrap the reduced string, losing the `@glimmer/syntax` SyntaxError's code-frame and position. Both the compiler and the Ember host pin the same `@glimmer/syntax`, so the original error's message/code-frame/position already match what the host would produce. Preserve it on `CompilerError.originalError` (threaded through `enrichError` from all three catch branches) so the host can rethrow it unchanged when there is a single error. Synthesized diagnostics (unknown binding, W-codes) leave it undefined. Unblocks the emberjs/ember.js#21340 compile-time error group (`compile errors` + `general syntax errors`, ~21 tests) once the Ember host rethrows `originalError`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(mut): support a lexical head in (mut path) via __mutGet `(mut this.foo)` / `(mut @bar)` pass the path as a string the host parses to build a setter, but a lexical JS head (`state.arg1`, a block param) cannot be resolved by name at runtime, so it was dropped and the host's `mut` asserted "You can only pass a path to mut". A lexical-head mut (head is a known binding, dotted tail) now lowers to the existing `(mut (get obj key))` machinery — `__mutGet(() => head, "rest")` — a parent getter + key the host writes through with `set(parent, key, v)`. The parent getter is buildValue's own read of the head, so it yields the real parent object whatever the binding's compiled shape, and a dotted tail is passed as __mutGet's dotted key. this./@ heads and non-compat builds are unchanged. Mirrored in the SubExpression (visitors/index.ts) and mustache (visitors/mustache.ts) handlers. Unblocks the emberjs/ember.js#21340 tests "Helpers test: {{fn}} :: can be used on the result of `mut`" and its "… with a falsy value" variant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(mut): pass the named-args Map to __mutGet for a lexical head The `(mut <lexical path>)` lowering from the previous commit built its `__mutGet` helper with `helper('__mutGet', [parentGetter, literal(restKey)], range, pathRange)`, omitting the `named` Map argument. `range` (a SourceRange) therefore landed in the `named: Map<string, SerializedValue>` slot, so at serialize time `value.named.values()` threw (reported as compile error E001) and the three lexical-head lowering tests in mut-lexical-head.test.ts failed with a stray errors entry. It is also a `tsc` type error (TS2345: SourceRange not assignable to Map), which failed the `tsc &&` step of `pnpm dev:playwright`, so the Playwright webServer could not start (exit code 2) — the same root cause. Pass `new Map()` as the named args, matching the sibling `(mut (get obj key))` __mutGet calls, in both the SubExpression (index.ts) and mustache (mustache.ts) handlers. Part of the fix for the emberjs/ember.js#21340 tests "Helpers test: {{fn}} :: can be used on the result of `mut`" and its "… with a falsy value" variant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 17, 2026
…272) In the Ember dialect a component's named args are emitted as `$_args({ key: () => value }, …)`, where reactive values are zero-arg getters the arg-access layer (ArgProxyHandler / the DEV $_args getter) invokes on read. The layer historically invoked ANY function-valued arg, so it could not tell a compiler-emitted reactive getter apart from a function that is itself the arg value — a host-forwarded action or a {{fn}}/helper bound result. Those got invoked on every read (emberjs/ember.js#21340, "Components test: contextual components :: renders with dot path and updates attributes": 4/8/15/22 instead of 1/1/2/3). The compiler now wraps the reactive getters it emits in buildArgsObject with `$_argThunk`, and the arg layer invokes ONLY branded thunks; every other function value passes through unchanged. The marker is a plain string-keyed property (like `$_nt`), minification-proof; `isArgThunk` is exported so a host can retire its `fn.length`/`fn.prototype` shape heuristic. Gated to the Ember dialect (WITH_EMBER_INTEGRATION + IS_GLIMMER_COMPAT_MODE): that is the only layer that forwards bare function values into gxt args, so standalone gxt keeps byte-identical codegen and its invoke-every-getter arg semantics. - src/core/dom.ts: $_argThunk / isArgThunk; brand-only invocation in ArgProxyHandler + the DEV $_args getter (gated). - compiler: emit $_argThunk around reactive arg getters (reactiveGetter / zero-arg arrow / $__cached memoized getter) in buildArgsObject. - register ARG_THUNK in both symbol registries, GXT_RUNTIME_SYMBOLS. - tests: emission + gate + runtime predicate + AOT auto-import guard. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 17, 2026
gxt rewrote `@index` to `@identity` at compile time (W003), so the list
keyed rows by VALUE and a reorder moved/re-created rows — `@index` yielded
the wrong index and nodes "changed" on reorder. Now:
- compiler (serializers/control.ts normalizeEachKey): emit `@index`
verbatim, drop the `@index -> @identity` rewrite + W003.
- runtime (control-flow/list.ts):
- setupKeyForItem: `@index` keys each row by its POSITION, so a reorder
leaves every key in place — the diff keeps (never moves) the row node
and rebindReusedRow updates its bound item.
- the index block param is a const formula equal to the row's fixed
position (not the bound item's current position).
- exclude `@index` from the property-name stale-key eviction (a
positional key has no `item['@index']`, which would wrongly evict
every reused row on reorder).
Standalone gxt has no body-proxy, so a reused row's displayed item only
updates through the host `rebindEachItem` seam (fired here); node identity
+ positional index are the standalone-observable core. tests: compiler
passthrough + runtime (nodes stay vs @identity moves, positional index,
rebind seam fires).
For the emberjs/ember.js#21340 tests "[integration] jit :: Updating ::
The each helper yields the index of the current item current item when
using the @index key" and the native "Syntax test: {{#each}} keys and DOM
identity :: @key keys items by position".
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 17, 2026
Native `{{#each-in obj key=KEY}}` forwarded `key=` but it was resolved
against the lowered `[key,value]` PAIR, so `@key`/path keys resolved to
`undefined` (rows collapsed) and `@index` degraded to `@identity`. Now:
- compiler (visitors/block.ts + serializers/value.ts): a non-identity
`key=` is forwarded to `$__eachIn(obj, "key")`, and the lowered `each`
keys by `@identity` on the returned pairs ($__eachIn owns the keying).
`@identity`/default stays the historic 1-arg `$__eachIn(obj)`.
- runtime (helpers/each-in.ts): `$__eachIn(obj, key)` resolves the key
against each ENTRY (Glimmer toEachInIterator / Ember keyEachInEntries):
`@identity` keys by the entry (value change → new pair → new row);
`@key`/`@index`/path key by the entry key / position / resolved path
value, retaining the pair and updating its value in place while the row
key is unchanged. Per-mode caches keyed by the row key directly (object
or primitive, by reference — no String() collapse) so distinct key modes
over one object don't clobber.
Standalone gxt observes the KEYING (which rows kept/recreated); the
retained row's displayed value re-reads through the host body-proxy
(Ember), validated there. tests: unit ($__eachIn per-mode stability +
in-place update), compiler (key forwarding), render (native: path key
retains the row node on same-id replace vs @identity recreates).
For the five native emberjs/ember.js#21340 tests of "Syntax test:
{{#each-in}} with the key option" (the default value key, key="@key",
key="@index", a path key, and key="@index" over a Map keyed by objects).
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
lifeart
added a commit
to lifeart/glimmer-next
that referenced
this pull request
Nov 17, 2026
…ction (#275) Adds `HOST_HOOKS.onCellRead(object, key)`, fired from the property-tag tap `$__tag` for every reactive read of an object/function head — the compiler-emitted equivalent of Glimmer's "consumed tags". A host snapshots the (object, key) pairs read during a render pass and raises the backtracking assertion when a later non-tracked set() dirties one of them — detection compat silently lost for Glimmer (template-only) components, whose reads were never recorded (manager.ts checkBacktracking only fired for template-rendered objects, which handleCustomManagedComponent never populated). Scope: this is the gxt-side SEAM only. It is hook-presence gated (a single branch, zero-cost when absent) and installed only by a DEBUG host, so it is a no-op for standalone gxt and every existing test. The snapshot + assertion logic lives Ember-side and is validated there; the three emberjs/ember.js#21340 backtracking tests that never see the assertion ("Components test: curly components :: when a shared dependency is changed during children's rendering", "Components test: dynamic components :: component helper emits useful backtracking re-render assertion message" and "Components test: template-only components (glimmer components) :: asserts when a shared dependency is changed during rendering, and keeps original context") go green once the Ember consumer lands and pins a gxt release carrying this hook. Fired before the getProp delegation so the read is captured whichever tag path runs. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Nov 17, 2026
Adds the two GXT flavors next to the classic build, without changing the classic one: - `EMBER_RENDER_BACKEND=gxt` (rollup) / `GXT_MODE=true` (vite): the compat backend. A shared alias table (scripts/gxt-alias-map.mjs) swaps the @glimmer/* reactivity and manager packages for the gxt-backend shims and drops the Glimmer VM packages from the dist. `@glimmer/tracking` is not aliased: it is metal's `tracked` / `cached` in every build. - `EMBER_RENDER_BACKEND=gxt-native`: the native layer. Classic Ember source with `__GXT_MODE__ = false`; only the modules that touch the Glimmer VM are aliased to gxt-backend/native (same table, native section), and templates compile with the gxt compiler. `__GXT_MODE__` / `__GXT_CLASSIC_COMPONENTS__` are build-time constants (scripts/replace-build-constant.mjs, declared in types/gxt-ambient.d.ts) that both bundlers inline, so classic dists fold every GXT branch away. Other pieces: `@lifeart/gxt` pinned to exactly 0.0.86 as a root devDependency (ember-source does not install it; only the GXT packages declare it), playwright for the GXT browser tests, the bundle-size check and budgets (with a guard against GXT code left live in the classic dist), and the compat package assembler (scripts/build-gxt-package.mjs). Production dists keep only the `@__PURE__`-style and license comments (rollup `shouldPrintComment`). gxt-backend and @glimmer/component-gxt are linted and type-checked with the rest of the repo: `pnpm lint`, with overrides scoped to the two trees (barrel imports are allowed there, because the alias map matches exact specifiers; an empty catch block is an error), and both root tsc programs (tsconfig `paths` for the specifiers the trees use that no workspace link provides; the stable-decorators program leaves out one test of legacy-only decorator forms). The published types still leave the two trees out. The compat test configs compile templates with Glimmer's whitespace rules (gxt's EMBER_WHITESPACE flag), so a template's text is Glimmer's; the gxt compiler imports decorator-transforms' runtime itself, so a decorated .gjs module needs no `dt7948` global; a test module the gxt compiler cannot compile becomes a failing synthetic module instead of a page that fails to load. On top of main's build: the classic test build keeps main's `treeshake: false`; `@glimmer/component` resolves to its source in the GXT configs; the compat package's renamed-modules map leaves out main's internal mixin copies (`*-internal.js`), as packageMeta does. The per-fix history, including the lint and type-check coverage (5174ffe), is on lifeart:gxt-pre-squash-b1bf210aef. Folded in after the squash: the native forbidden list also covers the compat Glimmer host modules, and the bundle budgets are re-baselined (at the measured floor + 5%) after the GXT leftovers left the classic dist. The history of these follow-ups is on lifeart:gxt-followups. Folded in with the second squash: `@lifeart/gxt` pinned to 0.0.89 (by way of 0.0.87 and 0.0.88); the classic-dist guard reads the live gxt-bridge calls from the babel AST of each dist file (scripts/dist-ast.mjs, shared with assert-native-dist); the gxt-native dist leaves out the Glimmer wire-format compiler entries, and its budget is re-baselined; the vite configs resolve `@lifeart/gxt/item-references`; the compat build compiles an app's `{{outlet}}` with gxt's EMBER_OUTLET flag and Ember's own templates with the gxt compiler under the compat runtime-compile flags (COMPAT_TEMPLATE_FLAGS), and only the runtime-compilation entries load the gxt runtime compiler. The history of these commits is on lifeart:gxt-pre-squash2-2063496034. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
packages/@ember/-internals/gxt-backend renders Ember with glimmer-next
(@lifeart/gxt) instead of the Glimmer VM:
- compile.ts / ast-transforms.ts: the Ember template dialect on the gxt
compiler (runtime `precompileTemplate`, `plugins.ast`, the Ember keyword
helpers) and the gxt runtime patches the dialect needs. A template the gxt
compiler cannot compile throws with gxt's message (Glimmer's exact error
text is not a goal);
- manager.ts / ember-gxt-wrappers.ts / helper-manager.ts: component, helper
and modifier managers (classic curly components behind
`__GXT_CLASSIC_COMPONENTS__`), the `$_tag` / `$_maybeHelper` / `$_dc`
wrappers compiled templates call;
- validator.ts / reference.ts / destroyable.ts (+ the `-vm-compat` test
surfaces): @glimmer/validator, /reference and /destroyable on gxt cells,
including main's standalone `trackedValue` on the shim's tags;
- gxt-bridge.ts: the side-effect-free registry the classic packages reach
the backend through, so classic builds never load it. Its glimmer-host
slot is filled by glimmer-host.ts with the GXT code of the glimmer
package: the root template (root-template.ts), `renderComponent` and the
debug render tree (render-component.ts), the classic roots' render,
destruction, bounds and forced re-render (classic-roots.ts) and the
template adapter (template-adapter.ts);
- outlet.ts: route outlets. Main renders routes through route managers and a
`RootOutlet` component; the compat backend keeps its own outlet machinery
(the `<ember-outlet>` element, the root template's outlet path) driven by
the `{ render, outlets }` chain that `Route#setup` records through the
bridge's route-outlet hooks, and invokes any other route manager's wrapper
as main's outlet does.
Also @glimmer/component-gxt and the backend's own QUnit tests (__tests__),
which run on the GXT test page.
Main fixes since the first version of this series, each with a test:
- No re-render loops: reading a helper's value no longer writes reactive
state (helper args follow Glimmer's args proxy), and (hash)/(array)
arguments keep one identity while their members do not change.
- Reactivity: every write to a @Tracked property re-renders (a gxt cell
accessor no longer shadows the tracked one); a trackedArray changed in
place, a property dirtied with dirtyTagFor and a cell written in a
modifier's install all render by the end of the run loop; creating a
binding evaluates its expression once; Glimmer component arguments, (mut),
(readonly), dependent keys through arguments and createCache follow what
they read; a render asserts when it writes a tracked value it already read.
- Instances: one helper instance per call site and render scope; one
component instance per invocation (custom-managed and classic); each
modifier on an element has its own instance; components, modifiers and
helpers are destroyed with the block that rendered them, in node order, in
the run loop that removes it.
- Rendering: attributes are not arguments and reach a component only through
`...attributes`, with Glimmer's precedence; a null/undefined/false
attribute or class is removed; URL attributes use Glimmer's own
sanitization; a <template> component invoked by name, a class with a
class-body template and a class with a registered template render through
their component manager, with blocks, block params and `...attributes`; a
content mustache renders what its value is (text, node, component, helper,
curried value) and keeps its component while the curried value stays;
dynamic components follow their definition; {{#each}} rows, {{#each-in}}
keys, {{#in-element}}, SVG namespaces, named and else blocks, {{log}} and
{{debugger}} behave as in Glimmer.
- renderComponent: a root updates in place instead of being rendered again
on every tag change, is a root of its owner's renderer, renders into a
cursor, an <svg> or with a custom-managed plain-object definition, and is
part of the debug render tree.
- Errors: no error is swallowed any more. A render throws only its own
errors, an update's errors (its hooks, a new branch's component, the DOM
sync at the end of a run loop) reach the code that ran the run loop, and
empty catch blocks are gone.
- Lint and type-check clean (ESLint 376 -> 0, tsc 497 -> 0 problems); the two
vitest files became QUnit modules on the GXT test page.
The per-fix history, including the lint/type-check work and the moves of
gated code from the glimmer package into the host modules
(5ec62d6..b1bf210), is on lifeart:gxt-pre-squash-b1bf210aef.
Folded in after the squash: the GXT `template()` of @ember/template-compiler
(template-function.ts), the GXT re-render trigger and dependent recompute of
metal's property events (property-events.ts), the GXT parts of Route#refresh,
Route#setup and didTransition (outlet hooks), the view-tree rebuild of
getRootViews / getChildViews and a classic root's GXT render state
(classic-roots.ts) moved here from the classic files.
The history of these follow-ups is on lifeart:gxt-followups.
Also folded in after the third rebase onto main: a loose-mode
`{{attrs.x}}` raises Ember's assert-against-attrs assertion with its
source location; `{{debugger}}` in a template-only component sees the
template-only self through the render proxy; a `(fn ...)` result passed
to a helper is not invoked early; a helper recomputes when an EmberArray
argument changes in place; a custom modifier whose install throws keeps
the DOM already rendered (the error is rethrown after insert, as Glimmer
does). Their history is on lifeart:gxt-ember-easy-fixes and
lifeart:gxt-ember-hard-fixes.
Adapted in the rebase onto main 493985e, where a rendering test
renders its template through a Glimmer root (`BaseRenderer#render`) and
`Evented` is deprecated:
- a root of `BaseRenderer#render` renders through the glimmer host's
`renderRoot`, at its cursor and without renderComponent's clear,
replace and dedupe bookkeeping, and is returned to the caller;
- a classic component's lifecycle events are sent as Glimmer's curly
manager sends them (`sendCoreViewEvent`: the listeners, then the
method), without the `Evented#trigger` deprecation: the innermost of
the backend's per-instance `trigger` wrappers sends a dispatch the
backend marks, and an instance without a wrapper gets it directly; a
`trigger` call from user code, also one inside a hook, stays the
deprecated method;
- a component root gets the context cells of a classic root, so its
function-valued and ArrayProxy-valued properties re-render when set;
- a component root renders inside a render pass, so a write of a value
it already read raises the backtracking assertion;
- an error of a component root's commit phase (a modifier's install)
keeps the render and is rethrown once the render is complete;
- backtracking messages label a component root `{ROOT}` and a classic
root `-top-level`;
- a classic component destroyed with its block runs willDestroyElement
while its element is still in the document;
- the arguments of an internal component detect `(mut)` and `(readonly)`
values without reading other properties of an argument's value;
- a root whose first render failed stays in its renderer until the
renderer is destroyed;
- the backend's tests run main's deprecated `A()` and
`ObjectProxy.create` inside `ignoreDeprecation`.
Folded in with the second squash (their tests are in the test commit):
- a cache keeps its tag when it consumes the same tags again; a
custom-managed component reads its changed arguments; in development, a
write of a member that a Glimmer component's template read asserts;
- the regexes and hand-rolled scanners over template source are AST
transforms (ast-transforms.ts) and value checks: a runtime template's
explicit `this`, the implicit form's free variables, block params named
like keywords, block keywords the scope shadows, dotted paths checked
against the block params in scope, in-element fallback destinations,
strict-mode scope names, the each-in and dynamic-variable lowerings, the
cells that own an `{{#each}}` list, argument names that start with
`Symbol`, `<LinkTo>` and `<Textarea>` known by identity, and scope names
written as string literals; the dead `curly-c-` branches are removed;
- with gxt 0.0.87 and 0.0.88: only the argument getters gxt's compiler
brands are called, and any other function is the value; lists keyed by
position keep their rows and show the items now at them, also through
yielded blocks and classic components, with the argument pass run again;
a two-way bound argument is written where Glimmer writes it, from the
source gxt's compiler gives it (arg-sources.ts); a classic component class
in a strict template's scope is a classic component;
- with gxt 0.0.89: gxt's argument-source helpers are imported by name; a
compat app built from source renders its routes and its links; Ember's
own templates are compiled at build time (templates.gts); the render layer
reads gxt's runtime compiler through a seam (runtime-compiler-seam.ts)
that only the entries an app compiles templates through at runtime
install.
The history of these commits is on lifeart:gxt-pre-squash2-2063496034.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gxt-backend/native replaces only the Ember modules that touch the Glimmer VM
(renderer, outlet, managers, validator / reference / destroyable, template
factories, runtime helpers) with gxt-native implementations; everything else
is classic Ember source built with `__GXT_MODE__ = false`.
Main renders routes through route managers. Native aliases
`route-managers/root-outlet` to native/root-outlet.ts: the root outlet state
holds a native `OutletView` whose levels are live views of main's
`OutletState`s (owner, controller, tracked context as `@model`, the route
template looked up once per route bucket), and `renderComponent` renders a
`RootOutlet` through the owner's `appendOutletView`. The classic route
wrapper and the classic route manager's `RouteTemplate` (both Glimmer VM
internal components) are plain records, the route-manager registry asserts
through `@ember/debug` instead of `@glimmer/global-context`, `base-renderer`
maps to the native renderer, and owners with live roots are listed in main's
`renderers` list for `captureRenderTree`. Like main, the root outlet adds no
render-tree node.
Packaging: scripts/build-gxt-native-package.mjs and
scripts/gxt-native-package (ember-source-gxt-native, which pins the root's
exact @lifeart/gxt), assert-native-dist (the VM-free dist check), and the
modern-app bundle/boot harness (scripts/bundle-modern-app*.mjs,
smoke-tests/modern-app) plus the packaged consumer smoke test
(smoke-tests/gxt-native-package). Following main: the package and the
harness's dist snapshots carry ember-source's `sideEffects`;
@glimmer/component builds a dev and a prod dist of its own, and the package,
the preset and the dist assertion pick the one of the mode; the consumer app
compiles for main's browser targets (lib/browsers.cjs), so its bundle stays
byte-identical to the harness measurement; the renamed-modules map leaves out
main's internal mixin copies (`*-internal.js`), as packageMeta does.
Main fixes since the first version of this series:
- Decorated .gjs/.gts components boot in a consumer app: the package's vite
preset makes gxt's decorator output import decorator-transforms' runtime
instead of reading a `dt7948` global nothing installs.
- URL attributes are sanitized with Glimmer's own rules; a bound attribute
that is a property of its element is set through the property, and a
null/undefined one is removed.
- A component without a template yields its block (Glimmer's default
`{{yield}}` template), and the nearest template of a class chain wins,
registered or class-body.
- Retained memory per row: a call site without named arguments keeps one
shared empty hash instead of the fresh `{}` gxt passes on every
evaluation, and an element modifier is a class instance instead of two
closures over its state.
- `{{debugger}}` calls Glimmer's debugger callback; the package build warns
about a local gxt only when there is one.
The per-fix history is on lifeart:gxt-pre-squash-b1bf210aef.
Folded in after the squash: assert-native-dist knows the compat Glimmer host
modules.
The history of these follow-ups is on lifeart:gxt-followups.
Also folded in after the third rebase onto main: `{{get}}` reads
properties of primitives (Glimmer's `isDict`); `{{hash}}` members are lazy
getters that stay reactive, with a custom tag for computed keys through
them; modifiers are destroyed child-first, in element-closing order; the
debug render tree names a renderComponent root `{ROOT}` and a component
bound through a strict-mode scope by its binding. Their history is on
lifeart:gxt-ember-easy-fixes.
Adapted in the rebase onto main 493985e: a root whose first render
failed is torn down and stays registered until its owner is destroyed;
the native rendering test case exposes the render root as `this.root`,
which main's tests destroy; a native test expects the deprecation of
main's `A()`.
Folded in with the second squash: a cache keeps its tag when it consumes
the same tags again; a helper call site is one object, and a context's
sites an array; one scheduled modifier-destroy flush per run loop; a route
template reads `@model` as the route's model; lists keyed by position use
gxt's item references, whose runtime the templates that need it install
(gxt 0.0.89), as a lists app shows (smoke-tests/modern-app/app-lists); the
package contract names every non-app entry the package does not ship;
assert-native-dist reads the dist through scripts/dist-ast.mjs; the
modern-app harness also builds the compat app from source and fails a
precompiled one whose closure holds a template compiler module
(`--assert-no-runtime-compiler`).
The history of these commits is on lifeart:gxt-pre-squash2-2063496034.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The places where classic Ember hands over to the compat backend. Every hook
is behind the build-time `__GXT_MODE__` constant and reaches gxt-backend only
through gxt-bridge, so the classic dists fold them away; the surrounding code
is main's.
- glimmer: base-renderer, renderer, templates/root.ts and unwrap-template.ts
call the bridge's glimmer host (gxt-backend's root template,
`renderComponent`, classic-root render / destroy / bounds, template
adapter) from whole `if (__GXT_MODE__)` blocks or a top-level ternary, and
assert that it is installed; a VM-free renderer state under GXT; GXT-aware
`template()`, internal components, Input, element helper,
scheduleRevalidate. root.ts keeps one side-effect-only import
(@glimmer/manager) that the native build's module order needs.
- metal: the single gxt cell behind `@tracked`, the GXT re-render trigger in
`notifyPropertyChange`, the CP re-entrancy guards, `set` hooks.
- routing: `Route#setup` / `teardownViews` record and drop the route's GXT
render state, `_setOutlets` renders through the GXT outlet machinery (and
skips main's incremental mid-transition passes, which have nothing new to
render there), QP / meta fixes; the classic route manager keeps a raw gxt
route template uninvoked, and the classic outlet component is registered
as the wrapper the GXT outlets render themselves.
- runtime / object / runloop / application / views / template-compiler:
smaller GXT hooks (observer flush budget, proxy unknownProperty during
renders, settled PromiseProxy fast path, view-tree rebuild, GXT
`template()`); `visit()` asserts that GXT supports neither the serialize
nor the rehydrate render mode.
One classic change: the `{{debugger}}` callback moves from the VM opcode
module to @glimmer/runtime/lib/debugger-callback.ts (the opcode module
re-exports `setDebuggerCallback` / `resetDebuggerCallback`), so a renderer
without the VM calls the same callback.
Main fixes since the first version of this series: the hooks no longer
swallow errors (an error of the DOM sync at the end of a run loop is thrown
from the run loop's last step instead of being dropped; `template()`'s
implicit scope keeps only the expected eval failures); a render throws only
its own render errors; `renderComponent` of a plain-object definition runs
its custom manager, and a root with a `hasSubOwner` manager renders with the
manager's owner; a Glimmer component used as a route template is created by
its manager. Most of the GXT code these hooks used to carry inline now lives
in gxt-backend (the moves were c741f0d..b1bf210 on
lifeart:gxt-pre-squash-b1bf210aef).
The per-fix history is on lifeart:gxt-pre-squash-b1bf210aef.
Folded in after the squash: the moves out of template-compiler, routing,
metal and views utils, and the removal of the classic leftovers (the
side-effect-only imports of renderer.ts, the input's GXT methods, the GXT
locals of ClassicRootState / set / tracked / ArrayProxy, barrel imports in
place of main's deep paths). The classic prod dist is main's plus the
`{{debugger}}` callback module and one alias line.
The history of these follow-ups is on lifeart:gxt-followups.
Adapted in the rebase onto main 493985e: main's rendering tests call
`BaseRenderer#render` directly, and under GXT it hands the render to the
glimmer host (`renderRoot`), as `renderComponent` does. `CoreView` stays
main's: gxt-backend sends the lifecycle events itself.
Folded in with the second squash: link-to.ts and textarea.ts register
`<LinkTo>` and `<Textarea>` with the compat backend in an
`if (__GXT_MODE__)` block (12 lines), so the backend knows them by
identity, not by `toString()`.
The history of this commit is on lifeart:gxt-pre-squash2-2063496034.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- scripts/gxt-test-runner: the Playwright + QUnit runner (one module per page load, baselines, smoke list, native allow-list and skips, contract tests, baseline gate; the gate's `--subset` mode compares only the modules a shard ran). `--shard` splits the sorted module list round-robin, and merge-runs.mjs merges the shard outputs into the summary an unsharded run writes, so CI gates the merged run and a baseline can be regenerated from it. The native allow-list follows main's test files; - index.html: the GXT test-page setup (behind `__GXT_MODE__`) on main's page; native.html: the gxt-native test page, which also runs main's `setupTestHelpers()` and loads QUnit by package name like index.html; - internal-test-helpers: GXT compile through the compat compiler, the GXT teardown harness (a module-level value, so classic test builds keep none of it; it throws what destroying a modifier or a helper throws), GXT artifact stripping in equalTokens / equalInnerHTML / qunit-dom `hasHtml`, GXT run helpers (`runTask` / `runAppend` sync the DOM after their run loop and rethrow its errors); the router test case exposes its root element to GXT; - integration-tests: the GXT rehydration delegate (two plain GXT renders, the server one not interactive; serialization-dependent tests skipped with a reason) on main's `RenderDelegate` / `RenderHandle` interface; the tests that check Glimmer VM internals (list-update steps, serialization markers, dynamic variables other than outletState) skipped under GXT with a reason; GXT marker comments (`<!---->`, curried-component boundaries) ignored by the assertions; the jit delegate makes a curried component the way the GXT `component` helper does; no empty component sub-modules under GXT. The per-fix history is on lifeart:gxt-pre-squash-b1bf210aef. Folded in after the squash: native-skip.json drops the entries that no longer match a test after the rebase onto main (tests main moved, rewrote or renamed). The history of these follow-ups is on lifeart:gxt-followups. After the third rebase onto main, which moved fragment-components-test.js into components/classic/ and renamed its module, the native allow-list names the new path and the module's 12 native-skip.json keys carry the new module name. Adapted in the rebase onto main 493985e: the rendering and router test cases render through main's Glimmer root, under GXT through `gxtHarness.runRender`, which keeps the semantics of `runAppend` (one render pass id, the DOM sync after the run loop and its errors), and `runAppend` starts a render pass for a classic `-top-level` root. Main's two new rehydration-stats tests of a curly-invoked Glimmer component are unsupported in the GXT delegate, as their classic siblings are. native-skip.json drops the 18 skips of tests that main rewrote from classic components to a custom-managed component under the same names, and two skip reasons name the `{ROOT}` label. The README's smoke counts are those of the rebased suite. Folded in with the second squash: the README's smoke counts, and native-skip.json follows main's rename of a debug render tree test. The history of these commits is on lifeart:gxt-pre-squash2-2063496034. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
GXT branches in shared tests (cache-counter parity, debug render tree,
resolver cache, helper registration through the runtime `hbs`), GXT skips
(hot reload, `{{mount}}`, classic `append`, the rehydration render mode, the
compile-options meta test), and renames that keep the names `array` and
`element` out of module scope in the single-chunk GXT test bundle.
New regression tests, which run on both backends, for the behaviours the
compat backend had wrong: has-block-params in nested blocks; the
(hash)/(array) identity tests (helpers/gxt-hash-array-identity-test.js,
because main rewrote array-test / hash-test as .gjs); attributes are not
arguments and URL attributes forwarded through `...attributes` are
sanitized, also on update (angle-bracket invocation, attribute bindings,
Input, LinkTo); a null/undefined/false attribute or class is removed and a
triple curly in an attribute renders its value (content-test); `<template>`
components invoked by name and classes with a class-body template
(template-tag-by-name-test.gjs, class-body-template-test.gjs,
template-tag-*-test.gjs); a `{{component}}` mustache passed as an argument
is curried; each `{{on}}` and each custom modifier on one element is its own
instance; renderComponent of a custom-managed plain-object definition, and a
root that updates in place, evaluates each binding once and throws only its
own errors. The named-outlets assertion test runs again (its method lacked
`@test`), with the column the compiler reports.
The rebase onto main keeps main's rewritten arranged-content tests, with the
`array` rename on top.
The per-fix history is on lifeart:gxt-pre-squash-b1bf210aef.
Adapted in the rebase onto main 493985e: contextual-components-test.js
is main's file plus this series' new test, and mount-test.js keeps the
GXT skip of the whole file around main's version; the runtime resolver
cache and template factory tests take main's expectations with GXT
branches (no root definition, one `-top-level` hit under the debug
render tree), and main's copies of the old tests in components/classic/
keep the GXT branches the old tests had; angle-bracket-invocation-test.js
imports `ClassicComponent` again for the two tests that use it.
Adapted in the rebase onto main 9ed2915 (RFC emberjs#1216, the classic
Component deprecation): append, attribute-bindings, runtime resolver
cache and template factory tests in components/classic/ take main's
deprecation-guarded files with this series' GXT branches re-applied
unchanged; the new button[formaction]/object[data] sanitization test
calls expectClassicComponentDeprecation() like main's other classic
component tests.
Folded in with the second squash: the tests of the fixes folded into the
compat backend and the native layer: a template's scope, keyword shadowing
and block params named like keywords, dotted paths, in-element
destinations, scope names, each-in forms, `{{#each}}` list paths, argument
names and built-in identity; the classic-dist guard's Node tests
(tests/node/dist-ast-test.cjs); nested and kept `{{#each-in}}` rows; rows
of a list keyed by position (what they yield and invoke, the components
they keep, type changes, each update hook once with the final arguments);
two-way bound arguments of each shape; functions passed to helpers; classic
component classes, curried or with only a layout, in a strict template's
scope. This series' classic component tests expect the ember-component
deprecation.
The history of these commits is on lifeart:gxt-pre-squash2-2063496034.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The GXT smoke (contract + sharded smoke modules, each shard gated against the compat baseline), dual-build, gxt-native (modern-app boot, package, native suite against its baseline) and full compat workflows. The full and native suites run in parallel shards (5 and 4), and a combine job merges them and gates the merged run with baseline-gate.mjs: the verdict is "no test red that the baseline lists green, no baseline module missing, no timeout or harness error", so known reds do not fail a run. The setup action's optional Playwright install; the ember-source-gxt scenarios and the v2 app template for them, whose boot smoke covers build-time .gjs components (forwarded attributes, blocks, a class-body template, set() on a plain field, decorators without a global) and compiles with Glimmer's whitespace rules. The per-fix history is on lifeart:gxt-pre-squash-b1bf210aef. Folded in with the second squash: the v2 app template pins the root's `@lifeart/gxt` (0.0.89); the gxt-native workflow also boots the lists app, the compat strict app built from source, gated with `--assert-no-runtime-compiler`, and the compat loose app, which compiles its templates at runtime. The history of these commits is on lifeart:gxt-pre-squash2-2063496034. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
test-results/gxt-baseline.json (compat, 10135/10376, 1037 modules) and native-baseline.json (native, 7190/7203, 684 modules), regenerated from the merged sharded runs of the GXT full and gxt-native workflows on this series rebased onto main; and docs-internal-gxt-packaging-design.md. Against the baselines before the rebase, every change comes from main or from the test files this series converted, and no test turned red: - main deleted the Enumerable and MutableEnumerable test modules, added `@each support`, `array computed macros deprecation` and (compat only) `DataAdapter releaseMethods`, all green, and changed the test or assertion counts of 17 existing modules in each suite (deprecation expectations, part of `EmberArray.@each support` moving to `@each support`, one more `Ember.A` test); - main renamed one known red, `custom ember array properties rerender when updated` in Helper Tracked Properties (its key now carries `@test` twice, so its name starts with `@test`); it is still red under compat; - the compat baseline gains the eight QUnit modules converted from vitest (`Compat: utils.ts` and its six children, `@glimmer/component-gxt: reactive identity`), all green. The second rebase onto main changes only main's five new tests of a cache's tag (emberjs#21664) in `@glimmer/validator: tracking > tracking cache`, which both suites run (QUnit also counts them in the parent module). Four are green. `it keeps its tag if it consumes the same tags in the next run` is a known red in both baselines: the GXT validators do not reuse a cache's tag when the cache consumes the same tags again, so an outer frame sees a new tag after each re-run. The third rebase onto main moves six classic-component test files into components/classic/ and renames their modules (` (classic component)`); their tests and results are unchanged. Main's rewrite of the positional-params tests of `Component Manager - Curly Invocation` to a native class whose manager's `updateComponent` is a no-op turns three of them into compat known reds: the compat custom-manager arguments do not update a native component's positional params unless `updateComponent` writes them (native passes them). The fixes folded in with this rebase turn 9 compat and 14 native known reds green, among them `custom ember array properties rerender when updated`. The note in the compat file lists the run; the known reds are the failing tests listed per module. A test that fails only because its expected error message is Glimmer's exact text is a known red: the GXT backends throw their own messages. The per-fix history is on lifeart:gxt-pre-squash-b1bf210aef. Folded in after the squash: the native baseline after the skip prune. The history of these follow-ups is on lifeart:gxt-followups. Folded in with the second squash: the baselines regenerated after the regex cleanup, the memory changes, main's test rename and gxt 0.0.87 and 0.0.88, from the runs of compat 10,250/10,482 tests across 1,065 modules and native 7,204/7,216 across 684 modules. gxt 0.0.89 leaves them unchanged. The history of these commits is on lifeart:gxt-pre-squash2-2063496034. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lifeart
force-pushed
the
glimmer-next-fresh
branch
from
November 20, 2026 14:46
2063496 to
ac0da07
Compare
This branch has not been deployed
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.
GXT rendering backends for Ember (opt-in preview)
Summary
This PR adds
@lifeart/gxtas an opt-in, build-time rendering backend forember-source. It comes in two flavors:GXT_MODE=true(Vite dev and test pages),EMBER_RENDER_BACKEND=gxt(rollup dists)@glimmer/*rendering and reactivity modules are replaced bypackages/@ember/-internals/gxt-backend/.EMBER_RENDER_BACKEND=gxt-native(Vite and rollup)gxt-backend/native/. Ember tags are gxt cells, so there is one reactive system.The default build is classic and unchanged in behaviour. GXT code in classic packages sits behind the
__GXT_MODE__build constant, which the classic and native builds fold tofalse.bundle-size-check classicfails if live GXT bridge code reaches the classic dist. The classic suites matchmain's, plus this PR's tests in shared test files, which pass on classic too. The classic dists are not byte-identical tomain's (why).Opting in is a build-time choice; this PR publishes nothing.
scripts/build-gxt-native-package.mjs --pack <dir>buildsember-source-gxt-native. An app installs it asember-source("ember-source": "npm:ember-source-gxt-native@<version>") and adds the Vite presetemberGxtNative()fromember-source/vite. It supports Vite only: no ember-cli and no@embroider/vite.scripts/build-gxt-package.mjsbuildsember-source-gxt(dist-gxt-package/). TheemberSourceGxtsmoke scenarios install it asember-source.Native scope. In scope:
@glimmer/componentand template-only components; strict.gjs/.gtstemplates and loose resolver templates; the router, outlets andLinkTo; helpers and modifiers, including custom managers;@tracked,@cachedand tracked collections; services,renderComponent, runtime compilation through@ember/template-compiler, and the debug render tree.Out of scope: classic
@ember/component,<Input>/<Textarea>/{{mut}}two-way bindings, ArrayProxy / ObjectProxy content reactivity,{{unbound}}, engines /{{mount}}, SSR, and.hbsfiles. Using a classic component or<Input>/<Textarea>throws. The native test run skips 286 tests, each with a reason inscripts/gxt-test-runner/native-skip.jsonor in the test source.Current status
The numbers are from the fork's CI, with
@lifeart/gxt0.0.89, on2063496034, whose tree the head has (runs).Since
5b8170e746, 10 commits with gxt 0.0.89 cut what an app ships:No test result changed: compat stays at 10,250 / 10,482 and native at 7,204 / 7,216, with the same known reds. The classic prod tree is byte-identical. The 89 commits were then squashed into 8, with the same tree.
Tests
test-results/gxt-baseline.json.baseline-gate: OK.[integration]modulesGXT …modules and 48 in the two modules converted from vitest (test harness), all added by this PR and all greenbaseline-gate: OK.main: 9,296 / 9,275 / 21 / 0); the 133 extra tests are added to shared test files by this PR.main: 9,131 / 9,089 / 42 / 0). Two of the 133 added tests are development-only.main: 9,289 / 9,264 / 25 / 0)emberSourceGxtjobs (compat package boot and consumable)ember-source-gxt-nativeplus the npm@lifeart/gxt0.0.89 tarball, installed in a fresh app outside the repo: 15/15 acceptance checks; prod and dev each boot 17/17; the prod bundle is byte-identical to the harness measurement (74,559 br).main's counts are from emberjs/ember.js run 43093963147 on9ed291512e, whose test jobs all passed (it is marked failed: two publish jobs stayed queued).The runner runs a nested QUnit module on its own and inside its parent, so the totals count its tests twice: 648 compat and 135 native tests.
Compat known reds and skips
Counting a nested module's tests once, 206 distinct tests fail:
node jitandserializationmodules).compile errorsand… syntax errorsmodules, 11 strict-mode names that are not in scope, and 4 strict-mode{{component}}misuses.ember-template-compiler: custom plugins passed to compile, a development-only module that registers no test under GXT.baseline-gatereports 216 known reds, because it keys failures by module and test name, and two SSR parent modules list each failing test of their three child modules under one name.125 test rows are skipped. 21 of them are skipped on classic too. The other 104 are GXT-only skips, each with its reason in the test source:
GXT_UNSUPPORTEDinintegration-tests/lib/modes/rehydration/gxt-delegate.ts). The delegate fabricates no markers.integration-tests/lib/test-helpers/gxt-unsupported.ts): the list-update steps of{{#each}}swaps, serialization markers, and dynamic variables other thanoutletState.metaof a compile option, andvisit()with_renderMode: rehydration, which asserts under GXT.Bytes
The same modern app (
smoke-tests/modern-app) is built from each rollup dist (GXT native run 44477554401). The boot JS includes Ember, gxt and the app, compressed with brotli. The strict and loose variants pass 17/17 boot checks, the lists variant 8/8..gjs)key="@index"and{{#each-in}})--assert-nativechecks that gxt's item reference runtime is in the closure of the new lists app and in neither of the other two.Compat, built from source (the repo's Vite pipeline):
1a18f27dbfit was 224,575 (run 44477546646), so the change is −59,993 (−26.7 %).--assert-no-runtime-compilerfinds no template compiler module among its 271 source modules.Whole dist trees (every
.jsfile underdist/<mode>concatenated, then brotli; GXT dual-build run 44477554379), with their budgets inscripts/bundle-budgets.json:The native trees no longer hold the Glimmer wire-format compiler entries, which the classic trees keep, so compare the apps above, not the whole trees.
The classic and compat budgets were last re-baselined at the measured size + 5 % (
81060259b3, onlifeart:gxt-followups), the native ones bya89865441e. The check fails above 5 % over budget, and the trees are at 95.2 % to 96.9 % of their budgets.Since
5b8170e746(run 44263886656):diff -rq).assert-native-distpasses for prod and dev:@glimmer/runtime, its forbidden list (GXT_NATIVE_FORBIDDEN) allows onlylib/dom/sanitized-values,lib/dom/normalize,lib/dom/propsandlib/debugger-callback.@ember/template-compilerand…/runtime.Memory (krausest, CI)
Measured on
a31347de36's code, before the fifth rebase and the memory changes below, with npm@lifeart/gxt0.0.86. The runs are 42316206191 and 42318092991 (24 reps each) ofd67fbfbc45onlifeart:gxt-krausest-harness. That branch adds a krausest (js-framework-benchmark) app,scripts/krausest-bench.mjsand a workflow, none of them part of this PR. Medians in MB (10⁶ bytes), run 1 / run 2:Runtime.getHeapUsageafter gc. The growth is the slope of the heap after a clear, over 5 create/clear cycles.a31347de36, both builds in one job:dbb569597b, one object per helper call site. Run 43390824992: heap with 10k rows 41.02 → 40.05 MB; 3,479 → 3,382 bytes per row.8485e27bad, one fallback modifier-destroy flush per run loop. Run 43396423935: clear1k 47.05 → 44.20 ms (classic 44.80); heap 40.95 → 40.01 MB.What the 8 commits contain
This section summarises by area the follow-ups and fixes folded into the 8 commits, the rebase adaptations and the commits that were on top.
Parts marked after the squash cite commits of
gxt-followups, and third rebase of the two fix branches. Sections marked on top were folded in with the second squash. The fourth rebase parts are in commits 2–6, whose messages list them. Each fix commit message gives the root cause, and fixes that change behaviour come with tests that failed before them.5b8170e746takes both baselines from the runs ofd6b90531fe(GXT Full 44258818349, GXT native 44258818262). Everything below is compat unless it says native.Rendering correctness
c02e65b8f5,e49a0f17ba,0fefcbd515,ac92f3aa7a,2567a776db). Build-time.gjs/.gtstemplates do the same inside elements (6915dbdedf), and at their top level through gxt 0.0.84's content-binding hook (e463bd06f0).nullorundefinedis removed (972ddf69ee).classis an attribute, and classes merged through...attributesfollow Glimmer (c6355fb7b5). An attribute that names a property of its element is set through the property (2e4812f25c). A triple curly in an attribute renders its value (64bd42705d). A boundstylekeeps its text as written, not as the CSSOM re-serializes it, andnull,undefined,falseor''remove it (2b824a9b26, with gxt 0.0.85, compat and native).~strips whitespace, and an entity in an attribute value is decoded once (0e46f9b991, with gxt 0.0.85).sanitized-values, not outdated copies of its lists, in every path that writes a URL attribute, forwarded ones included, in development and production, in compat and native (f93c20f33e,ac68721b69,1ce514a0ab).a0023cc485,42f32b7cf2,7c6547ed96).1a336f6b9c,3a5e2d1fc5).a5270a0181,d998d6eb75). A yielded curried value that changes renders its new component (51cdbcc1e1,6257592af4).(component …)in an argument or attribute position is a curried component (84dad24674). Invocation positionals are appended to curried ones (c0e84a86c4). A curried(modifier …)argument stays one value while its definition is the same (76a039ee5d).<this.x>(ea8a56928c,f1065adada,0904bf8e41,872f3ab467,d8ae7bbe7e). Third rebase: native{{get}}reads a property of a primitive, such as a string'slength, as Glimmer'sisDictallows (b9056d70f5).5e6bced0b5).{{else}},<:else>and<:inverse>are one block (a37eb299c5). A tag naming a block param invokes the yielded component (6438cd7a77). A block param in a quoted attribute is its value (83810390af).<@comp as |v|>passes its block and block params (47db2a5080). Whitespace between named blocks is not a default block that replaces<:default>(cf1a6aa14c)..gjs/.gtscomponents. A class with a class-body<template>renders through its component manager (ba66721c72), as does a class with a registered template invoked lexically (7240def4a3). The nearest template of a class chain wins (76385ea3b9, compat and native). A<template>component invoked by name receives...attributes, renders its blocks, and does not get its attributes as arguments (0f0976c613,58984137b5,f4c40b7be2). Decorators in gxt-compiled files import decorator-transforms' runtime, so nodt7948global is needed (5100fa24dd,d874899199, compat and native).renderComponentruns the custom manager of a plain-object definition (06ca2f1fd6), so the[integration]suites, whose harness renders every loose template that way, have a real context. A root updates in place instead of re-rendering whole on any tag change (6f5611dab1), is a root of its owner's renderer (d78683b33d), renders before the cursor'snextSibling(7476e88553), accepts a<template>value (7c9095995c), uses ahasSubOwnermanager's owner (59a0e407ed), and creates SVG elements inside an<svg>(c4126ba773).main's rendering tests render each template as a root ofBaseRenderer#render. Such a root renders through the glimmer host'srenderRootwith a classic root's context cells, so its function-valued and ArrayProxy-valued properties re-render when set. A root whose first render failed stays in its renderer until the renderer is destroyed (compat and native).{{#in-element}}follows its destination and leaves it with its block, as does a component inside it (555a6f15cf,d6c2ee0b9b).<svg>keeps the SVG namespace on update, and an SVG text child updates (073609e6a7).{{#each}}row renders the new object bound to its key (3109d6465f), and each object bound to it after that, also when the list grows at the same time (d049134601, with gxt 0.0.85).{{#each-in}}honourskey=(b608afded1).{{#each}}over a native iterable re-iterates when what it read changes (a392191922). An{{#if}}branch or{{#each}}row rendered on update resolves names in its template's owner (5d7fb77fd7).63cc148519). A modifier sees its element's content when it is installed (c0b147aa14), reads its current arguments (7e8bef68b4), updates in the owner its element rendered in (c81f8daf88), and is destroyed when its definition changes (9badc5318c).Component lifecycle
9b84fde952,fd04350576,81676cff0c).{{#if}}or{{#each}}reaches its modifiers. Modifiers are destroyed in the order their elements close (05b5302447,1083384678). Third rebase: so are native ones, which are queued and destroyed in that order at the end of the render pass or root teardown (fa74262259), instead of gxt's parent-first order.b5eda4885e) and classic components (c7ac744eb5,cf4f6349ba) are no longer pooled per class.406548a43e,ec4f1ae128).{{#each}}row that renders a component removes the component's nodes when it goes (eddfdcfa8a). A modifier is destroyed with its block however it was installed or updated (dc33bfa368). A content binding owns the helper it renders and destroys it when the value changes (841bbaba0a).sendCoreViewEvent: the listeners, then the method), somain'sEvented#triggerdeprecation does not fire for them; user code'striggercalls stay deprecated. A classic component destroyed with its block runswillDestroyElementwhile its element is in the document.Reactivity
5f939592a4). Writes indidUpdateanddidRenderrender until stable, up to the rerender limit, not three passes (03e0958b74).dirtyTagForreaches the DOM (d551ddebb1). It no longer reads the property it dirties (3c1b5da11a), and creating a property's tag no longer reads the property (b430e9d9d8). A content binding re-runs before the bindings its evaluation created (6ec3d03b1a).(hash)members, curried arguments, thefncallback, the arguments<Input>/<Textarea>do not use, the getters of a rendered component, a route template's controller getters, and a dynamic component's value (03d48b04c3,04b148cc76,9c5cc9b98d,a8029df1c2,50e2ddf5ee,9702662b7e,c338dbf8fe). Some eager reads remain; see the gaps. Third rebase: native{{hash}}is one object of stable identity with a lazy getter per member, so a yielded(hash x=this.model.x)updates, an unused member is not read, and a custom tag lets@computed('args.hash.key')follow it (20d2d745a1).(mut)and(readonly)values, and(mut @arg)writes through the argument (5256bf4be0). A dependent key through a component argument follows what the argument reads (c9376e3978). Template-only component arguments update whatever invoked them (5f3a7db10f,0f77b1e682). ArenderComponentroot argument is read as Glimmer'sgetPropreads it (958f1e8980).(fn …)result passed to a helper is not called at the argument site (ca628df3d3; see gxt 0.0.88).updateComponentreads their new values, and a computed property overargs.positionalorargs.namedrecomputes (3bc96e9594).(mut)and(readonly)values without reading other properties of the value, so<LinkTo>renders a model that throws on unknown properties.createCache, and so@cached, re-computes when a gxt cell its function read changes, includingthis.argsof a Glimmer component (528cf966aa). A binding is evaluated once when it is created (d69fdb8eda). On top: a cache keeps its tag when a re-run consumes the same tags in the same order, and a frame that read only that cache ends with that tag, asmain's validator does since Reuse the combined tag of a cache that reads the same tags again #21664 (b7c0a33d7e, compat and native). Revisions and invalidation are unchanged.cell()renders by the end of the run loop (6f5611dab1).set()on a plain field re-renders a.gjstemplate that reads it (ec57f0d104). Third rebase: a helper recomputes when an EmberArray argument changes in place: it is compared throughobjectAtandlength, as a native array is by its elements (78235805f4).ifwith no else value isundefined(c4668e4ecb);{{log}}logs again when its arguments change (132cabbc59); a track frame that consumed one tag ends with that tag (fbccd086b6).Errors
catchblocks, and over 100 other catches that dropped or only logged the error, were removed or converted, ingxt-backend/and the GXT branches of classic packages. Each remaining catch rethrows (or handles one expected error), collects the error and throws the first one once the surrounding work has run, or, around a read Glimmer would not make or where no caller exists (see the gaps), reports it in development withwarn(idember-gxt.dropped-read), while the template's own read still throws. Nocatchingxt-backend/or in the classic files this PR touches drops its error unreported, apart from one that is identical onmain.dirtyTagForread the property it dirtied (3c1b5da11a); an argument value that is a function with parameters was called as an argument thunk (b5dbcb4534); the DOM sync at the end of a run loop dropped every error (59cd9c4dc3); a binding that threw re-ran in every later sync (27e195c3a4), and gxt 0.0.85 now ends such a pass itself, so the bindings it did not reach render on their next change (a6459d9380); LinkTo's class and href reactor leaked across applications (b02ed88554).render,rerender(),runTask, a barerun()or autorun, or theset()that caused it (39d74cd176,0d68d0e89c,59cd9c4dc3,8a97df6031,36614af474,c6a667cb2c,119ab64625). A render throws only its own errors, not a stale error queued by an earlier one (18037c8e71). A template that the GXT compiler cannot compile throws instead of rendering nothing (4b363558f1). Third rebase: a custom modifier whose install throws keeps the output rendered before it: the error is collected and rethrown after insert, as Glimmer does (79060b45c0). A thrown value that is not anErroris rethrown at once, unchanged. Fourth rebase: so does a component root: an error of its commit phase keeps the render and is rethrown once the render is complete.0d54cc861d) and removed again (82bff4dd8a): they cost about 62 KB brotli in development. Tests that differ from Glimmer only in error text, and tests that expect an invalid template to be rejected at compile time, are known reds.visit()with_renderMode: 'serialize'or'rehydrate'fails an assertion that GXT supports neither (d390108302).Debug render tree (Ember Inspector) and
{{debugger}}renderComponentrender is a root of its owner's renderer, andcaptureRenderTreelists it with live bounds (d78683b33d).05c9fc7adc). With gxt 0.0.84,<this.X>and<@X>nodes also get their path as the name (46841d4cef).{{#if}}block bounds and modifier nodes (Ember native: Glimmer block bounds for {{#if}} + Inspector modifier nodes lifeart/glimmer-next#266). Third rebase: native names arenderComponentroot{ROOT}, and a component bound through a strict-modescopeby its binding name, as compat does (a41caf005a).{{debugger}}calls Glimmer's debugger callback each time it renders, with the template's self (nullfor a template-only component) and agetforthis,@name, block params and paths (cc5b59558c, with gxt 0.0.85'sdebuggerhook, compat and native). Third rebase: the template-only mark is found through the render proxy (2bc65d6641). One of its tests still fails (see the gaps).Routing
getRouteWrapper) renders its routes, and a classic route template gets the@outletargument (7040e46e9e).this(f921fb272b).345e2a6969).8a97df6031).Development assertions
81d10d84e9). The message text differs from Glimmer's.set()or@trackedwrite of a member that a template of the same render read through a path ({{this.wrapper.content}},{{@wrapper.content}}, orvalue=this.wrapper.contentrendered by a template-only component) asserts with Glimmer's message, which names the components rendering at the read and the path (36c200b5ce). A plain object's member is not covered (see the gaps).{ROOT}and a classic root-top-level, asmain's do.ec796c6bff).{{on}}and{{fn}}assertions name the argument (While rendering: this.foo;92fda285c4, with gxt 0.0.85, compat and native).{{attrs.x}}fails Ember's assert-against-attrs assertion, with its message and source location (1beed434a9), not a plainError.Memory (native)
{}of each evaluation (ecd9165aa4).installandupdateare prototype methods, not two closures of its own (19f633b32e).gxt-native | retained call-site shapestests them.dbb569597b); with the flush of8485e27bad(memory), a modifier removed in a nestedrun()is still destroyed when that loop ends (tested).Test harness
@glimmer-workspace/integration-testsassertions ignore GXT's curried-component boundary comments and its trailing block anchor (1ea465f836,96c0216737).49746e696e,9d67d6fb55,2a65871b22,59cb554612).componenthelper does; the GXT rehydration delegate renders the server side non-interactively, with its components and modifiers registered (597fbf26e5,a1f5f22b7d).Compat: utils.ts(the same 44 cases) and@glimmer/component-gxt: reactive identity(4 tests) (5ec62d6896).native-skip.jsonentry matches a skipped test (ca5c72e5c9,432e968543).main's Glimmer root, under GXT throughgxtHarness.runRender, which keepsrunAppend's semantics. The native test case exposesthis.root. GXT tests runmain's deprecatedA()andObjectProxy.createinsideignoreDeprecation, or expect the deprecation.CI
scripts/gxt-test-runner/merge-runs.mjsmerges the shards into the samegxt-summary.jsonandgxt-last-run.jsonas one unsharded run, whichbaseline-gate.mjsgates. A workflow took 20–27 minutes before and 6–7 after (16a3c98dbf); recent runs take 6–12 (11 on2063496034).GXT Fullverdict comes frombaseline-gate.mjs, so known reds no longer fail it and file an issue every night (ddcb06fb46).Build and packaging
ember-sourceno longer depends on@lifeart/gxt. The repo pins gxt once, as a rootdevDependency, and the generatedember-source-gxtandember-source-gxt-nativepackages declare that exact pin as a dependency (b5f3a21daa).pnpm lintand both roottscprograms (pnpm type-check, in both decorator modes) now covergxt-backendand@glimmer/component-gxt, with no ESLint problem and notscerror (5174ffe5e1). Exceptions:ember-local/no-barrel-importsis off in the two trees, as the GXT builds alias exact barrel specifiers; 34 per-line ESLint disables and 33@ts-expect-errorlines, each with its reason, and no@ts-nocheck; 7pathsentries androotDir: "."intsconfig.json. The published types still leave out both trees.b6a0aaa131), soassert-native-dist,bundle-modern-app.mjs --assert-nativeand the native package's entry prune reject them by name.Gated code in classic files
glimmer/lib/base-renderer.ts,renderer.ts,templates/root.tsandcomponent-managers/unwrap-template.tsmoved, verbatim apart from imports and exports, intogxt-backend'sroot-template.ts,render-component.ts,classic-roots.tsandtemplate-adapter.ts(c741f0d35a,c604f8d668,f229c5009a,b1bf210aef). The four files reach it through one bridge slot,GxtGlimmerHost, whichglimmer-host.tsfills, from a wholeif (__GXT_MODE__)block or a top-level ternary that checks the host is installed. The classicdist/prodwas byte-identical after each move.bundle-size-check classicalso fails on a livegetGxtGlimmerHost(orsetGxtGlimmerHost(call.template()of@ember/template-compiler(9b68659ccd),Route#refresh,Route#setupanddidTransition(17e4043436),notifyPropertyChange(5c88a9bfe1) andgetRootViews/getChildViews(5a0630464d). Ten more commits there remove the leftovers that changed the classic dist bytes: GXT-only imports, fields, exports and locals, two ungatedtemplate()wrappers, and the classic branch of 7 if/else forks.main's rendering tests callBaseRenderer#renderdirectly. Under__GXT_MODE__it now hands the render to the glimmer host, asrenderComponentdoes (9 more lines inbase-renderer.ts).CoreViewstaysmain's.Regex scans replaced (on top)
These 19 commits replace the compat backend's regexes and hand-rolled scanners with AST transforms (
gxt-backend/ast-transforms.ts) and value checks:They use the parser gxt's runtime compiler hands to its AST transforms, so there is no gxt change and no new parser. Each group starts with its tests, which CI ran on the old code; each fix's tests failed there unless noted. Each commit message says what the old code got wrong.
Template source (tests
4e081d060f,3464daa1b6):template(src, { scope: () => ({ this: x }) })readsxwherever the template readsthis(ab1cbf98d2).template(src, { eval })looks up only the template's free variables, PascalCase helpers included (9558c99f3c).7f778fb235).{{else}}block, each argument evaluated once (8f1edfa2e6).<foo.bar>and{{foo.bar}}are checked against the block params in their scope, where Glimmer checks them (edf90556fe).{{#in-element}}takes its fallback destination id from its own block (e11126d867).precompileTemplate(…, { scope })gives a template every scope name it uses (d61d591e72).ee10e25fc1).Runtime and tooling (tests
9d94fc5278):bundle-size-check classicreads the live gxt-bridge calls from the babel AST of each dist file. The reader isscripts/dist-ast.mjs, shared withassert-native-dist(19b7780544).{{#each this.model.list}}over a list that is no Array keepsthis.modelwhen the list changes (52897eef53).Symbolreaches the component (a9369d25e9).<LinkTo>and<Textarea>are known by identity, not bytoString()(a3d525a815).template()scope name with a quote or a backslash is written withJSON.stringify(2dc58c5482).curly-c-tag-name branches, which nothing produces, are deleted (0f896a6ed9, no test).The rebases onto
main54d1bf526d,4019de38a7and21a5f6c228, had conflicts only inpackage.json,pnpm-lock.yamland one test file; their classic audits found nothing to gate but a skip of empty[integration]sub-modules.493985e956(44 commits, 77 files, 18 of which this PR then changed):main's [CLEANUP] Render tests through a Glimmer root component #21775 (rendering tests through a Glimmer root) and Deprecation enabled / URL updates for 7.5.0 #21745 (the 7.5 deprecations) broke about 386 compat tests at first; the adaptations above, listed in commits 2–6, fix them.9ed291512e(9 commits, 43 files, 6 of which this PR then changed): Implement RFC #1216: Deprecate the classic Component #21630 (Deprecate "ember component" rfcs#1216) deprecates the classic Component and guardsmain's classic component tests. Commit 6 takesmain's guarded versions of fourcomponents/classic/test files with this PR's GXT branches re-applied; no other commit changed.701ca09d7fmakes 4 tests this PR adds expect the deprecation, keeping their names.2e5f4528fefollowsmain's rename of a debug render tree test innative-skip.jsonand the native baseline.Each time,
pnpm-lock.yamlismain's lockfile plus this PR's 294 lines, none removed, and the baselines were regenerated from CI.gxt releases consumed
0.0.82 (lifeart/glimmer-next#265) to 0.0.85 (lifeart/glimmer-next#266 to lifeart/glimmer-next#269; pins
6114d128e4,26181318aa,e324bce683) brought the fixes and host opt-ins that the areas above cite. 0.0.86 (lifeart/glimmer-next#270,6b8675867f) cuts the memory a large render keeps; it needed no Ember change. 0.0.87 (lifeart/glimmer-next pull requests 272, 273 and 275 to 277;3cdf8816b8) calls only the argument getters its compiler brands$_argThunk, any other function being the value: Ember brands the getters it builds (a6a2708cdf,87415a4f58), and a custom-managed component calls only a branded function (b22f30a4f1). Its rows keyed by position could not take another array, collection or primitive, so Ember keyedkey="@index"by identity (339631fc42) until 0.0.88. 0.0.88 (lifeart/glimmer-next#279,d6b90531fe) was made for this PR (below); it also releases the items of the rows an async keyed list removes. So was 0.0.89 (lifeart/glimmer-next#280,ac7c2beffb), which lets an Ember app ship less of gxt (below). Their compiler and runtime must be the same version; this repo uses the pin for both.gxt 0.0.88 (on top)
2d93a41082to5449eb0d56; compat unless it says native.key="@index", andkey="@key", now compiled alike; compat and native) keep their rows when reordered or replaced, each showing the item now at it (2d93a41082). What a row yields or invokes as<Item />follows the item, also between a primitive and an object, and the components its block renders keep their instance and state (01ce29d920,fc34f389e8). In a kept row, a Glimmer component reads the new@item(a598fe1bf6), and a classic one gets it in the same render, each update hook once with the final arguments: when gxt reports kept rows, the sync reruns its argument pass, up to 8 times (6a75e8bb42,9b76db31b3). Native installed gxt's item reference runtime in every app (49606e857d); since9709996357, the templates that need it install it.{{#each-in}}rows are keyed as Glimmer's, and a nested each-in's rows read the outer row's key and value (tests05c144b887,31eb0f21c8).(fn)result or an action (5f4ec016e2), a(hash)member (0f14a650b5), or an arrow a helper returns, passed positionally to a helper or a classic component (eaf61c36c6,805a55af47). Only getters gxt's compiler brands are called; helper results lose their__isHelperResultmark.argSource;d9ed8c404a,arg-sources.ts):this.a.btobof the currentthis.a, a block param's path to that path, a{{#let}}alias to its source,@xto where the caller's argument writes, in a Glimmer, template-only or classic component invoked by name or from a strict template's scope, even through a copy of its args (3ab3e47a2e,baa8b97f82,93e03009b2,5d4a2cba45). A literal, a helper's result or a block param itself writes nothing upstream, not the parent view's same-named property (fb59532860); an argument without a source, such as a curried component's, keeps the earlier guess (23a1dedf02).d6bc9f067a).setComponentTemplateor only alayout, is a classic component with an instance, hooks and actions, not template-only: its manager is found up its prototype chain (7bbd3034f2,5449eb0d56). Native throws its documented-drop error.Tree-shaking and gxt 0.0.89 (on top)
a89865441eto2063496034. They were reviewed in the fork as lifeart#33, lifeart#34 and lifeart#35, whose descriptions give each change in full. Together they change no test result and leave the classic dist as it was.a89865441e,014efe6fce).ember-template-compiler,@ember/template-compiler/lib/*,-internal-primitivesand@ember/-internals/glimmer. The package build already pruned them.ac7c2beffb, the 0.0.89 pin;9709996357,8f64db08a2,448ff0a4a6).{{#each-in}}imports the item reference runtime itself, so native no longer installs it in every app.1a18f27dbf,643f57db32,2063496034).<LinkTo>s linked to the last route. 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 lifeart/ember.js#34 gives the three causes.precompileTemplateoption.@ember/template-compilation,@ember/template-compiler,…/runtimeandember-template-compiler. Without one of them, runtime compilation throws, naming them.9fcceeb350: the compat bridge imports gxt's argument-source helpers by name (865 bytes brotli in the compat strict app).Known gaps and what is not supported
_renderMode(errors); native does not check.if/unlessarity, named-block rules, strict-mode names not in scope) can compile and render wrong or empty output. A<foo.bar>whose head is not in scope fails at compile time in loose mode, as in Glimmer. In strict mode, where Glimmer renders an element namedfoo.bar, gxt compiles a dynamic invocation, so sinceedf90556feit fails at render time (foois not defined); compat threw at compile time before, when a space followed the tag. No test covers it.{{#if}}or{{#each}}body is rendered once; a changed value creates an instance that is never rendered.getElementByIdduring render misses elements rendered before it.{{this.person.name}}, as a plain property read that compat does not see, so writing it in the same render does not assert (the dynamic-components backtracking-message test). This needs gxt's cell-read hook (feat(host-hooks): DEV onCellRead seam for compat backtracking detection lifeart/glimmer-next#275, in 0.0.87, not used yet) and a runtime-compile flag that emits property taps in every runtime-compiled template.(parent, key)pairs for{{mut}}, compile-time metadata) and wait for a gxt release:fn.toString()): thethis.path a binding, content or attribute getter subscribes to when its first evaluation read no cell, the paths of(hash)and(array)members, the path in the dynamic-component error, and the{{mut}}write path, which can write the wrong property (flagforthis.flag ? this.a : this.b).$_maybeHelper("name", …)lookups of scope names, the assertion against a resolved helper as a named argument, and a self-referencing{{#let}}in generated closures.{{#in-element}}blocks are a stack consumed by position: a block that does not defer leaves its entry to the next one.{{component "x-y"}}, resolves asxy(gxt lowers it to$_tag('XY')), and a tag with--is taken for a nested component (<my--el>asmy/el).Element.prototype.addEventListener/removeEventListenerpatch that every compat app installs with{{on}}, and the 16 ms fallback DOM sync (setInterval).(helper …)is never destroyed.{{#each}}whose key did not change.(hash)member paths, a route context's sibling getters,{{#each}}backing fields, and argument effects. An error there is reported in development (ember-gxt.dropped-read).36c200b5cealso records two reads Glimmer does not consume, so it can assert where Glimmer would not: an argument compat evaluates eagerly but no template uses (value=this.obj.x), and a JavaScript read through a tracking proxy in a tracking frame (a getter that readsthis.args.obj.x). No test hits either.Error occurredmessage (1 test). When a component's construction throws, the elements rendered before it stay, but text and nested blocks do not.{{debugger}}test fails, "basic debugger statement" in its template-only variant: the{{#if}}keeps its false branch on the third render, so the callback runs twice, not three times (from the CI failure; cause not verified).main's tests of the fourth rebase (4):@trackedfield that its Glimmer parent's template rendered ({{this.value}}) under a classic root, and compat does not assert:36c200b5cerecords only member reads through the tracking proxy of an object a template path returned.{{outlet}}in a component under any route instead of asserting below a non-classic route.{{{{raw}}}}…{{{{/raw}}}}).Evented.detect;mainrewrote to a custom-managed component with positional arguments: native does not update a curried one's positional arguments (4), renders nothing for one given positional arguments as an argument (2), and resolves one invoked with arguments in a mustache as a helper (2).__GXT_MODE__-gated; 12 are inlink-to.tsandtextarea.ts(a3d525a815).base-renderer.ts+162,renderer.ts+65,templates/root.ts+29 andunwrap-template.ts+11. template-compiler'stemplate.ts+16,route.ts+29 androuter.ts+47.tracked.ts(+231),property_events.ts(+140) andcomputed.ts(+125). They sit on hot paths (everyset,@trackedaccess and computed-property cache miss), some run beforegxt-backendis installed, and they share module-local state with classic code, so a bridge hook would add a dispatch and still need a fallback.property_set.ts,tags.tsandproperties.ts; the router'sstashParamNamesand outlet-update skip, which use router locals; the run loop's flush budget,afterRenderwrapper and end-of-loop sync (+71); and small hooks inenvironment.ts,helpers/element.ts,object/core.ts,promise-proxy-mixin.ts,application/instance.tsand the classic route manager.@glimmer/managerintemplates/root.ts. Removing it would not change the classic prod dist but breaks the native rollup build with a circular dependency.Dependencies
@lifeart/gxt0.0.89, exact pin, published. The branch has consumed 0.0.82 to 0.0.89 (lifeart/glimmer-next pull requests 265 to 270, 272, 273, 275 to 277, 279 and 280, all merged). The compiler and the runtime must be the same version; this repo uses the pin for both. gxt is pinned once, as a rootpackage.jsondevDependency, plus thesmoke-tests/v2-app-gxt-templatefixture. CI installs it from npm. TheGXT upstream contractjob checks that the 94 named importsgxt-backend/takes from gxt exist in it, across 5 entry points.playwright^1.59.1 androllup-plugin-visualizer^7.0.1. Therolluprange moves from ^4.57.1 to ^4.60.2, with no lock change: main's override still resolves 4.61.0. The lockfile changes by +294 / −0 lines.CI
On emberjs/ember.js, only
PR Title Lintruns without approval (as for the head), so the results above come from the fork, lifeart/ember.js:5b8170e746, each change was gated on a temporary branch: the change plus a commit adding the branch to the workflows' push triggers.2063496034is the commit gxt: a precompiled compat app ships no template compiler lifeart/ember.js#35 tested.2063496034, the head's tree, in the order CI, GXT Full, GXT native, GXT Smoke, GXT dual-build: 44477554416, 44477570786, 44477554401, 44477554279 and 44477554379.2063496034: 64 jobs passed, and the three publish and notify jobs are skipped on a pull request.Perf script still worksfailed: it compares againstorigin/main, which the fork does not have. Every GXT job passed.The workflows:
CI(classic): the jobs are unchanged; the twoemberSourceGxtsmoke scenarios build the compat package first.GXT Smoke(pull requests): the upstream contract check, and 14 compat modules in 4 shards, each gated bybaseline-gate.mjs --subset.GXT dual-build matrix(pull requests): rollup builds of classic, gxt and gxt-native,bundle-size-check(5 % over budget, and live GXT bridge calls in classic) andassert-native-dist.GXT native(pull requests): the modern app from the classic and native dists, strict, loose and lists (boot checks, VM-free assertion, bytes); the strict app built from source on the compat build, which must ship no template compiler, and the loose one, which compiles at runtime; the native package and its consumer; the native suite in 4 shards, merged and gated.GXT Full (nightly): the compat full suite in 5 shards, merged and gated, on schedule or dispatch only; it files an issue when the gate fails.Baseline gating.
runner.mjsexits 1 whenever any test fails, known reds included, so it cannot be the verdict alone.baseline-gate.mjspasses when there are no timeouts and no harness errors, every module in the baseline ran, every failing test is listed as failing in the baseline, and the runner wrote its summary. Known reds that start passing are reported, with a prompt to regenerate the baseline, and never fail the gate.How to review
The diff against
main(9ed291512e) is 336 files, +104,445 / −1,023. Of the added lines, 13,950 are the two baseline JSON files and 294 are the lockfile.The 8 commits, in review order:
c483488bf3build and tooling for the GXT render backends (20 files): Vite, rollup and babel flavors, the alias map and the native forbidden list (scripts/gxt-alias-map.mjs), build constants, the gxt pin, the lockfile, bundle budgets, and the lint and type-check settings for the GXT trees.6dbb0aa07bthe GXT compat backend (78 files):gxt-backend/withoutnative/, including the glimmer host modules, the code moved out of template-compiler, routing, metal and views utils,@glimmer/component-gxt, the backend's own tests, the 5 compat fixes of the third rebase, the compat adaptations of the fourth, and the compat commits that were on top.e6419bc44ethe native layer and its package (101 files):gxt-backend/native/, the package script and Vite preset,assert-native-dist, the modern-app harness, the 4 native fixes of the third rebase, the native adaptations of the fourth, and the native commits that were on top, with the lists app.eebc98319fGXT hooks in the classic packages (32 files): every change to classic package source. Each hunk is__GXT_MODE__-gated code or a GXT-only declaration, apart from the{{debugger}}callback move and the one leftover import listed under known gaps.da34f59081test infrastructure for the GXT backends (32 files): the runner, shard merge and baseline gate,index.html/native.html, internal-test-helpers, and the integration-tests GXT delegate.05cfbefc93GXT-specific tests and test changes (45 files), with the test adaptations of the fourth and fifth rebases and the tests of the commits that were on top.e0d65cb757GXT workflows, smoke apps and scenarios (25 files).ac0da0739ctest baselines and the packaging design doc (3 files).Folded in with the second squash, in this order (on
gxt-pre-squash2-2063496034):b7c0a33d7e,3bc96e9594and36c200b5ce, three fixes, and9aa85d7f5a, the baselines;4e081d060fto216664fba9, the 19 commits of the regex cleanup, in three groups, each with its tests first;701ca09d7fand2e5f4528fe, from the fifth rebase;dbb569597band8485e27bad, the memory changes, and34b7d8b827, the baselines;3cdf8816b8tob22f30a4f1, gxt 0.0.87: its pin and 4 adaptations, and6bbc52f7d7, the baselines;2d93a41082tod6b90531fe, gxt 0.0.88: 36 commits ending with its pin, and5b8170e746, the baselines;a89865441eto2063496034, tree-shaking and gxt 0.0.89: 10 commits, with its pinac7c2beffb.Only the trees named under CI were built and tested for these numbers; the PR is meant to be reviewed and merged whole, and earlier commits may not build on their own.
Suggested order:
metal/lib/tracked.ts,property_events.tsandcomputed.ts,runloop/index.ts,components/abstract-input.ts,object/core.tsandrouting/router.ts.application/instance.tsismain'svisit()code apart from the GXT assertion.rollup.config.mjs,vite.config.mjsandscripts/gxt-alias-map.mjs.compile.tsandmanager.ts(about 14.4K and 14.9K lines) are most of it; read them by their section headers. The template transforms are inast-transforms.ts.Run locally
The runner also accepts
--smoke(the 14 CI modules, gated with--subset),--shard i/N,--filter <text>and--auto-serve; seescripts/gxt-test-runner/README.md.Backwards compatibility and risk
main's. Measured one4f2cd0e6dagainstmain493985e956(run 42054852136, which builds the classic dists ofmain,mainplus commit 1 and that head, and compares their lines with chunk names normalized); not re-run on9ed291512e. The head's classic prod tree differs frome4f2cd0e6d's only in the two files that holdmain's new deprecation (dual-build runs 42054851974, 42174105115, 43401373472, 44070180507, 44258818222 and 44477554379). One4f2cd0e6d:shouldPrintComment), so the prod tree is compared withmainbuilt with commit 1 only, which adds that rule and leaves the dev tree's lines unchanged: 1,206,007 bytes raw and 204,064 brotli, against this PR's 1,205,816 and 203,993.main's plus two changes: the{{debugger}}callback module (cc5b59558c), from which the opcode reads the callback (getDebuggerCallback()), which is intended, and one alias line,const template = templateFactory;, because an ES module cannot re-export a binding conditionally. The other differences are import and export lines: GXT-only static imports in metal change the module graph, so Rollup puts metal'schain-tagsmodule in theobserverschunk (92 shared chunks instead of 93).main's: the same code differences, an empty statement left by a folded__GXT_MODE__gate inComponentRootState, GXT comments in kept code, and@ember/componentdocs thatmain's dev tree does not have.ember-source(build and packaging).{{debugger}}callback state. For apps that opt in, the risk is that of a preview, with the gaps listed above.🤖 Generated with Claude Code