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

Make feature discovery lazy #1538

Merged
merged 1 commit into from
Dec 24, 2023
Merged

Make feature discovery lazy #1538

merged 1 commit into from
Dec 24, 2023

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Dec 24, 2023

While working toward strict-es-modules, I found that under real ES modules, this feature-detection code will become eager, which makes it blow up inside all versions of ember-cli-htmlbars before ember-cli/ember-cli-htmlbars#786, because ember-cli-htmlbars insists on evaluating the template compiler bundle inside a VM with no valid URL global.

While that is now fixed in an upcoming major of ember-cli-htmlbars, people can't benefit from that until their very last addon upgrades ember-cli-htmlbars.

So it's also good to fix this directly, by making the feature detection code explicitly lazy.

While working toward [strict-es-modules](emberjs/rfcs#938), I found that under real ES modules, this feature-detection code will become eager, which makes it blow up inside all versions of ember-cli-htmlbars before ember-cli/ember-cli-htmlbars#786, because ember-cli-htmlbars insists on evaluating the template compiler bundle inside a VM with no valid `URL` global.

While that is now fixed in an upcoming major of ember-cli-htmlbars, people can't benefit from that until their very last addon upgrades ember-cli-htmlbars.

So it's also good to fix this directly, by making the feature detection code explicitly lazy.
@ef4 ef4 mentioned this pull request Dec 24, 2023
@NullVoxPopuli NullVoxPopuli merged commit 6c6c7f0 into main Dec 24, 2023
5 of 6 checks passed
@NullVoxPopuli NullVoxPopuli deleted the lazy-feature-discovery branch December 24, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants