From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +BdeHjH7JWO8KwEAbAwnHQ (envelope-from ) for ; Sat, 17 Sep 2022 18:52:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aDVdHjH7JWN6DgEA9RJhRA (envelope-from ) for ; Sat, 17 Sep 2022 18:52:01 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4CC5635929 for ; Sat, 17 Sep 2022 18:52:01 +0200 (CEST) Received: from localhost ([::1]:43960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZb2u-0002bo-ES for larch@yhetil.org; Sat, 17 Sep 2022 12:52:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZb0J-00005L-Pz for help-guix@gnu.org; Sat, 17 Sep 2022 12:49:19 -0400 Received: from out0.migadu.com ([2001:41d0:2:267::]:24159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZb0H-0004yC-8B for help-guix@gnu.org; Sat, 17 Sep 2022 12:49:19 -0400 References: <8735cr2qke.fsf@dominicm.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dominicm.dev; s=key1; t=1663433354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mxWVxF//z5aiJ3opncYTVj/k9kCF6HJW3iwPraNIctQ=; b=C/utJex1ErV0q2iaGx3PScxzedpaRfwQhmaGAg2kXRkjqNEWpFBTYaf7rRPepGTQBf2Jus hT65wBJ9fYsIyPs96slLyzlUeydJZZxuVfryYenvfHT34iWYQrvCg4UeETofAtbSXeYgoL 2A3QyL3CH2Du/wPkWsOL/7saWpIPZT/9q8PQzjOl8ZTFjWNjhJOG+lhnvx91d/maNB9g2m gUaLIH8CBSJqaXKqqLS+QwJJtU5Q1aXe3DWFqxWcJVCppiiTdrkoieao+L4JFOQohbbfPE EZ/F3w52CGQH+fevZ0YeDrQ7Bipm1n0DF8usGoS6G0v/K1pF4ie6sW3SPU3kyA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Dominic Martinez To: Daniel Sockwell Cc: "Thompson, David" , help-guix@gnu.org Subject: Re: Understanding the Guix approach when language package managers are around Date: Sat, 17 Sep 2022 12:10:47 -0400 In-reply-to: Message-ID: <87pmfu0wvs.fsf@dominicm.dev> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=dom@dominicm.dev; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" Authentication-Results: aspmx1.migadu.com; none X-Migadu-Scanner: scn0.migadu.com X-TUID: 0AOzIWHGBDoz --=-=-= Content-Type: text/plain "Daniel Sockwell" writes: > But isn't that something that Guix is really *good* at handling? > My understanding is that one of Guix's selling points is that it > allows package A to depend on both B and C even if B and C depend > on different versions of D (aka, the diamond-dependency problem). > So maybe Guix would be a better JavaScript package manager than > NPM is! > > (Or am I confused about what you meant or how Guix works?) Guix is great at solving the diamond dependency problem, but exactly representing that dependency structure implies an exponential number of package definitions. Usually packagers will try to find the minimal number of package versions that satisfy the requirements of their dependents, but when having multiple major versions of packages in your dependency tree is practically a given, it's a lot of duplication. Also consider that by default, module resolution is tied to the folder structure of 'node_modules', so as Philip said we'd have to re-implement PNPM's logic: https://pnpm.io/motivation https://npm.github.io/how-npm-works-docs/npm3/non-determinism.html https://npm.github.io/how-npm-works-docs/npm3/duplication.html >> I have a few fallbacks for when I can't work on a project in Guix: >> ... >> 2. Use Docker. A docker container with a volume linked to your code is >> almost always seamless. > > Ah, that's a good option. I experimented with some of Guix's --container > options but didn't consider using docker directly. I take it that's what > you do? Do you use docker compose and/or do anything to make your docker > containers more functional/fit better with Guix? If I'm just trying to have a more standard Linux environment I usually don't feel the need to use docker compose. You can just have a script that builds your environment, and another that launches the container in a directory: $ docker build -t - < # Build the image $ docker run -it --rm -v ${1}:/src # Run the image, bringing in a directory --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRtp6gAxeTcYmhxQ/1Bnl1fEVBrXQUCYyX6hwAKCRBBnl1fEVBr XWUEAP4538WthEE/8RTn2qDYghD7weinWMg+HnXwxA8uZExV6QEA6zgYRLIfOiZi /bWQIDw2f98EoyHcJz9igY/dwVOwPgU= =Ke2c -----END PGP SIGNATURE----- --=-=-=--