From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Sample Subject: Re: Non-bootstrappable NPM packages Date: Wed, 24 Jul 2019 13:06:12 -0400 Message-ID: <87wog7cqgr.fsf@ngyro.com> References: <877e87efc1.fsf@ngyro.com> <878ssnk0si.fsf@jlicht.xyz> 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]:47007) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqKiX-0007po-4A for guix-devel@gnu.org; Wed, 24 Jul 2019 13:06:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqKiV-0001ZB-UR for guix-devel@gnu.org; Wed, 24 Jul 2019 13:06:17 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:56577) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hqKiV-0001W8-KY for guix-devel@gnu.org; Wed, 24 Jul 2019 13:06:15 -0400 In-Reply-To: <878ssnk0si.fsf@jlicht.xyz> (Jelle Licht's message of "Wed, 24 Jul 2019 15:41:17 +0200") 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: Jelle Licht Cc: guix-devel@gnu.org Hi Jelle, Jelle Licht writes: > 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. That is exciting! Did you see that the README links to a similar project written in Rust ? There=E2=80=99s = also a Rust-based bundler called Packem . Maybe those two projects are all that we need. With =E2=80=9Cmrustc=E2=80=9D, th= e =E2=80=9Crewrite it in Rust=E2=80=9D trend looks good for bootstrapping. :) > I created some =E2=80=9Cfiio=E2=80=9D-packages as well [1] , and I have c= onfirmed 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'. Cool. That looks really promising. I=E2=80=99m glad to see that the curre= nt =E2=80=9Cnode-build-system=E2=80=9D can do the same trick I=E2=80=99ve been= doing. -- Tim