unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Direct symlink farm for transitive dependencies vs search paths
@ 2024-09-18  1:41 amano.kenji
  0 siblings, 0 replies; 3+ messages in thread
From: amano.kenji @ 2024-09-18  1:41 UTC (permalink / raw)
  To: help-guix@gnu.org

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?


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: Direct symlink farm for transitive dependencies vs search paths
@ 2024-09-18  5:49 Adam Faiz
  2024-09-18  8:10 ` amano.kenji
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Faiz @ 2024-09-18  5:49 UTC (permalink / raw)
  To: amano.kenji; +Cc: help-guix

> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-18  8:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-18  1:41 Direct symlink farm for transitive dependencies vs search paths amano.kenji
  -- strict thread matches above, loose matches on Subject: below --
2024-09-18  5:49 Adam Faiz
2024-09-18  8:10 ` amano.kenji

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).