Subject: bug#37531: closed (Re: bug#37531: ‘%load-path’in shepherd is unnecessarily long)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 03 Oct 2019 21:52:05 +0000

Your bug report

#37531: ‘%load-path’ in shepherd is unnecessarily long

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
37531: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37531
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#37531: ‘%load-path’ in shepherd is unnecessarily long
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Date: Thu, 03 Oct 2019 23:50:52 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Ludovic Courtès <[email-masked]> skribis:

> $ sudo herd eval root '(length %load-path)'
> Evaluating user expression (length %load-path).
> 119

Commit cdf9811d24b9c857cb79e0ddd38181862ec34bd3 fixes that at the level
of ‘scheme-file’.

Ludo’.

Subject: ‘%load-path’ in shepherd is unnecessarily long
From: Ludovic Courtès <[email-masked]>
To: [email-masked]
Date: Fri, 27 Sep 2019 09:22:07 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello Guix!

Here’s what I get on my freshly booted system:

--8<---------------cut here---------------start------------->8---
$ sudo herd eval root %load-path
Evaluating user expression %load-path.
("/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/8a49xjf71dxzj2j4vqh4gw840xv1shxg-module-import" "/gnu/store/8a49xjf71dxzj2j4vqh4gw840xv1shxg-module-import" "/gnu/store/8a49xjf71dxzj2j4vqh4gw840xv1shxg-module-import" "/gnu/store/8a49xjf71dxzj2j4vqh4gw840xv1shxg-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/8a49xjf71dxzj2j4vqh4gw840xv1shxg-module-import" "/gnu/store/8a49xjf71dxzj2j4vqh4gw840xv1shxg-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/2dqkjgfd15yf3s62g001xkxgycadh7fm-module-import" "/gnu/store/2dqkjgfd15yf3s62g001xkxgycadh7fm-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/ldzgghnf4gm3y4367sknlig3wz3gvg7a-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/jrfjb1rd5jxi8fnz1ycsi55r4i7mpwr6-module-import" "/gnu/store/f4w6qzgsnxsm2cq8mn8fwnj5d5lirkad-shepherd-0.6.1/share/guile/site/2.2" "/gnu/store/1mkkv2caiqbdbbd256c4dirfi4kwsacv-guile-2.2.6/share/guile/2.2" "/gnu/store/1mkkv2caiqbdbbd256c4dirfi4kwsacv-guile-2.2.6/share/guile/site/2.2" "/gnu/store/1mkkv2caiqbdbbd256c4dirfi4kwsacv-guile-2.2.6/share/guile/site" "/gnu/store/1mkkv2caiqbdbbd256c4dirfi4kwsacv-guile-2.2.6/share/guile")
$ sudo herd eval root '(length %load-path)'
Evaluating user expression (length %load-path).
119
--8<---------------cut here---------------end--------------->8---

As you can see, this is not great.

This comes from the load-path expression in shepherd-*.scm:

--8<---------------cut here---------------start------------->8---
(eval-when
    (expand load eval)
  (set! %load-path
    (cons "/gnu/store/8a49xjf71dxzj2j4vqh4gw840xv1shxg-module-import"
	  (append
	   (map
	    (lambda
		(extension)
	      (string-append extension "/share/guile/site/"
			     (effective-version)))
	    (quote
	     ()))
	   %load-path)))
  (set! %load-compiled-path
    (cons "/gnu/store/lfj61bg7bb0aypqwj47j2dqnwc9bvpiw-module-import-compiled"
	  (append
	   (map
	    (lambda
		(extension)
	      (string-append extension "/lib/guile/"
			     (effective-version)
			     "/site-ccache"))
	    (quote
	     ()))
	   %load-compiled-path))))
--8<---------------cut here---------------end--------------->8---

Problem is that every time you reconfigure, the load path grows.  Seen
on an important machine (ahem…):

--8<---------------cut here---------------start------------->8---
# herd eval root '(length %load-path)'
Evaluating user expression (length %load-path).
2508
--8<---------------cut here---------------end--------------->8---

Ludo’.