From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 13 22:59:15 2022 Received: (at submit) by debbugs.gnu.org; 14 Sep 2022 02:59:15 +0000 Received: from localhost ([127.0.0.1]:53266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYIcN-0003Ok-8h for submit@debbugs.gnu.org; Tue, 13 Sep 2022 22:59:15 -0400 Received: from lists.gnu.org ([209.51.188.17]:43328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYIcK-0003Oc-4x for submit@debbugs.gnu.org; Tue, 13 Sep 2022 22:59:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYIcJ-0007J6-Uz for bug-guix@gnu.org; Tue, 13 Sep 2022 22:59:11 -0400 Received: from mout02.posteo.de ([185.67.36.66]:59493) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYIcH-0000CB-Ir for bug-guix@gnu.org; Tue, 13 Sep 2022 22:59:11 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 82E33240101 for ; Wed, 14 Sep 2022 04:59:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1663124346; bh=Lz8K6ESWIdfHcc8oVTBel5zlntXCb7/IMxU7FNDwKPI=; h=From:To:Subject:Date:From; b=PWSbrFnclEpRV3BOJzkHoXFM4FNbIriBIeqfRgNiNt+tw8UChpdVyA4VGm60HnJ7q +M+TMt2XuJdsW4VQ4RfFnJRMxl9JAl0xKiK6iKZP9uPvvyIrePbljRv8uBW5ZIt8Pe 6StfR7gdXU5C7dg8Lvq5ZULislWOMSS6pQPsl/hrMnTYLL88drYHl2Ry2HIBiopOtl X6VBZ4wsUa2fLsN6W7kYoAHqJ8im8altrbFVucziZ9f0JrSAkZLxB2/61NEAaBaPJH T2AtiVteaL9LBW1lcB/mYFWdrNpyxNkkTkhdih4KXimV2WjVDjfumnPnGntvj8hKLM UpCrpBnLA/j1A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MS4mT496tz9rxG for ; Wed, 14 Sep 2022 04:59:05 +0200 (CEST) From: Fredrik Salomonsson To: bug-guix@gnu.org Subject: Strange behavior with emacs-build-system Date: Wed, 14 Sep 2022 02:59:03 +0000 Message-ID: <87v8pqbr0o.fsf@d2.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=plattfot@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, I encountered a strange behavior when using a guix.scm file to build and run test in an emacs project. The project is called issue.el[0]. I have the following guix.scm: ---=E2=9C=80---------------------------------------------------------------= ------------- (use-modules ((guix licenses) #:prefix license:) (guix packages) (guix gexp) (guix download) (guix git-download) (guix build-system emacs) (guix build emacs-utils) (gnu packages) (gnu packages emacs) (gnu packages emacs-xyz) (ice-9 popen) (ice-9 rdelim) ) (define %git-commit (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f2" OPEN_R= EAD))) (define (skip-git-directory file stat) "Skip the `.git` directory when collecting the sources." (let ((name (basename file))) (not (string=3D? name ".git")))) (package (name "emacs-issue-el") (version (git-version (emacs-header-parse "version" "issue.el") "HEAD" %gi= t-commit)) (source (local-file (dirname (current-filename)) #:recursive? #t #:select? skip-git-directory)) (build-system emacs-build-system) (arguments (list #:tests? (not (%current-target-system)) #:test-command #~'("ert-runner"))) (native-inputs (list emacs-ert-runner)) (propagated-inputs (list emacs-org-jira)) (home-page "https://sr.ht/~plattfot/issue.el") (synopsis "List issues from various issue trackers in emacs") (description "List issues from various issue trackers in a tabulated buffer in @code{Emacs} and act on them. Current supported issue tracker is @code{jira}.") (license license:gpl3+)) ---------------------------------------------------------------------------= ----- If I name the local clone `issue.el` (name of the directory); `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will fail. It will just copy the fi= le `issue.el` and then `ert-runner` fails as there is no test directory. But if I name the local clone something else, e.g. `issue-el` then it will copy all the files, `ert-runner` will be happy and `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will succeed. I'm not sure if this is an issue in `emacs-build-system`, `local-file` or plain old user error. [0] https://git.sr.ht/~plattfot/issue.el --=20 s/Fred[re]+i[ck]+/Fredrik/g From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 11 06:52:32 2022 Received: (at 57790) by debbugs.gnu.org; 11 Oct 2022 10:52:32 +0000 Received: from localhost ([127.0.0.1]:51139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiCsB-0004vp-LX for submit@debbugs.gnu.org; Tue, 11 Oct 2022 06:52:31 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:55226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiCs1-0004up-G1 for 57790@debbugs.gnu.org; Tue, 11 Oct 2022 06:52:25 -0400 Received: by mail-wm1-f46.google.com with SMTP id iv17so8349376wmb.4 for <57790@debbugs.gnu.org>; Tue, 11 Oct 2022 03:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Vtgpo4BymkRFJVEeWHgRMLc30MUzD6Yn9u2fqBrL3RU=; b=k4cJaYi4rro23ZEv4/a0Qf0wLfqeoXpgNqO1TVnUCjmeruSo4f0DBfmZAEBqUwIvfb OfkN5xFPbDi33ui1u5pcXMHUjivMh8nea14GQ+UdfupYM20Jl0D5/edc4QVyC8jcVWMl TJKPgLukxTY6D4UOXshjIfJNIw1lWHPO9b87tsxRbGB2Of+aw0anPVjq5/nUO3+qgmnj 7Sz6xVAIgLP1IsfPQDI/NHBjUDtX/yNR7mYFjLsYoQiWUgcu7cOZY1jBfC4wvLWgrf6a 0GPan58i3pLqwEQNLznh3GRKzTCOWHMxVqS+UgaaVHkALZpsPlA0aWLlxoiXd+5AOHRK Q0jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=Vtgpo4BymkRFJVEeWHgRMLc30MUzD6Yn9u2fqBrL3RU=; b=LwpDc6w5zO7A8SbWioek6STaAjkw6U+ZKkuAtz5cL/c7rQJTdDWTTRVArGf8WCAbxU bOJujpuf5M+7/8IX5cn44pKu4Xnc321iWBC5Y/QWV4dE6no+2LURiMyUPxxdcQ0y9om0 QJNXpXeWe+tHH6+oPybHCdirzonq11UyrQPMWlV1T21vpdkmy7+UfabzVOq0C7iMIH87 FIWSQrjB1ksbWZFdVqF+kgRcZdwEE3ekDKiegrKKyH4O53adZIOWnycVdkoJvAwkUwPr mV1M7STB9cCPT03D4c7Kj6kapm+wyspb9Kp3DStELphbV+CkYVKEepvt8zb6RdpVHgxL r+dA== X-Gm-Message-State: ACrzQf1wp9ymDetK6LKQ76SIE074Dcq8so9J+L76WrqpIIUmMradEBaV RgEV5WFWRe4tWnVVXrlZGWhuloY6EYI= X-Google-Smtp-Source: AMsMyM4jgRDqz2BbDDer2S1IG3MmPH2A8N5MZBp5skBkkSJ7RdGvd5rt/la2i+/EdAdU/P02loy6kA== X-Received: by 2002:a05:600c:1910:b0:3b4:bb80:c951 with SMTP id j16-20020a05600c191000b003b4bb80c951mr23313199wmq.81.1665485535844; Tue, 11 Oct 2022 03:52:15 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id t10-20020a05600001ca00b0022ccae2fa62sm10912110wrx.22.2022.10.11.03.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 03:52:15 -0700 (PDT) From: zimoun To: Fredrik Salomonsson , 57790@debbugs.gnu.org Subject: Re: bug#57790: Strange behavior with emacs-build-system In-Reply-To: <87v8pqbr0o.fsf@d2.com> References: <87v8pqbr0o.fsf@d2.com> Date: Tue, 11 Oct 2022 11:51:14 +0200 Message-ID: <86wn96ofhp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 57790 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Wed, 14 Sep 2022 at 02:59, Fredrik Salomonsson wro= te: > If I name the local clone `issue.el` (name of the directory); > `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will fail. It will just copy the = file > `issue.el` and then `ert-runner` fails as there is no test directory. > > But if I name the local clone something else, e.g. `issue-el` then it > will copy all the files, `ert-runner` will be happy and > `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will succeed. > > I'm not sure if this is an issue in `emacs-build-system`, `local-file` > or plain old user error. Well, I guess it comes from =E2=80=99unpack=E2=80=99; which reads: --8<---------------cut here---------------start------------->8--- (define* (unpack #:key source #:allow-other-keys) "Unpack SOURCE into the build directory. SOURCE may be a compressed archive, a directory, or an Emacs Lisp file." (if (string-suffix? ".el" source) (begin (mkdir "source") (chdir "source") (copy-file source (store-file->elisp-source-file source)) #t) (gnu:unpack #:source source))) --8<---------------cut here---------------end--------------->8--- Well, I guess again that the =E2=80=99source=E2=80=99 should contain someth= ing like, (file-name (git-file-name name version) to avoid the issue. But the naive approach does not work with =E2=80=99local-file=E2=80=99. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 11 13:32:23 2022 Received: (at 57790) by debbugs.gnu.org; 11 Oct 2022 17:32:23 +0000 Received: from localhost ([127.0.0.1]:54741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiJ79-0003QD-5F for submit@debbugs.gnu.org; Tue, 11 Oct 2022 13:32:23 -0400 Received: from mout02.posteo.de ([185.67.36.66]:60833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiJ75-0003Pz-5F for 57790@debbugs.gnu.org; Tue, 11 Oct 2022 13:32:21 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1C7DF240104 for <57790@debbugs.gnu.org>; Tue, 11 Oct 2022 19:32:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665509533; bh=5vjXzQD0037QGfp1HzGpOpYgo7cSTmTvNjSC8dWcJQQ=; h=From:To:Subject:Date:From; b=dqwatssKvemXbMyxvzLBc3vNklciDbQ5ZOPwNUg5Vt4wNpv7aTjTTG0K7Gm22IGSu aQE9c0ZrIJek/eFk5LQB443RJA1MzHQ1svJKhIl5scBZ15i82Cv5vrdorRzEzQMQ0E /XBXziF8RWvTgQVlB6F2myBMgbG4iyLx8ZOCrXNJufwsQOkj/ILJCjdgE8t+XCi7fn OLcP3XFp7Fmr/JNyDo+0X6p54lNCv70XgJoKjcjBrydsCq5zj4DJnw5J0w6VZJzLsV sMxODBl+kZRnFIODsLrnFidVvYvLrVbbWOQMfOWC53oZEiWOO25gjyqTeEogpYgMPI RjcZNoydW5lGQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mn2sP4cjjz6tq0; Tue, 11 Oct 2022 19:32:09 +0200 (CEST) From: Fredrik Salomonsson To: zimoun , 57790@debbugs.gnu.org Subject: Re: bug#57790: Strange behavior with emacs-build-system In-Reply-To: <86wn96ofhp.fsf@gmail.com> References: <87v8pqbr0o.fsf@d2.com> <86wn96ofhp.fsf@gmail.com> Date: Tue, 11 Oct 2022 17:32:07 +0000 Message-ID: <87k056qnag.fsf@d2.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 57790 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, zimoun writes: > On Wed, 14 Sep 2022 at 02:59, Fredrik Salomonsson w= rote: > >> If I name the local clone `issue.el` (name of the directory); >> `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will fail. It will just copy the= file >> `issue.el` and then `ert-runner` fails as there is no test directory. >> >> But if I name the local clone something else, e.g. `issue-el` then it >> will copy all the files, `ert-runner` will be happy and >> `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will succeed. >> >> I'm not sure if this is an issue in `emacs-build-system`, `local-file` >> or plain old user error. > > Well, I guess it comes from =E2=80=99unpack=E2=80=99; which reads: > > --8<---------------cut here---------------start------------->8--- > (define* (unpack #:key source #:allow-other-keys) > "Unpack SOURCE into the build directory. SOURCE may be a compressed > archive, a directory, or an Emacs Lisp file." > (if (string-suffix? ".el" source) > (begin > (mkdir "source") > (chdir "source") > (copy-file source (store-file->elisp-source-file source)) > #t) > (gnu:unpack #:source source))) > --8<---------------cut here---------------end--------------->8--- Ah, yeah that would make sense. > Well, I guess again that the =E2=80=99source=E2=80=99 should contain some= thing like, > > (file-name (git-file-name name version) > > to avoid the issue. But the naive approach does not work with > =E2=80=99local-file=E2=80=99. Would `file-is-directory?` work? E.g. (if (and (string-suffix? ".el" source) (not (file-is-directory? source))) =E2=80=A6) I'm currently at work so I cannot test this right now. --=20 s/Fred[re]+i[ck]+/Fredrik/g From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 11 23:47:05 2022 Received: (at 57790) by debbugs.gnu.org; 12 Oct 2022 03:47:05 +0000 Received: from localhost ([127.0.0.1]:55290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiSi0-0000hG-NG for submit@debbugs.gnu.org; Tue, 11 Oct 2022 23:47:05 -0400 Received: from mout02.posteo.de ([185.67.36.66]:44665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiShx-0000gi-Sm for 57790@debbugs.gnu.org; Tue, 11 Oct 2022 23:47:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BD98E240101 for <57790@debbugs.gnu.org>; Wed, 12 Oct 2022 05:46:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1665546415; bh=GValoljYw89lC57NbuSsds2n9SevIihJXsmSge7PVYM=; h=From:To:Subject:Date:From; b=HLhNQ5HMj65is0361K3n/SozXpQmNvc3wIE38KQdtYJ7FmxnyEq/RrwRxWuukXGq/ iwxtHOms3g1zUiZqBUKK701DUeGtifCdeCyxTux8N3k+559ALboaezEghMvxv+muq0 3/hhpnop8ktMkAImNrTOsiIie05V/5kQuzHfcQhCkAvqOViJbLUgh6vqzi7gr1nt0K rl0GfEYiYy1UML3KeZz4DyuHoZXC4V0Q7P/wgJkHkjiLyUkVzulXox5hNXwchQ3NmS HqFh8zR66oDSsQlhcaocjPTOHqWtqTdw967E4/oUIcl5SADHEPAEYYZYdGmpHmMbdG XS4EOhIOwO2tA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MnJVg4FKFz6tpW; Wed, 12 Oct 2022 05:46:51 +0200 (CEST) From: Fredrik Salomonsson To: zimoun , 57790@debbugs.gnu.org Subject: Re: bug#57790: Strange behavior with emacs-build-system In-Reply-To: <87k056qnag.fsf@d2.com> References: <87v8pqbr0o.fsf@d2.com> <86wn96ofhp.fsf@gmail.com> <87k056qnag.fsf@d2.com> Date: Wed, 12 Oct 2022 03:46:49 +0000 Message-ID: <87edvdzot2.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 57790 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Fredrik Salomonsson writes: > Hi, > > zimoun writes: > >> On Wed, 14 Sep 2022 at 02:59, Fredrik Salomonsson = wrote: >> >>> If I name the local clone `issue.el` (name of the directory); >>> `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will fail. It will just copy th= e file >>> `issue.el` and then `ert-runner` fails as there is no test directory. >>> >>> But if I name the local clone something else, e.g. `issue-el` then it >>> will copy all the files, `ert-runner` will be happy and >>> `guix=C2=A0build=C2=A0-f=C2=A0guix.scm` will succeed. >>> >>> I'm not sure if this is an issue in `emacs-build-system`, `local-file` >>> or plain old user error. >> >> Well, I guess it comes from =E2=80=99unpack=E2=80=99; which reads: >> >> --8<---------------cut here---------------start------------->8--- >> (define* (unpack #:key source #:allow-other-keys) >> "Unpack SOURCE into the build directory. SOURCE may be a compressed >> archive, a directory, or an Emacs Lisp file." >> (if (string-suffix? ".el" source) >> (begin >> (mkdir "source") >> (chdir "source") >> (copy-file source (store-file->elisp-source-file source)) >> #t) >> (gnu:unpack #:source source))) >> --8<---------------cut here---------------end--------------->8--- > > Ah, yeah that would make sense. > >> Well, I guess again that the =E2=80=99source=E2=80=99 should contain som= ething like, >> >> (file-name (git-file-name name version) >> >> to avoid the issue. But the naive approach does not work with >> =E2=80=99local-file=E2=80=99. > > Would `file-is-directory?` work? E.g. > > (if (and (string-suffix? ".el" source) > (not (file-is-directory? source))) > =E2=80=A6) > > I'm currently at work so I cannot test this right now. I just tested it and it at least fixed my issue. I haven't tested any other emacs package yet. Also I'm not sure if this is the best solution. But we now know it is the `unpack` phase that is the cause. --=20 s/Fred[re]+i[ck]+/Fredrik/g