all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "amano.kenji" <amano.kenji@proton.me>
To: Adam Faiz <adam.faiz@disroot.org>
Cc: help-guix@gnu.org
Subject: Re: Direct symlink farm for transitive dependencies vs search paths
Date: Wed, 18 Sep 2024 08:10:04 +0000	[thread overview]
Message-ID: <y0zImjkFLQ8c4tJWJAZqGgzf1vaoWz-wcE4x2dQwjwAjSTU6VCVwz31Ld31nCTKHxVOY5LY5TrZaRNSH69s93QnYHHz9TtHSK4hg3SLbJDg=@proton.me> (raw)
In-Reply-To: <d5b03794-8cc8-0058-8cef-a0b06844e825@disroot.org>

But, aren't search paths slower than symlinks when there are many transitive dependencies?

What about interpreted scripts that have many transitive dependencies?

Are symlinks to transitive dependencies sometimes used in guix channel?

On Wednesday, September 18th, 2024 at 5:49 AM, Adam Faiz <adam.faiz@disroot.org> wrote:

> > Let's say that A depends on B, and B depends on C.
> > 
> > With search paths, A doesn't have symlinks to B, and B doesn't have symlinks to
> > C. Thus, disk space is saved.
> > 
> > However, adding search path patches to existing softwares is cumbersome, and a
> > long list of search paths results in inefficient searches.
> > 
> > Let's assume that B has symlinks to C, and A has symlinks to everything in B.
> > This means A has symlinks to symlinks in B. Transitive symlink is probably more
> > efficient than search path. If A just copies symlinks from B and has symlinks
> > to plain files in B, then A ends up with only direct symlinks. Direct symlinks
> > are more efficient than transitive symlinks.
> > 
> > It seems that search paths are preferred over symlinks to transitive
> > dependencies in gnu guix. Why?
> 
> Search paths are preferred because their purpose is to provide a list of places to look for extensions/plugins/mods of a package. Essentially, search paths are a way to provide runtime dependencies that are optional.
> 
> Packages usually link directly to their dependencies at compile time, except for scripting programming languages(which aren't expected to have linking functionality). Propagated inputs are used for the transitive dependencies you mention, but they should only be used for required dependencies that have to be installed with the package for it to detect them.
> 
> Packages shouldn't need to have symlinks in their output to another package when it could just directly reference it instead. More information on how native-inputs, inputs and propagated-inputs are different is explained in the Guix manual:
> https://guix.gnu.org/manual/devel/en/html_node/package-Reference.html#index-inputs_002c-of-packages


  reply	other threads:[~2024-09-18  8:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-18  5:49 Direct symlink farm for transitive dependencies vs search paths Adam Faiz
2024-09-18  8:10 ` amano.kenji [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-18  1:41 amano.kenji

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

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

  git send-email \
    --in-reply-to='y0zImjkFLQ8c4tJWJAZqGgzf1vaoWz-wcE4x2dQwjwAjSTU6VCVwz31Ld31nCTKHxVOY5LY5TrZaRNSH69s93QnYHHz9TtHSK4hg3SLbJDg=@proton.me' \
    --to=amano.kenji@proton.me \
    --cc=adam.faiz@disroot.org \
    --cc=help-guix@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.