Open Bug 1308512 (esm-ification) Opened 8 years ago Updated 1 year ago

[meta] Migrate from ChromeUtils.import to ES6 Modules

Categories

(Core :: XPConnect, task, P3)

task

Tracking

()

People

(Reporter: Yoric, Unassigned)

References

(Depends on 10 open bugs, Blocks 1 open bug, )

Details

(Keywords: meta)

Based on the following conversation on dev-platform: https://groups.google.com/d/msg/mozilla.dev.platform/JhmCjt3fnP0/10RRHJtvBAAJ Migrating away from Cu.import and to a more standard module system would be useful to: 1/ save lots of memory; 2/ make our code much more friendly to static analysis; 3/ make it simpler for contributors. A strategy has been devised to migrate towards ES6 modules: https://gist.github.com/Yoric/d271066aa4a4484602e817412957a1ff, without breaking compatibility with add-ons/Thunderbird/SeaMonkey and without require us to migrate everything at once.
Keywords: meta
Priority: -- → P3
Blocks: 490147
Depends on: 1453559
(In reply to David Teller [:Yoric] (away until end of July - please use "needinfo") from comment #0) > Migrating away from Cu.import and to a more standard module system would be > useful to: 1/ save lots of memory; David I skimmed the dev-platform thread but it's not totally clear to me, what kind of memory savings are you expecting over JSMs? It would be helpful to get an estimate to help prioritize this work in the context of Fission MemShrink.
Flags: needinfo?(dteller)
Whiteboard: [overhead:?]
I believe we were only really expecting memory savings before we moved to the shared JSM global.
(In reply to Kris Maglione [:kmag] from comment #2) > I believe we were only really expecting memory savings before we moved to > the shared JSM global. Okay, lets unblock 1353816 then.
No longer blocks: 1353816
Whiteboard: [overhead:?]
Since legacy extensions are no longer supported, I put together a simplified plan at: https://gist.github.com/Yoric/d271066aa4a4484602e817412957a1ff#gistcomment-2646825, which optionally depends on bug 1342012 if we decide on allowing the dynamic `import(…)` to be used in JSMs to import ES6 modules, which would vastly simplify things and allow us to WONTFIX bug 1311728¹. ¹ The implementation of bug 1311728 would be non‑standard and likely fragile, and so I prefer bug 1342012.
Ted is already working on a different approach in bug 1432901.
(In reply to Kris Maglione [:kmag] from comment #5) > Ted is already working on a different approach in bug 1432901. Then we add that as a blocker to this.
Depends on: 1432901
(In reply to Kris Maglione [:kmag] from comment #2) > I believe we were only really expecting memory savings before we moved to > the shared JSM global. Yes, that was the idea. Sorry for the slow answer, I was on PTO.
Flags: needinfo?(dteller)
Depends on: 1602931, 1607331
Depends on: 1608269
Depends on: 1608271
Depends on: 1608272
Depends on: 1608273
Depends on: 1608274
Depends on: 1608275
Depends on: 1608276
Depends on: 1608277
Depends on: 1608278
Depends on: 1608279
Depends on: 1608281
Depends on: 1608282
Alias: esm-ification
Type: defect → task
Depends on: 1609269
Depends on: 1609271
Depends on: 1610653
Depends on: 1611229
Depends on: 1692217
No longer depends on: 1692217
Depends on: 1758481
No longer depends on: 1608271
Depends on: 1765737
Depends on: 1765319
Depends on: 1765750
Depends on: 1765919
Depends on: 1766761
Depends on: 1766801
Depends on: 1768022
Depends on: 1768031
Depends on: 1768060
Depends on: 1768870
Summary: [meta] Migrate from Cu.import to ES6 Modules → [meta] Migrate from ChromeUtils.import to ES6 Modules
Depends on: 1768819
Depends on: 1768922
Depends on: 1769002
Depends on: 1769004
Depends on: 1769029
Depends on: 1771082
Depends on: 1771092
Depends on: 1771097
Depends on: 1771110
Depends on: 1771117
Depends on: 1771144
Depends on: 1771173
Depends on: 1771678
Depends on: 1771814
Depends on: 1772177
Depends on: 1772313
Depends on: 1772351
No longer depends on: 1772351
No longer depends on: 1772313
Depends on: 1772360
Depends on: 1772366
Depends on: 1772299
Depends on: 1771751
Depends on: 1773747
Depends on: 1772358
Depends on: 1772969
Depends on: 1774888
Depends on: 1776174
No longer depends on: 1774888
No longer depends on: 1758481
No longer depends on: 1608273
Depends on: 1776828
Depends on: 1776832
Depends on: 1776870
Depends on: 1777477
Depends on: 1777486
Depends on: 1777637
Depends on: 1777641
Depends on: 1777673
Depends on: 1777801
Depends on: 1777488
Depends on: 1778314
No longer depends on: 1778314
Depends on: 1778818
Depends on: 1779347
Depends on: 1779538
Depends on: 1779539
Depends on: 1779927
Depends on: 1779988
Depends on: 1779989
Depends on: 1780166
Depends on: 1780301
Depends on: 1780527
Depends on: 1782973
Depends on: 1773829
Depends on: 1774287
Depends on: 1771679
Depends on: 1788776
Depends on: 1788783
Depends on: 1789254
Depends on: 1790758
Depends on: 1790761
Depends on: 1791292
Depends on: 1792341
Depends on: 1792365
Depends on: 1792398
Depends on: 1792404
Depends on: 1792477
Depends on: 1792751
Depends on: 1792805
Depends on: 1792824
Depends on: 1792825
Depends on: 1780695
Depends on: 1792976
Depends on: 1792979
Depends on: 1793706
Depends on: 1794429
Severity: normal → S3
Depends on: 1794697
Depends on: 1795188
Depends on: 1795586
Depends on: 1795873
Depends on: 1795880
Depends on: 1795639
Depends on: 1796077
Depends on: 1796143
Depends on: 1796797
Depends on: 1797472
Depends on: 1797686
Depends on: 1797687
Depends on: 1798018
Depends on: 1798058
Depends on: 1798212
Depends on: 1798294
Depends on: 1798554
Depends on: 1798634
Depends on: 1798635
Depends on: 1798636
Depends on: 1799311
Depends on: 1799314
Depends on: 1799415
Depends on: 1800419
Depends on: 1801082
Depends on: 1801368
Depends on: 1801379
Depends on: 1780074
Depends on: 1782784
Depends on: 1802855
Depends on: 1803158
Depends on: 1803166
Depends on: 1804037
Depends on: 1804512
Depends on: 1804661
Depends on: 1806306
Depends on: 1806359
Depends on: 1808173
Depends on: 1808202
Depends on: 1811336
Depends on: 1811914
Depends on: 1811920
Depends on: 1811922
Depends on: 1812141
Depends on: 1804264
Depends on: 1814931
Depends on: 1779629, 1789981, 1525652
Depends on: 1814805
Depends on: 1816416
Depends on: 1816934
Depends on: 1816935
Depends on: 1816938
Depends on: 1816987
Depends on: 1816991
Depends on: 1816994
Depends on: 1816996
Depends on: 1816999
Depends on: 1817002
Depends on: 1817013
Depends on: 1817015
Depends on: 1817016
Depends on: 1817183
Depends on: 1817460
Depends on: 1819019
Depends on: 1819597
Depends on: 1819960
Depends on: 1820498
Depends on: 1820593
Depends on: 1820878
Depends on: 1820880
Depends on: 1820881
Depends on: 1820882
Depends on: 1820883
Depends on: 1821298
Depends on: 1821299
Depends on: 1821301
Depends on: 1821302
Depends on: 1821305
Depends on: 1821308
Depends on: 1821619
Depends on: 1821620
Depends on: 1821621
Depends on: 1821624
Depends on: 1821625
Depends on: 1821897
Depends on: 1821899
Depends on: 1821900
Depends on: 1821901
Depends on: 1821927
Depends on: 1821928
Depends on: 1822010
Depends on: 1822011
Depends on: 1822012
Depends on: 1822357
Depends on: 1822222, 1822233
Depends on: 1822221
No longer depends on: 1822233
Depends on: 1822556
Depends on: 1822985
Depends on: 1823217
Depends on: 1823278
Depends on: 1823710
Depends on: 1823715
Depends on: 1823716
Depends on: 1823719
Depends on: 1823763
Depends on: 1824473
Depends on: 1824575
Depends on: 1824589
Depends on: 1824591
Depends on: 1824491, 1824493, 1824494
Depends on: 1824605
Depends on: 1824606
Depends on: 1824607
Depends on: 1824608
Depends on: 1824609
Depends on: 1824610
Depends on: 1824611
Depends on: 1824612
Depends on: 1824613
Depends on: 1824906
Depends on: 1772262
Depends on: 1826702
Depends on: 1827581
Depends on: 1828401
Depends on: 1828402
Depends on: 1828563
Depends on: 1829559
Depends on: 1829608
Depends on: 1829611
Depends on: 1829614
Depends on: 1829616
Depends on: 1829617
Depends on: 1830460
Depends on: 1830809
Depends on: 1830814
Depends on: 1830816
Depends on: 1830818
Depends on: 1831363
Depends on: 1834176
Depends on: 1834204
Depends on: 1834205
Depends on: 1834222
Depends on: 1834831
Depends on: 1835030
Depends on: 1835268
Depends on: 1835279
Depends on: 1835541
Depends on: 1836480
Depends on: 1836482
Depends on: 1837176
Depends on: 1837245
Depends on: 1838440
Depends on: 1817084
Depends on: 1839388
Depends on: 1770944
Depends on: 1839518
Depends on: 1839519
Depends on: 1839151
Depends on: 1839520
No longer depends on: 1786885
No longer depends on: 1835268
Depends on: 1842428
Depends on: 1845079
Depends on: 1845252
Depends on: 1846570
Depends on: 1846747
You need to log in before you can comment on or make changes to this bug.