GNU bug report logs - #71495
Add command line flag to add to load path without evaluation

Previous Next

Package: guix;

Reported by: Richard Sent <richard <at> freakingpenguin.com>

Date: Tue, 11 Jun 2024 21:20:01 UTC

Severity: normal

To reply to this bug, email your comments to 71495 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#71495; Package guix. (Tue, 11 Jun 2024 21:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Richard Sent <richard <at> freakingpenguin.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 11 Jun 2024 21:20:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Richard Sent <richard <at> freakingpenguin.com>
To: bug-guix <at> gnu.org
Subject: Add command line flag to add to load path without evaluation
Date: Tue, 11 Jun 2024 17:19:22 -0400
Hi Guix!

In Guile, -L is a equivalent shorthand for adding to the %load-path
variable. No actual files are evaluated. In Guix, -L actually evaluates
files (at least in some capacity) to look for package definitions,
allowing for uses like $ guix -L . <some_local_package>.

This has a performance impact as channels grow, so it would be nice if
there was an alternative command line flag that matched Guile's
behavior.

To showcase the issue, here's three examples of "building" an
already-built home environment. I would use $ guix repl instead, but -L
in guix repl seems to match Guile's behavior, not Guix's.

--8<---------------cut here---------------start------------->8---
# Baseline, no load path additions
gibraltar :) rsent$ bash -c 'time guix home build rsent/home/minimal.scm'
/gnu/store/5m062lg4f32j9hlirfkcp5141px6sgkv-home

real	0m9.776s
user	0m22.981s
sys	0m0.233s

# GUILE_LOAD_PATH, within margin of error of baseline
gibraltar :) rsent$ GUILE_LOAD_PATH=. bash -c 'time guix home build rsent/home/minimal.scm'
/gnu/store/5m062lg4f32j9hlirfkcp5141px6sgkv-home

real	0m10.016s
user	0m23.064s
sys	0m0.186s

# -L ., consistently ~25% longer to complete 
gibraltar :) rsent$ bash -c 'time guix home build -L . rsent/home/minimal.scm'
/gnu/store/5m062lg4f32j9hlirfkcp5141px6sgkv-home

real	0m12.791s
user	0m29.569s
sys	0m0.247s
--8<---------------cut here---------------end--------------->8---

At present one can set GUILE_LOAD_PATH manually to work around this
issue. In my opinion this isn't very discoverable. Furthermore, it can't
_cleanly_ handle cases when GUILE_LOAD_PATH is already set or needs
multiple entries. It also makes certain commands with bash builtins
(like time...) awkward since you have to enter a subshell.

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.




Information forwarded to bug-guix <at> gnu.org:
bug#71495; Package guix. (Thu, 04 Jul 2024 03:21:02 GMT) Full text and rfc822 format available.

Message #8 received at 71495 <at> debbugs.gnu.org (full text, mbox):

From: Richard Sent <richard <at> freakingpenguin.com>
To: 71495 <at> debbugs.gnu.org
Subject: Re: bug#71495: Add command line flag to add to load path without
 evaluation
Date: Wed, 03 Jul 2024 23:20:30 -0400
Richard Sent <richard <at> freakingpenguin.com> writes:

> At present one can set GUILE_LOAD_PATH manually to work around this
> issue. In my opinion this isn't very discoverable. Furthermore, it can't
> _cleanly_ handle cases when GUILE_LOAD_PATH is already set or needs
> multiple entries. It also makes certain commands with bash builtins
> (like time...) awkward since you have to enter a subshell.

I noticed that when using ./pre-inst-env, augmenting GUILE_LOAD_PATH
manually isn't trivial. I'm not quite sure how to describe the failures,
but they seem manifold.

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.




This bug report was last modified 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.