unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Vivien Kraus via General Guile related discussions <guile-user@gnu.org>
To: guile-user <guile-user@gnu.org>
Subject: Trying to fix propagated-inputs in Guix for Guile libraries
Date: Thu, 14 Oct 2021 23:12:00 +0200	[thread overview]
Message-ID: <e8594643a9adcf3eacd9660f0674004e9504c81e.camel@planete-kraus.eu> (raw)

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




                 reply	other threads:[~2021-10-14 21:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8594643a9adcf3eacd9660f0674004e9504c81e.camel@planete-kraus.eu \
    --to=guile-user@gnu.org \
    --cc=vivien@planete-kraus.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).