From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jelle Licht Subject: Re: Non-bootstrappable NPM packages Date: Wed, 24 Jul 2019 15:41:17 +0200 Message-ID: <878ssnk0si.fsf@jlicht.xyz> References: <877e87efc1.fsf@ngyro.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44159) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqHWL-0008Oc-Qn for guix-devel@gnu.org; Wed, 24 Jul 2019 09:41:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqHWJ-0007ex-58 for guix-devel@gnu.org; Wed, 24 Jul 2019 09:41:28 -0400 Received: from mail1.fsfe.org ([217.69.89.151]:40794) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hqHWG-0007cN-2R for guix-devel@gnu.org; Wed, 24 Jul 2019 09:41:25 -0400 In-Reply-To: <877e87efc1.fsf@ngyro.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Timothy Sample , guix-devel@gnu.org Timothy Sample writes: [snip] > I=E2=80=99ve come to think that bootstrapping JavaScript might be easier = than it > looks. As time goes on, Node gets better at the newer JavaScript > features. This removes the need for things like Babel or Rollup, since > with some care, Node can run the source directly with out any > transformations or bundling. That being said, TypeScript looks to be a > major issue, as it is used in many fundamental JavaScript packages and > it is not bootstrappable. Very recently (IE about 94 minutes ago), I found out something interesting that might be helpful; Sucrase[0] is, among other things, a typescript transpiler that does not do any type checking, and it only has some runtime dependencies. I created some =E2=80=9Cfiio=E2=80=9D-packages as well [1] , and I have con= firmed that it actually works! My next step was of course to compile TypeScript proper, and this worked with one tiny snag that I reported at [2]. After manually fixing these problems in the TypeScript source tree, I was able to transpile the TypeScript sources using guix-packaged `node-sucrase-bootstrap'. > I=E2=80=99m not sure in what capacity I want to pursue this. It=E2=80=99= s been sitting > dormant on my computer for while, so I thought sharing it would be > better than letting it fall by the wayside. I hope it proves useful one > way or another. > > If you got this far, thanks for reading! :) Thank you for sending this informative email :) > > > -- Tim [0]: https://github.com/alangpierce/sucrase [1]: https://paste.debian.net/1092893/ [2]: https://github.com/alangpierce/sucrase/issues/464