Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a03a27bd73
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| virtualNetwork.shimModule('@ember/object', emberObject); | ||
| virtualNetwork.shimModule('@ember/object/internals', emberObjectInternals); | ||
| virtualNetwork.shimModule('@ember/helper', emberHelper); | ||
| virtualNetwork.shimModule('@ember/modifier', emberModifier); |
There was a problem hiding this comment.
Restore @ember/service virtual-network shim
shimExternals() no longer registers @ember/service, so any module that is loaded through this VirtualNetwork and imports @ember/service will now fail module resolution at import time. This is a behavior regression from the previous implementation, where the Ember service module was always shimmed, and it can break realm code paths that rely on service decorators/injection when evaluated via loader.import(...).
Useful? React with 👍 / 👎.
| virtualNetwork.shimModule('awesome-phonenumber', awesomePhoneNumber); | ||
| shimHostCommands(virtualNetwork); |
There was a problem hiding this comment.
Reintroduce host store compatibility shim
The fallback shim for @cardstack/host/services/store was removed, which means realm modules evaluated outside the full host build can no longer safely resolve that host-only specifier. In environments like code-mode/card rendering (where this shim layer is meant to prevent host-only imports from crashing), those imports now become hard resolution failures instead of the previous safe no-op class.
Useful? React with 👍 / 👎.
Preview deployments |
Host Test Results 1 files ±0 1 suites ±0 2h 12m 17s ⏱️ + 1m 50s For more details on these errors, see this check. Results for commit a03a27b. ± Comparison against base commit 724fc8b. |
| virtualNetwork.shimAsyncModule({ | ||
| id: '@ember/test-helpers', | ||
| resolve: () => import('@ember/test-helpers'), | ||
| }); |
There was a problem hiding this comment.
this is async, but this function is not. are you gonna have a race condition where you are expecting these modules to be available and they are not?
There was a problem hiding this comment.
Pull request overview
Updates the host’s VirtualNetwork externals shimming to avoid eagerly pulling live-test-only dependencies into normal app startup, while still supporting live-test runs.
Changes:
- Make live-test shims conditional on
?liveTestand lazily load@ember/test-helpersviashimAsyncModule(). - Centralize QUnit + test-helper shims into
shimModulesForLiveTests()and call it early fromshimExternals(). - Reorder/reshape a number of
shimModule()registrations inshimExternals().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| virtualNetwork.shimModule('ember-css-url', cssUrl); | ||
| virtualNetwork.shimModule('@ember/template-factory', emberTemplateFactory); | ||
| virtualNetwork.shimModule('@ember/template', emberTemplate); | ||
| virtualNetwork.shimModule('@glimmer/tracking', glimmerTracking); | ||
| virtualNetwork.shimModule('@ember/object', emberObject); | ||
| virtualNetwork.shimModule('@ember/object/internals', emberObjectInternals); | ||
| virtualNetwork.shimModule('@ember/helper', emberHelper); | ||
| virtualNetwork.shimModule('@ember/modifier', emberModifier); |
There was a problem hiding this comment.
shimExternals() no longer shims @ember/service. Because the VirtualNetwork resolves bare specifiers to https://packages/... and there is no import-map entry for @ember/service, any realm module that imports @ember/service will now fail to load. If realms are expected to be able to use Ember services, please re-add the @ember/service import + virtualNetwork.shimModule('@ember/service', …) (or document/guarantee that realm code must not import it).
No description provided.