<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 3 déc. 2021 à 10:48, Jonas Smedegaard <<a href="mailto:jonas@jones.dk">jonas@jones.dk</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Quoting Pirate Praveen (2021-12-03 07:17:12)<br>
> <br>
> <br>
> 2021, ഡിസംബർ 3 8:38:53 AM IST, "Jérémy Lal" <<a href="mailto:kapouer@melix.org" target="_blank">kapouer@melix.org</a>>ൽ എഴുതി<br>
> >Le ven. 3 déc. 2021 à 04:05, Pirate Praveen <<a href="mailto:praveen@onenetbeyond.org" target="_blank">praveen@onenetbeyond.org</a>> a<br>
> >écrit :<br>
> ><br>
> >> 2021, ഡിസംബർ 2 7:22:02 AM IST, "Jérémy Lal" <<a href="mailto:kapouer@melix.org" target="_blank">kapouer@melix.org</a>>ൽ <br>
> >> എഴുതി<br>
> >> >Le jeu. 2 déc. 2021 à 02:02, Pirate Praveen <br>
> >> ><<a href="mailto:praveen@onenetbeyond.org" target="_blank">praveen@onenetbeyond.org</a>> a écrit :<br>
> >> >> 2021, ഡിസംബർ 1 9:52:45 PM IST, "Jérémy Lal" <<a href="mailto:kapouer@melix.org" target="_blank">kapouer@melix.org</a>>ൽ <br>
> >> >> എഴുതി<br>
> >> >> >Le mer. 1 déc. 2021 à 16:41, Pirate Praveen <br>
> >> >> ><<a href="mailto:praveen@onenetbeyond.org" target="_blank">praveen@onenetbeyond.org</a>> écrit :<br>
> >> >> >> 2021, ഡിസംബർ 1 5:18:25 PM IST, "Jérémy Lal" <br>
> >> >> >> <<a href="mailto:kapouer@melix.org" target="_blank">kapouer@melix.org</a>>ൽ എഴുതി<br>
> >> >> >> >To work around the bootstrapping issue that is posed by the <br>
> >> >> >> >huge loop of build-dependencies: nodejs -> node-acorn -> <br>
> >> >> >> >rollup -> zillion things -> nodejs, it is possible to make a <br>
> >> >> >> >stage 1 nodejs build that loads node-acorn *source* files, <br>
> >> >> >> >instead of the compiled ones.<br>
> >> >> >><br>
> >> >> >> If nodejs 16 can handle acorn source files (ES6) directly, <br>
> >> >> >> can we just skip the build of acorn ? So we can drop nodejs <br>
> >> >> >> build dependency.<br>
> >> >> >><br>
> >> >> >yes, it can be skipped, for stage 1 build.<br>
> >> >> >But the configuration options used for that build are not <br>
> >> >> >supported by upstream for anything else than development, and <br>
> >> >> >it has a non-negligible impact on nodejs initial load time.<br>
> >> >> >So as soon as node-acorn can be built (by rollup), normal <br>
> >> >> >nodejs build must be done.<br>
> >> >><br>
> >> >> I'm suggesting we ship node-acorn as ES6 source only (remove <br>
> >> >> build steps from current node-acorn itself) if our nodejs can <br>
> >> >> handle it. Rollup might be needed only for compatibility with <br>
> >> >> older nodejs versions which we don't need to support.<br>
> >> ><br>
> >> >Unfortunately, it's not that simple.<br>
> >> >Short version: internal acorn *need* to be in commonjs format.<br>
> >><br>
> >> OK, thanks for the explanation. We can, may be, file a wishlist <br>
> >> issue to support ES modules for internal acorn as well.<br>
> >><br>
> ><br>
> >If upstream node switches to ES for internal modules, they'll do it <br>
> >for all of them i think. But it would not simplify anything, so i <br>
> >doubt they wil.<br>
> <br>
> Why would it not simplify? If nodejs can handle ES6 directly, then we <br>
> don't need to build acorn (we can use the esm source directly). So if <br>
> acorn don't build depend or depend on nodejs, we break the circular <br>
> build dependency.<br>
<br>
I guess Jérémy means that it would not simplify anything for _upstream_, <br>
if (as usual in the NodeJS ecosystem) what they depend on is not sources <br>
but products.<br>
<br>
If that's the point then I think it might still be worth a try to make <br>
the suggestion, pointing out benefits for downstrem users like Debian <br>
wanting to simplify bootstrappability - even if that's not generally a <br>
priority for NodeJS developers upstream.<br></blockquote><div><br></div><div>Maybe we had a misunderstanding:</div><div>i will/am doing precisely that: loading "source" acorn using ESM from</div><div>internal nodejs builtins.</div><div>However that makes nodejs much slower to start - it has to read *sequentially* all acorn</div><div>source files (around 20), and in that mode, it has to read all its internal builtins ( ~ 260).</div><div>That's 280 files to load on start. Currently all those are packed and loaded at once in /usr/bin/node.</div><div>Hence why i want to build a "slow" stage 1 nodejs then the normal build as soon as acorn can</div><div>be repacked by rollup.</div><div><br></div><div>Jérémy</div></div></div>