<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Yes that’s about right. I’ve been working on this project with Ted and Brian. ES6 modules are the JS standard module system and so various tools will be able to understand our code better. The JS team are interested in switching over too because there current way that JSM modules are loaded is a bit of a hack and they’re far more interested in sharing codepaths that are already present for the web.<div class=""><br class=""></div><div class="">There are of course some issues in the details. We do a lot of lazy loading of JSM modules for performance reasons. Technically ES6 modules only support lazy loading via an asynchronous import call but all of our current code assumes we can load the module synchronously. At least for now the plan is to continue using ChromeUtils.import to load the switched modules so we don’t have to rewrite everything.</div><div class=""><br class=""></div><div class="">There are other things that we do in JSMs that aren’t supported by ES6 modules, there’s a whole bunch of dependencies off <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1308512" class="">https://bugzilla.mozilla.org/show_bug.cgi?id=1308512</a> that has some of the details.</div><div class=""><br class=""></div><div class="">Dave<br class=""><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 27, 2020, at 11:03 PM, Mike Conley <<a href="mailto:mconley@mozilla.com" class="">mconley@mozilla.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hey Gijs / folks,<br class=""></div><div class=""><br class=""></div><div class="">One of the things I _think_ I've been seeing more activity on is switching us from JSMs to ES6 modules. From conversations I've had with kmag, tcampbell and Luke Wagner, my understanding is that switching to ES6 modules not only moves us to a standard, but also could have significant performance impact. The details are a bit foggy for me, but I <i class="">believe</i> it was related to how ES6 modules are JITted, but don't quote me on that.</div><div class=""><br class=""></div><div class="">I also believe ES6 modules are a pre-req for going down the type-inference tunnel.</div><div class=""><br class=""></div><div class="">-Mike<br class=""></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 28 Jan 2020 at 10:43, Gijs Kruitbosch <<a href="mailto:gijskruitbosch@gmail.com" class="">gijskruitbosch@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello firefox-dev,<br class="">
<br class="">
It is already almost February, so in the spirit of better late than <br class="">
never: let's talk 2020 planning for improving code quality, <br class="">
maintainability and developer productivity in Firefox!<br class="">
<br class="">
Some of us talked about this at all-hands last night - there is definite <br class="">
room for improvement in our processes and automation aimed at improving <br class="">
the quality of code changes and how productive we all are when working <br class="">
with the code.<br class="">
<br class="">
Some ideas that came up include:<br class="">
<br class="">
- more linting for CSS, HTML, SVG, Fluent and other files (basically, <br class="">
eslint-style linting for non-JS)<br class="">
- type inference in JS<br class="">
- automated infrastructure jobs to get runtime coverage for issues that <br class="">
are harder to check statically (e.g. accessibility, performance)<br class="">
- guidelines/policy/documentation on code, architecture, issues to look <br class="">
out for in reviews, etc.<br class="">
<br class="">
What kind of improvements do you think are most important on the code <br class="">
side of the Firefox/Toolkit codebase, and why? What big things are we <br class="">
missing that you've seen elsewhere?<br class="">
<br class="">
~ Gijs<br class="">
<br class="">
_______________________________________________<br class="">
firefox-dev mailing list<br class="">
<a href="mailto:firefox-dev@mozilla.org" target="_blank" class="">firefox-dev@mozilla.org</a><br class="">
<a href="https://mail.mozilla.org/listinfo/firefox-dev" rel="noreferrer" target="_blank" class="">https://mail.mozilla.org/listinfo/firefox-dev</a><br class="">
</blockquote></div>
_______________________________________________<br class="">firefox-dev mailing list<br class=""><a href="mailto:firefox-dev@mozilla.org" class="">firefox-dev@mozilla.org</a><br class="">https://mail.mozilla.org/listinfo/firefox-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>