Repository navigation
Conversation
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. - `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: the `@lifeart/gxt` 0.0.82 dependency, playwright for the GXT browser tests, the bundle-size check and budgets, the compat package assembler (scripts/build-gxt-package.mjs), the opt-in gxt-backend checker, and lint / tsconfig / prettier / yuidoc exclusions for gxt-backend. On top of main's build: the classic test build keeps main's `treeshake: false`; GXT test pages isolate a test module the gxt compiler cannot compile (a failing synthetic module instead of a page that fails to load); the stable-decorators type check excludes gxt-backend like the main one; `@glimmer/component` resolves to its source in the GXT configs too; the published types (types/publish.mjs now fails on tsc errors) leave out gxt-backend and @glimmer/component-gxt and see the `__GXT_MODE__` declaration. 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;
- 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;
- gxt-bridge.ts: the side-effect-free registry the classic packages reach
the backend through, so classic builds never load it;
- 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;
- tracked-value.ts: main's standalone `trackedValue` on the shim's tags.
Also @glimmer/component-gxt and the backend's own QUnit tests (__tests__).
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 is stubbed, `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), 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). 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: the renderer's GXT root render (ClassicRootState), its force-rerender / root-tag bookkeeping, and the GXT `renderComponent` (base-renderer); a VM-free renderer state under GXT; the GXT root template (templates/root.ts); GXT-aware `template()`, `unwrapTemplate`, internal components, Input, element helper, scheduleRevalidate. - metal: the single gxt cell behind `@tracked`, the GXT re-render trigger in `notifyPropertyChange`, the CP re-entrancy guards, `set` hooks; barrel imports of @glimmer/validator where the rollup alias map needs them. - 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. - runtime / object / runloop / application / views / template-compiler: smaller GXT hooks (observer flush budget, proxy unknownProperty during renders, settled PromiseProxy fast path, rehydrate DOM handling, view-tree rebuild, GXT `template()`). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- scripts/gxt-test-runner: the Playwright + QUnit runner (per-module isolation, baselines, smoke list, native allow-list and skips, contract tests, baseline gate; the gate's `--subset` mode compares only the modules a smoke shard ran); - 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, GXT artifact stripping in equalTokens / equalInnerHTML, GXT run helpers; the router test case exposes its root element to GXT; - integration-tests: the GXT rehydration delegate (two plain GXT renders; serialization-dependent tests skipped with a reason) on main's `RenderDelegate` / `RenderHandle` interface, GXT `<!---->` stripping, and no empty component sub-modules. 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), GXT skips (hot reload, `{{mount}}`), new regression tests
(has-block-params in nested blocks, the (hash)/(array) identity tests, which
moved to helpers/gxt-hash-array-identity-test.js because main rewrote
array-test / hash-test as .gjs), and renames that keep the names `array` and
`element` out of module scope in the single-chunk GXT test bundle.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The GXT smoke (contract + sharded smoke modules, each shard gated against the compat baseline: main rewrote tests in six smoke modules, and their new versions are known reds there), dual-build, gxt-native (modern-app boot, package, native suite against its baseline) and nightly full workflows; the setup action's optional Playwright install; the ember-source-gxt scenarios and the v2 app template for them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
test-results/gxt-baseline.json (compat, 8703/9828, 954 modules) and
native-baseline.json (native, 7061/7103, 672 modules), regenerated on this
series from one local full run each; and docs-internal-gxt-packaging-design.md.
Every status change against the pre-rebase baselines is a test main added
or rewrote: Glimmer components instead of classic ones, .gjs conversions,
route managers, standalone tracked(), {{#each-in}} key=, {{on}} listener
order, and main's rewrite of the @glimmer-workspace integration harness,
which now renders the [integration] suites through Ember's renderComponent
(GXT under GXT_MODE) instead of the Glimmer VM. The notes in the files list
the known reds and the three [integration] modules that hang under GXT.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
📊 Size reportTarball size — dist/dev 0.3%↑
dist/prod -38.7%↓
Show files (187 files)
smoke-tests/v2-app-template/dist 0.2%↑
smoke-tests/v2-app-hello-world-template/dist 0%↑
🤖 This report was automatically generated by wyvox/pkg-size |
Tree of gxt-rebased 4ed495dd9b (the same 8 commits with the fixes from the first CI run folded in). Scratch only; never merged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Tree of gxt-rebased 8679ee1 (the 8 commits with the fixes from the second CI run folded in). Scratch only; never merged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
CI read (rebase1 worker): final tree = gxt-rebased 8679ee1. Closing the scratch PR and deleting its branch. |
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.
CI scratch for the rebase of emberjs#21340 onto upstream main (worker rebase1).
Base
ci-base-main= upstream main a9501d5; headci-scratch-rebase1= the rebased series (gxt-rebased). Not for merging; closed and the branch deleted when CI is read.🤖 Generated with Claude Code