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

[ESM] Convert the "default preferences"-handling to use import() syntax #16671

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Unfortunately I wasn't able to come up with a simple way to just replace the synchronous require-call, since we need to ensure that the default preferences are available when bundling starts.
Hence this patch adds a new intermediate parsing-step in all the relevant gulp-tasks, but this shouldn't affect build-times noticeable since the amount of extra parsing is very small.

Please note: It's very possible that there's a better way to handle this, however I figured that unblocking further ESM-work is more important than a "perfect" solution.

…ntax

Unfortunately I wasn't able to come up with a *simple* way to just replace the synchronous `require`-call, since we need to ensure that the default preferences are available when bundling starts.
Hence this patch adds a new intermediate parsing-step in all the relevant gulp-tasks, but this shouldn't affect build-times noticeable since the amount of extra parsing is very small.

*Please note:* It's very possible that there's a better way to handle this, however I figured that unblocking further ESM-work is more important than a "perfect" solution.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/c10297b1f9c77d5/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/c10297b1f9c77d5/output.txt

Total script time: 1.32 mins

Published

@timvandermeij timvandermeij merged commit 35202ec into mozilla:master Jul 9, 2023
@timvandermeij
Copy link
Contributor

Thank you for the patch!

@Snuffleupagus Snuffleupagus deleted the esm-parseDefaultPreferences branch July 9, 2023 13:53
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.

3 participants