* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
[not found] ` <20210301171854.C42CB20E1B@vcs0.savannah.gnu.org>
@ 2021-03-03 14:44 ` Basil L. Contovounesios
[not found] ` <43A0C407-D217-46AF-8472-28DD2DE80D6C@acm.org>
2021-03-03 22:15 ` Stefan Monnier
0 siblings, 2 replies; 11+ messages in thread
From: Basil L. Contovounesios @ 2021-03-03 14:44 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]
monnier@iro.umontreal.ca (Stefan Monnier) writes:
> branch: master
> commit a0f60293d97cda858c033db4ae074e5e5560aab2
> Author: Stefan Monnier <monnier@iro.umontreal.ca>
> Commit: Stefan Monnier <monnier@iro.umontreal.ca>
>
> Fix misuses of `byte-compile-macro-environment`
This seems to result in the following test failure with 'make check',
but strangely not with 'make test/pcase-tests':
Test pcase-tests-macro backtrace:
signal(void-function (pcase-tests-plus--pcase-macroexpander))
apply(signal (void-function (pcase-tests-plus--pcase-macroexpander))
#f(compiled-function () #<bytecode -0x130ab4f40ca06d1f>)()
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name pcase-tests-macro :documentation nil
ert-run-or-rerun-test(#s(ert--stats :selector (not (or ... ...)) :te
ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/emacs-lisp/pcase-tes
command-line()
normal-top-level()
Test pcase-tests-macro condition:
(void-function pcase-tests-plus--pcase-macroexpander)
FAILED 5/9 pcase-tests-macro (0.000163 sec)
BTW, 'make bootstrap' now emits this warning:
In cl--sm-macroexpand:
emacs-lisp/cl-macs.el:2301:61: Warning: Unused lexical argument `dontcare'
(The 'sm' is the artist's signature, right? ;)
Is this the right fix?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Pacify-unused-var-warning-in-cl-sm-macroexpand.patch --]
[-- Type: text/x-diff, Size: 1026 bytes --]
From a29983cbbfb1fbd7cb2773d1e2dc89483df82bf4 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Wed, 3 Mar 2021 12:49:31 +0000
Subject: [PATCH] ; Pacify unused var warning in cl--sm-macroexpand.
---
lisp/emacs-lisp/cl-macs.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 91146c4d0e..c38dc44ff6 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2298,7 +2298,7 @@ cl--sm-macroexpand
;; The behavior of CL made sense in a dynamically scoped
;; language, but nowadays, lexical scoping semantics is more often
;; expected.
- (`(,(or 'let 'let*) . ,(or `(,bindings . ,body) dontcare))
+ (`(,(or 'let 'let*) . ,(or `(,bindings . ,body) pcase--dontcare))
(let ((nbs ()) (found nil))
(dolist (binding bindings)
(let* ((var (if (symbolp binding) binding (car binding)))
--
2.30.1
[-- Attachment #3: Type: text/plain, Size: 20 bytes --]
Thanks,
--
Basil
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
[not found] ` <43A0C407-D217-46AF-8472-28DD2DE80D6C@acm.org>
@ 2021-03-03 15:16 ` Basil L. Contovounesios
2021-03-03 15:23 ` Mattias Engdegård
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Basil L. Contovounesios @ 2021-03-03 15:16 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: emacs-devel
Mattias Engdegård <mattiase@acm.org> writes:
> 3 mars 2021 kl. 15.44 skrev Basil L. Contovounesios <contovob@tcd.ie>:
>
>> This seems to result in the following test failure with 'make check',
>> but strangely not with 'make test/pcase-tests':
>
> Maybe the latter doesn't use the byte-compiled version of the tests.
> Try something like
>
> make TEST_LOAD_EL=no -C test pcase-tests
Indeed, 'make TEST_LOAD_EL=yes test/pcase-tests' succeeds,
whereas 'make TEST_LOAD_EL=no test/pcase-tests' fails.
Should 'make test/%' be fixed to behave more like 'make check'?
Thanks,
--
Basil
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
2021-03-03 15:16 ` Basil L. Contovounesios
@ 2021-03-03 15:23 ` Mattias Engdegård
2021-03-03 15:26 ` Lars Ingebrigtsen
2021-03-04 8:41 ` Michael Albinus
2 siblings, 0 replies; 11+ messages in thread
From: Mattias Engdegård @ 2021-03-03 15:23 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: emacs-devel
3 mars 2021 kl. 16.16 skrev Basil L. Contovounesios <contovob@tcd.ie>:
> Indeed, 'make TEST_LOAD_EL=yes test/pcase-tests' succeeds,
> whereas 'make TEST_LOAD_EL=no test/pcase-tests' fails.
>
> Should 'make test/%' be fixed to behave more like 'make check'?
Maybe -- test/Makefile.in says:
# Whether to run tests from .el files in preference to .elc, we do
# this by default since it gives nicer stacktraces.
# If you just want a pass/fail, setting this to no is much faster.
export TEST_LOAD_EL ?= \
$(if $(findstring $(MAKECMDGOALS), all check check-maybe),no,yes)
For some tests it may be useful to run both .el and .elc; for others, it's just a waste of time.
My guess is that on balance, .elc is more important (and faster) but obviously .el gives better diagnostics when something fails.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
2021-03-03 15:16 ` Basil L. Contovounesios
2021-03-03 15:23 ` Mattias Engdegård
@ 2021-03-03 15:26 ` Lars Ingebrigtsen
2021-03-04 13:48 ` Basil L. Contovounesios
2021-03-04 8:41 ` Michael Albinus
2 siblings, 1 reply; 11+ messages in thread
From: Lars Ingebrigtsen @ 2021-03-03 15:26 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: Mattias Engdegård, emacs-devel
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
>> Maybe the latter doesn't use the byte-compiled version of the tests.
>> Try something like
>>
>> make TEST_LOAD_EL=no -C test pcase-tests
>
> Indeed, 'make TEST_LOAD_EL=yes test/pcase-tests' succeeds,
> whereas 'make TEST_LOAD_EL=no test/pcase-tests' fails.
Oh, that explains a lot -- why saying "make foo-tests" often passes while
saying "make check" fails, which has left me scratching my head often.
> Should 'make test/%' be fixed to behave more like 'make check'?
Yes, I think so.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
2021-03-03 14:44 ` master a0f6029: Fix misuses of `byte-compile-macro-environment` Basil L. Contovounesios
[not found] ` <43A0C407-D217-46AF-8472-28DD2DE80D6C@acm.org>
@ 2021-03-03 22:15 ` Stefan Monnier
2021-03-04 1:47 ` Basil L. Contovounesios
1 sibling, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2021-03-03 22:15 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: emacs-devel
>> Fix misuses of `byte-compile-macro-environment`
>
> This seems to result in the following test failure with 'make check',
> but strangely not with 'make test/pcase-tests':
Hmm... I wonder why the test code worked before that patch.
The problem is that pcase macros defined with `pcase-defmacro` can't be
used in the same file where they're defined (you need to wrap them in
`eval-and-compile`).
Maybe we should fix that, but the problem is not new, so I'm wondering
why the bug didn't trigger earlier.
> BTW, 'make bootstrap' now emits this warning:
>
> In cl--sm-macroexpand:
> emacs-lisp/cl-macs.el:2301:61: Warning: Unused lexical argument `dontcare'
Yes, that's good: the warning wanrs about an actual problem.
> (The 'sm' is the artist's signature, right? ;)
Nah, the artist found a good excuse: "s(ymbol-)m(acrolet)"
> Is this the right fix?
Yes, but it doesn't just pacify the byte-compiler: it fixes the source
code (in Emacs-27, this worked by accident, really).
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
2021-03-03 22:15 ` Stefan Monnier
@ 2021-03-04 1:47 ` Basil L. Contovounesios
2021-03-04 2:33 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Basil L. Contovounesios @ 2021-03-04 1:47 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> Fix misuses of `byte-compile-macro-environment`
>>
>> This seems to result in the following test failure with 'make check',
>> but strangely not with 'make test/pcase-tests':
>
> Hmm... I wonder why the test code worked before that patch.
> The problem is that pcase macros defined with `pcase-defmacro` can't be
> used in the same file where they're defined (you need to wrap them in
> `eval-and-compile`).
> Maybe we should fix that, but the problem is not new, so I'm wondering
> why the bug didn't trigger earlier.
Beats me :/. Even after reverting commits a0f60293d9 and 88ca2280ba,
'make check' still fails. But both 'git bisect', and checking out its
parent 6ad9b8d677, point to a0f60293d9 as being the culprit.
>> BTW, 'make bootstrap' now emits this warning:
>>
>> In cl--sm-macroexpand:
>> emacs-lisp/cl-macs.el:2301:61: Warning: Unused lexical argument `dontcare'
>
> Yes, that's good: the warning wanrs about an actual problem.
>
>> (The 'sm' is the artist's signature, right? ;)
>
> Nah, the artist found a good excuse: "s(ymbol-)m(acrolet)"
Not the kind of nom de plume you see every day.
>> Is this the right fix?
>
> Yes, but it doesn't just pacify the byte-compiler: it fixes the source
> code (in Emacs-27, this worked by accident, really).
Thanks, pushed with the log message adapted accordingly.
--
Basil
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
2021-03-04 1:47 ` Basil L. Contovounesios
@ 2021-03-04 2:33 ` Stefan Monnier
2021-03-04 13:38 ` Basil L. Contovounesios
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2021-03-04 2:33 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: emacs-devel
> Beats me :/. Even after reverting commits a0f60293d9 and 88ca2280ba,
> 'make check' still fails. But both 'git bisect', and checking out its
> parent 6ad9b8d677, point to a0f60293d9 as being the culprit.
It turns out it was because a `no-byte-compile` was hiding the problem.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
2021-03-03 15:16 ` Basil L. Contovounesios
2021-03-03 15:23 ` Mattias Engdegård
2021-03-03 15:26 ` Lars Ingebrigtsen
@ 2021-03-04 8:41 ` Michael Albinus
2 siblings, 0 replies; 11+ messages in thread
From: Michael Albinus @ 2021-03-04 8:41 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: Mattias Engdegård, emacs-devel
"Basil L. Contovounesios" <contovob@tcd.ie> writes:
Hi Basil,
> Should 'make test/%' be fixed to behave more like 'make check'?
It should be rather like 'make check-expensive', that means running also
expensive tests. As it does now.
> Thanks,
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
2021-03-04 2:33 ` Stefan Monnier
@ 2021-03-04 13:38 ` Basil L. Contovounesios
2021-03-04 14:50 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Basil L. Contovounesios @ 2021-03-04 13:38 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Beats me :/. Even after reverting commits a0f60293d9 and 88ca2280ba,
>> 'make check' still fails. But both 'git bisect', and checking out its
>> parent 6ad9b8d677, point to a0f60293d9 as being the culprit.
>
> It turns out it was because a `no-byte-compile` was hiding the problem.
Sometimes I feel like the compiler doesn't ignore our comments.
--
Basil
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
2021-03-03 15:26 ` Lars Ingebrigtsen
@ 2021-03-04 13:48 ` Basil L. Contovounesios
0 siblings, 0 replies; 11+ messages in thread
From: Basil L. Contovounesios @ 2021-03-04 13:48 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Mattias Engdegård, emacs-devel
Lars Ingebrigtsen <larsi@gnus.org> writes:
> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>>> Maybe the latter doesn't use the byte-compiled version of the tests.
>>> Try something like
>>>
>>> make TEST_LOAD_EL=no -C test pcase-tests
>>
>> Indeed, 'make TEST_LOAD_EL=yes test/pcase-tests' succeeds,
>> whereas 'make TEST_LOAD_EL=no test/pcase-tests' fails.
>
> Oh, that explains a lot -- why saying "make foo-tests" often passes while
> saying "make check" fails, which has left me scratching my head often.
>
>> Should 'make test/%' be fixed to behave more like 'make check'?
>
> Yes, I think so.
It seems to be intentional though. Quoth test/Makefile.in:
# Whether to run tests from .el files in preference to .elc, we do
# this by default since it gives nicer stacktraces.
# If you just want a pass/fail, setting this to no is much faster.
export TEST_LOAD_EL ?= \
$(if $(findstring $(MAKECMDGOALS), all check check-maybe),no,yes)
And test/README:
Note that although the test files are always compiled (unless they set
no-byte-compile), the source files will be run when expensive or
unstable tests are involved, to give nicer backtraces. To run the
compiled version of a test use
make TEST_LOAD_EL=no ...
--
Basil
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: master a0f6029: Fix misuses of `byte-compile-macro-environment`
2021-03-04 13:38 ` Basil L. Contovounesios
@ 2021-03-04 14:50 ` Stefan Monnier
0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2021-03-04 14:50 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: emacs-devel
>>> Beats me :/. Even after reverting commits a0f60293d9 and 88ca2280ba,
>>> 'make check' still fails. But both 'git bisect', and checking out its
>>> parent 6ad9b8d677, point to a0f60293d9 as being the culprit.
>> It turns out it was because a `no-byte-compile` was hiding the problem.
> Sometimes I feel like the compiler doesn't ignore our comments.
I have no doubt we are being watched,
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-03-04 14:50 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210301171853.8051.45984@vcs0.savannah.gnu.org>
[not found] ` <20210301171854.C42CB20E1B@vcs0.savannah.gnu.org>
2021-03-03 14:44 ` master a0f6029: Fix misuses of `byte-compile-macro-environment` Basil L. Contovounesios
[not found] ` <43A0C407-D217-46AF-8472-28DD2DE80D6C@acm.org>
2021-03-03 15:16 ` Basil L. Contovounesios
2021-03-03 15:23 ` Mattias Engdegård
2021-03-03 15:26 ` Lars Ingebrigtsen
2021-03-04 13:48 ` Basil L. Contovounesios
2021-03-04 8:41 ` Michael Albinus
2021-03-03 22:15 ` Stefan Monnier
2021-03-04 1:47 ` Basil L. Contovounesios
2021-03-04 2:33 ` Stefan Monnier
2021-03-04 13:38 ` Basil L. Contovounesios
2021-03-04 14:50 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).