From mboxrd@z Thu Jan 1 00:00:00 1970 From: brettg@posteo.net Subject: bug#38261: Recent changes to emacs build system Date: Tue, 19 Nov 2019 02:58:33 +0100 Message-ID: <57dee66c6531e9c8afbc5a22518d9917@posteo.net> References: <848bb376e0d6e171347afe53ce79bd96@posteo.net> <421db4d1a206488fa1883e40666846c5@posteo.net> <805ec3dde9328f427bc34126c36735d3@posteo.net> <70112f45226b44a1234a4d41aa7ac610@posteo.net> <26711cb3bba8555dea8ac4e9f8220726@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37509) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWsnI-0001dr-0T for bug-guix@gnu.org; Mon, 18 Nov 2019 20:59:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iWsnG-0001Xv-HL for bug-guix@gnu.org; Mon, 18 Nov 2019 20:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iWsnG-0001Xf-DT for bug-guix@gnu.org; Mon, 18 Nov 2019 20:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iWsnG-0002by-8N for bug-guix@gnu.org; Mon, 18 Nov 2019 20:59:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:37396) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWsmu-0001Xc-G7 for Bug-guix@gnu.org; Mon, 18 Nov 2019 20:58:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iWsms-00018G-6d for Bug-guix@gnu.org; Mon, 18 Nov 2019 20:58:40 -0500 Received: from mout01.posteo.de ([185.67.36.65]:35416) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iWsmr-00015t-Jw for Bug-guix@gnu.org; Mon, 18 Nov 2019 20:58:38 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id A701916005F for ; Tue, 19 Nov 2019 02:58:35 +0100 (CET) In-Reply-To: <26711cb3bba8555dea8ac4e9f8220726@posteo.net> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Bug guix , Ricardo Wurmus Cc: bug-Guix On 19.11.2019 01:32, brettg@posteo.net wrote: > On 19.11.2019 01:27, brettg@posteo.net wrote: >> On 18.11.2019 22:34, brettg@posteo.net wrote: >>> On 18.11.2019 21:33, brettg@posteo.net wrote: >>>> On 18.11.2019 21:28, brettg@posteo.net wrote: >>>>> On 18.11.2019 20:01, brettg@posteo.net wrote: >>>>>> Hey all, the recent changes to the emacs build system result in a=20 >>>>>> few >>>>>> broken packages like emacs-pdf-tools, or basically anything that=20 >>>>>> uses >>>>>> a phase for emacs-set-emacs-load-path. >>>>>>=20 >>>>>> For example, I borrowed the technique used by emacs-pdf-tools to >>>>>> package emacs-telega, resulting in both packages failing to build: >>>>>>=20 >>>>>> Here is the code for emacs-telega: >>>>>>=20 >>>>>> https://git.sr.ht/~brettgilio/cfg/tree/master/channel/non-gnu/packag= es/emacs-xyz.scm#L99 >>>>>>=20 >>>>>> The issue is in this phase for both emacs-pdf-tools and my channel= =20 >>>>>> package: >>>>>>=20 >>>>>> (add-after 'compress-documentation 'emacs-set-emacs-load-path >>>>>> (assoc-ref emacs:%standard-phases 'set-emacs-load-path)) >>>>>>=20 >>>>>> Resulting in: >>>>>>=20 >>>>>> starting phase `emacs-set-emacs-load-path' >>>>>> Backtrace: >>>>>> 5 (primitive-load=20 >>>>>> "/gnu/store/5b1p1gsvfyi4fbx4s42rhab2dns=E2=80=A6") >>>>>> In ice-9/eval.scm: >>>>>> 191:35 4 (_ _) >>>>>> In ice-9/boot-9.scm: >>>>>> 829:9 3 (catch _ _ #>>>>> /gnu/store/zmkg=E2=80=A6> =E2=80=A6) >>>>>> In srfi/srfi-1.scm: >>>>>> 863:16 2 (every1 #>>>>> /gnu/store/zmkgrvv=E2=80=A6> =E2=80=A6) >>>>>> In >>>>>> /gnu/store/zmkgrvvhmrix2b1z7id6zrg9bb7qxzdl-module-import/guix/build= /gnu-build-system.scm: >>>>>> 839:30 1 (_ _) >>>>>> In unknown file: >>>>>> 0 (_ #:source=20 >>>>>> "/gnu/store/qw8xbmk6ryl9a2jrp0gip3yffmsdix=E2=80=A6" =E2=80=A6) >>>>>>=20 >>>>>> ERROR: Wrong type to apply: #f >>>>>>=20 >>>>>> If we suspect that changes are going to be non-backwards=20 >>>>>> compatible >>>>>> could we use the news system to pass along that message? Much >>>>>> appreciated. Thanks. >>>>>>=20 >>>>>> Brett Gilio >>>>>=20 >>>>> I applied a hotfix to the package by replacing 'set-emacs-load-path >>>>> with 'add-source-to-load-path. I believe this fix would work for=20 >>>>> all >>>>> other affected packages. >>>>=20 >>>> https://git.sr.ht/~brettgilio/cfg/commit/c24a6db9d25151c487e9db675bd74= e4bb3912173 >>>=20 >>> Ricardo, just wanted to make you aware that this emacs-build-system >>> change does break your guile-studio. I discovered this because I >>> adopted some of your ideas of autoloading in the generated emacs lisp >>> from guile-studio when creating my own emacs configuration dependent >>> on guix, which resulted in >>>=20 >>> progn: Wrong number of arguments: (lambda nil "Autoload Emacs=20 >>> packages >>> found in EMACSLOADPATH. >>>=20 >>> 'Autoload' means to load the 'autoloads' files matching >>> `guix-emacs-autoloads-regexp'." (interactive) (let* ((emacs-load-path >>> (getenv "EMACSLOADPATH")) (emacs-non-core-load-path-directories >>> (seq-filter (function (lambda (dir) (string-match-p >>> "/share/emacs/site-lisp" dir))) (split-string emacs-load-path ":"))) >>> (autoloads (mapcan (function guix-emacs-find-autoloads) >>> emacs-non-core-load-path-directories))) (mapc (function (lambda (f) >>> (load f (quote noerror)))) autoloads))), 78 >>>=20 >>> I'll let you know if I can find any fix for this when I get some=20 >>> time. >>> But just wanted to pass the message along. >>>=20 >>> Brett >>=20 >> I tried removing the arguments passed to >> `guix-emacs-autoload-packages' as the updated version >> (http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/aux-files/e= macs/guix-emacs.el?id=3D47b3b4c2aa49e21f4cc32c97ff7bbbd069bb849c) >> does not carry arguments anymore, instead depending on a variable >> EMACSLOADPATH. However, whenever that is done it returns >>=20 >> split-string: Wrong type argument: stringp, nil >>=20 >> possibly because my system is not finding EMACSLOADPATH. >>=20 >> I will keep investigating. >=20 > I can confirm, when running something analogous to `guix environment > --ad-hoc emacs-dashboard` no changes are being made to the > $GUIX_ENVIRONMENT/etc/profile to resemble EMACSLOADPATH. So I have investigated the issue with EMACSLOADPATH: Similar to=20 Ricardo's guile-studio, my package enlign was using the autoload function from guix-emacs.el to=20 propagate a list of packages called from inputs to be loaded with the start of emacs. I have since revised this to just call the autoload function directly,=20 no longer passing any arguments, and had to modify my enlign package to=20 respect the EMACSLOADPATH variable. This is only possible if all of the=20 packages are passed as propagated-inputs though, which is less than=20 desirable in my opinion (though I am willing to be convinced.) This additionally leads to having to require emacs as a propagated input=20 as well, as leading it native or regular input leads to an error with=20 emacs not recognizing simple.el or mule-util. Overall, I am not sure if I like the recent change to guix-emacs.el. I=20 understand where the incentive is to do this, but ultimately it seems to=20 lead to more headache when creating packages around emacs. https://git.sr.ht/~brettgilio/cfg/commit/47bc9ae544ba10c0cacef1435625dcb011= 4e8cf5 Anyways, If there is no other comment, this issue really just needs to fix=20 emacs-pdf-tools and other affected packages from the recent string of=20 changes. Best, Brett Gilio