Migrate Reps require.js/AMD/CommonJS modules to ESM
Categories
(DevTools :: General, task)
Tracking
(firefox138 fixed)
| Tracking | Status | |
|---|---|---|
| firefox138 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 1 open bug)
Details
Attachments
(20 files, 5 obsolete files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
A prerequisite to migrate JSON Viewer to ES Modules would be to migrate the Reps modules to ESM.
These modules are used from various places in very different ways.
JSON Viewer loads them via Require.js and the rest of DevTools via the CommonJS Loader.
Migrating Reps to ESM would ease using them from some other places, like the Profiler frontend to show JS tracer object previews.
| Assignee | ||
Comment 1•1 year ago
|
||
Land ES Modules for all React modules.
Also tweak the Browser Loader to force loading react loaded via require() to use the ES Modules.
This helps ensure these modules are loaded only once and always as a ES Module.
Otherwise require() statements from debugger frontend and import from Reps may load
distinct instances.
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
This get rid of intermediate viewer-config as we can now load json-viewer.js directly as a module
from the converter module.
And also Require.JS!
| Assignee | ||
Comment 5•1 year ago
|
||
| Assignee | ||
Comment 6•1 year ago
|
||
| Assignee | ||
Comment 7•1 year ago
|
||
| Assignee | ||
Comment 8•1 year ago
|
||
| Assignee | ||
Comment 9•1 year ago
|
||
| Assignee | ||
Comment 10•1 year ago
|
||
| Assignee | ||
Comment 11•1 year ago
|
||
| Assignee | ||
Comment 12•1 year ago
|
||
| Assignee | ||
Comment 13•1 year ago
|
||
| Assignee | ||
Comment 14•1 year ago
|
||
| Assignee | ||
Comment 15•1 year ago
|
||
Updated•1 year ago
|
Comment 16•1 year ago
|
||
Comment on attachment 9439724 [details]
Bug 1929387 - [devtools] Remove all debugger node tests.
Revision D230118 was moved to bug 1933832. Setting attachment 9439724 [details] to obsolete.
| Assignee | ||
Comment 17•9 months ago
|
||
I'm getting closer and closer, but still some failures on DEBUG builds:
https://treeherder.mozilla.org/jobs?repo=try&selectedTaskRun=H2b_LoG8Qzy6VKq0Uo6jCw.0&revision=3b5100c85d5d3a09d7ec7a281164b0b28a5ad9b2
| Assignee | ||
Comment 18•9 months ago
|
||
This also helps the esm-ification of Reps as it ensures loading
all debugger module in the debugger document global.
Reps modules are expected to be loaded with a document as global scope.
| Assignee | ||
Comment 19•9 months ago
|
||
This is required as Object Inspector has to be loaded via a document scope
for its ChromeUtils.importESModule + global="current" to be functional.
| Assignee | ||
Comment 20•9 months ago
|
||
| Assignee | ||
Comment 21•9 months ago
|
||
Comment 22•9 months ago
|
||
Comment on attachment 9465436 [details]
Bug 1929387 - [devtools] Avoid loading duplicated debugger modules instances.
Revision D237738 was moved to bug 1949437. Setting attachment 9465436 [details] to obsolete.
Comment 23•9 months ago
|
||
Comment on attachment 9437717 [details]
Bug 1929387 - [devtools] Expose ES Module versions for React modules.
Revision D228995 was moved to bug 1949486. Setting attachment 9437717 [details] to obsolete.
Comment 24•9 months ago
|
||
Comment on attachment 9465439 [details]
Bug 1929387 - [devtools] Allow mjs for react modules in dom parser
Revision D237741 was moved to bug 1949486. Setting attachment 9465439 [details] to obsolete.
Updated•9 months ago
|
| Assignee | ||
Comment 25•9 months ago
|
||
The previous setup was spawning the TreeView once per DOM Panel instantiation,
so that defaultProps would be shared across all subsequent instances of TreeView
for a given DOM Panel instance.
The new setup makes it now shared across toolbox restart and makes
the expanded node be remembered across toolbox reboot.
But we were actually reliable on that unexpected sharing of expandedNodes Set
on TreeView props... so I had to ensure setting a stable expandedNodes props
from DomTree so that it isn't reset on each new receivingProps!
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
Updated•8 months ago
|
| Assignee | ||
Comment 26•8 months ago
|
||
| Assignee | ||
Comment 27•8 months ago
|
||
| Assignee | ||
Comment 28•8 months ago
|
||
| Assignee | ||
Comment 29•8 months ago
|
||
| Assignee | ||
Comment 30•8 months ago
|
||
| Assignee | ||
Comment 31•8 months ago
|
||
A quick performance overview of latest revisions:
https://perf.compare/subtests-compare-results?baseRev=095895327aa009d675e0f4caa10bdf14eb3e85aa&baseRepo=try&newRev=1b85d11245cd5a702d66f45cba24b5df6cb4a6a7&newRepo=try&framework=12&baseParentSignature=4763542&newParentSignature=4763542&filter_confidence=medium%2Chigh&sort=delta%7Cdesc
3% and 2% improvements on custom.netmonitor.manyrequests.requestsFinished and console.bulklog. No immediate idea on why these two are faster. Could it be that JS is faster to run when loaded from a true ESM scope rather than from DevTools sandboxes/require.js?
Otherwise some regression on all console open tests. This may be related to me removing a couple of lazy loading here and there. I'll scan the patch queue and try to revive all existing lazy loading.
Updated•8 months ago
|
Updated•8 months ago
|
Comment 32•8 months ago
|
||
Comment 33•8 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/a3352e22a716
https://hg.mozilla.org/mozilla-central/rev/fc1a3cf0a47c
https://hg.mozilla.org/mozilla-central/rev/4553baa3eba9
https://hg.mozilla.org/mozilla-central/rev/ada5414f55e4
https://hg.mozilla.org/mozilla-central/rev/9e50f94f5b47
https://hg.mozilla.org/mozilla-central/rev/22f3cf41320b
https://hg.mozilla.org/mozilla-central/rev/9530ca3e17ae
https://hg.mozilla.org/mozilla-central/rev/e0745e7311da
https://hg.mozilla.org/mozilla-central/rev/445379536388
https://hg.mozilla.org/mozilla-central/rev/4ef4e168676e
https://hg.mozilla.org/mozilla-central/rev/d6f8fd15b030
https://hg.mozilla.org/mozilla-central/rev/e3d42cccf18d
https://hg.mozilla.org/mozilla-central/rev/0d948d0b5689
https://hg.mozilla.org/mozilla-central/rev/c1694f4e8c84
https://hg.mozilla.org/mozilla-central/rev/bb15fa7a6f09
https://hg.mozilla.org/mozilla-central/rev/462f7d055427
https://hg.mozilla.org/mozilla-central/rev/25a46f2f433d
https://hg.mozilla.org/mozilla-central/rev/3d2bab518efa
Description
•