Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always load ember-testing package eagerly #1717

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Always load ember-testing package eagerly #1717

merged 1 commit into from
Dec 13, 2023

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Dec 12, 2023

In ember-source 5.6 (now in beta), we refactored the way Ember and its test-only pieces find each other to no longer be dependent on the AMD loader.

But this mean it's no longer sufficient to define() and not evaluate the ember-testing package in order to install the test support. It must actually get evaluted first.

Note that this bug does not manifest on embroider main, because there implicit-test-modules are eagerly evaluated. This is only a problem on stable, when using staticEmberSource: true.

@ef4 ef4 added the bug Something isn't working label Dec 12, 2023
@ef4
Copy link
Contributor Author

ef4 commented Dec 12, 2023

I manually tested this against the beta. We don't currently have the ember beta in CI, and should also address that.

@patricklx
Copy link
Contributor

i tried to fix it for ember < 5.6 like this now:

let amdModules: { runtime: string; buildtime: string }[] = [
      {
        runtime: 'ember-testing',
        buildtime: 'ember-testing'
      }
    ];

but thats not working since the imports are already loaded before ember-testing is set with define

@mansona
Copy link
Member

mansona commented Dec 13, 2023

So there is a bit of a similarity between the remaining failures on this PR and my pojo PR #1653 🤔 I don't know if that gives us a clue to what is going on here

In ember-source 5.6 (now in beta), we refactored the way Ember and its test-only pieces find each other to no longer be dependent on the AMD loader.

But this mean it's no longer sufficient to `define()` *and not evaluate* the `ember-testing` package in order to install the test support. It must actually get evaluted first.

Note that this bug does not manifest on embroider `main`, because there implicit-test-modules are eagerly evaluated. This is only a problem on stable, when using `staticEmberSource: true`.
@ef4 ef4 merged commit cf50361 into stable Dec 13, 2023
201 checks passed
@ef4 ef4 deleted the fix-ember-beta branch December 13, 2023 18:50
This was referenced Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants