Closed Bug 1792341 Opened 2 months ago Closed 1 month ago

Migrate most of rest of toolkit/modules to system ES modules

Categories

(Toolkit :: General, task, P3)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

(Whiteboard: [esmification-timeline])

Attachments

(2 files)

We should migrate AppConstants.jsm to be a system ES module.

Depends on: 1792410
Depends on: 1792805

Going to update this to most of the rest of toolkit/modules. There are three others outstanding because they have dependencies (covered by bug 1792825, bug 1792824 and bug 1780695).

Summary: Migrate AppConstants.jsm to system ES module → Migrate most of rest of toolkit/modules to system ES modules

Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Depends on D158451

Attachment #9296879 - Attachment description: Bug 1792341 - Migrate most of the rest of toolkit/modules/ to be a system ES modules. r?Gijs! → Bug 1792341 - Migrate most of the rest of toolkit/modules/ to be system ES modules. r?Gijs!
Blocks: 1795322
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7bfeee195cde
Migrate most of the rest of toolkit/modules/ to be system ES modules. r=Gijs
https://hg.mozilla.org/integration/autoland/rev/76422fc3f9df
Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
See Also: → 1795873

In one of the updates to the patch, I had to make some changes (XPCOMUtils.sys.mjs, BackgroundTask_wait.sys.mjs) to get browser_xpcom_graph_wait.js to pass - I changed them from using static import to ChromeUtils.importESModules.

The reason for this was that browser_xpcom_graph_wait.js is not able to detect modules from static imports, and the patch makes some of the modules be only imported via static import.

I've filed bug 1795873 to fix the test, and there's a follow-up in bug 1795880 to add an ESLint rule to fix cases where we're using ChromeUtils.importESModules instead of static imports.

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.