From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vivien Kraus via General Guile related discussions Newsgroups: gmane.lisp.guile.user Subject: Trying to fix propagated-inputs in Guix for Guile libraries Date: Thu, 14 Oct 2021 23:12:00 +0200 Message-ID: Reply-To: Vivien Kraus Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31798"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.34.2 To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Oct 14 23:12:44 2021 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mb81r-00081k-UX for guile-user@m.gmane-mx.org; Thu, 14 Oct 2021 23:12:44 +0200 Original-Received: from localhost ([::1]:43482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mb81q-0000gf-Fo for guile-user@m.gmane-mx.org; Thu, 14 Oct 2021 17:12:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mb81Q-0000dR-8a for guile-user@gnu.org; Thu, 14 Oct 2021 17:12:18 -0400 Original-Received: from planete-kraus.eu ([89.234.140.182]:55130) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1mb81L-0000r5-I1 for guile-user@gnu.org; Thu, 14 Oct 2021 17:12:15 -0400 Original-Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id 3a9cd45f for ; Thu, 14 Oct 2021 21:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:subject:from:to:date:content-type:mime-version :content-transfer-encoding; s=*; bh=/OrcC0baCni37ryXGAf2vSXaFzI=; b= dOxj9PWWoxA2uydzyD0JEcRbO9NNmTUhvevWfBKUQCb15KKcmH0Erz+Mt5Mao/Wu NE4U2MFEP1Xl+JtF71mmjCEs0eokzNPu+uU6OzWf4SMiloEAdLe+no8V43zzXePr +lYe3/qsXkFaiFU+jqL/w72v02p5J0Sxq4Vnig+KaOU= Original-Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 92ad864f (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO) for ; Thu, 14 Oct 2021 21:12:02 +0000 (UTC) Received-SPF: pass client-ip=89.234.140.182; envelope-from=vivien@planete-kraus.eu; helo=planete-kraus.eu X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17808 Archived-At: Dear guile users, I am thinking about how to avoid using propagated inputs with guile modules. In Guix, we may have different incompatible versions of a library. It might not be the case right now (are all guile-json versions really incompatible?), but we may be able to avoid some trouble in the future if we’re prepared. For C code, the solution is to make shared objects, and use the rpath option in each linked object to know where to find its dependencies ( https://en.wikipedia.org/wiki/Rpath). The fact that this behavior works for C lets me wonder why there’s no such thing in guile. Is it because, as it is a live environment, users are supposed to know better what library to use? In any case, if I wanted to have something like rpath in guile, I would want to do something like: (define-module (foo) #:use-module ((dependency) #:from "/gnu/store/xxx-dependency- 1.0/share/guile/site/3.0")) However, the path is only known after the configure step, so it’s not a good thing to write it down in the source code. So, we would only write it down in the bytecode, with a new compiler switch. The next question is, what to do with the source code? Would it be OK to have a different behavior for uncompiled source? After all, since it’s not compiled, configure has not run so there is no reason to think that the library author could find better dependencies than the user. Or, could we decide not to install source code (.scm) when installing a library, and only install .go files? Does guile even works if there’s no corresponding source code for a compiled module? Vivien