GNU bug report logs -
#74289
30.0.92; `require-with-check' fails on non-existing files
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Sun, 10 Nov 2024 08:44:01 UTC
Severity: normal
Found in version 30.0.92
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74289 in the body.
You can then email your comments to 74289 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
:
bug#74289
; Package
emacs
.
(Sun, 10 Nov 2024 08:44:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Mendler <mail <at> daniel-mendler.de>
:
New bug report received and forwarded. Copy sent to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
.
(Sun, 10 Nov 2024 08:44:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
`require-with-check' fails since
0aae02a3741c397d6952e3128d434827aca0f912 on non-existing files.
See the CI run of the Compat test suite:
https://github.com/emacs-compat/compat/actions/runs/11763132765/job/32766767667
This call fails:
(require-with-check 'compat-does-not-exist nil 'noerror)
Backtrace:
Test compat-require-with-check backtrace:
string-match("\\(?:\\.\\(?:el\\(?:\\.gz\\|c\\(?:\\.gz\\)?\\)?\\|so\\
require-with-check(compat-does-not-exist nil noerror)
apply(require-with-check (compat-does-not-exist nil noerror))
(setq value-7960 (apply fn-7958 args-7959))
(unwind-protect (setq value-7960 (apply fn-7958 args-7959)) (setq fo
(not (unwind-protect (setq value-7960 (apply fn-7958 args-7959)) (se
(if (not (unwind-protect (setq value-7960 (apply fn-7958 args-7959))
(let (form-description-7962) (if (not (unwind-protect (setq value-79
(let ((value-7960 'ert-form-evaluation-aborted-7961)) (let (form-des
(let* ((fn-7958 #'require-with-check) (args-7959 (condition-case err
(progn (let ((tail (list dir1 dir2))) (while tail (let ((dir (car ta
(unwind-protect (progn (let ((tail (list dir1 dir2))) (while tail (l
(let* ((coding-system-for-write nil) (temp-file (file-name-as-direct
(progn (let* ((coding-system-for-write nil) (temp-file (file-name-as
(unwind-protect (progn (let* ((coding-system-for-write nil) (temp-fi
(let* ((coding-system-for-write nil) (temp-file (file-name-as-direct
#f(lambda () [compat-tests--unexist compat-tests--local compat-tests
#f(compiled-function () #<bytecode -0x1bdb01a9e9be3603>)()
handler-bind-1(#f(compiled-function () #<bytecode -0x1bdb01a9e9be360
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name compat-require-with-check :documentat
ert-run-or-rerun-test(#s(ert--stats :selector t :tests ... :test-map
ert-run-tests(t #f(compiled-function (event-type &rest event-args) #
ert-run-tests-batch(nil)
ert-run-tests-batch-and-exit()
command-line-1(("-L" "." "-l" "compat-tests.el" "-f" "ert-run-tests-
command-line()
normal-top-level()
Test compat-require-with-check condition:
(wrong-type-argument stringp nil)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74289
; Package
emacs
.
(Sun, 10 Nov 2024 17:40:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 74289 <at> debbugs.gnu.org (full text, mbox):
> `require-with-check' fails since
> 0aae02a3741c397d6952e3128d434827aca0f912 on non-existing files.
>
> See the CI run of the Compat test suite:
>
> https://github.com/emacs-compat/compat/actions/runs/11763132765/job/32766767667
>
> This call fails:
>
> (require-with-check 'compat-does-not-exist nil 'noerror)
Oops, can you confirm that the patch below works for you?
Stefan
diff --git a/lisp/files.el b/lisp/files.el
index c3fce9f15f9..0d998e6e18e 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1288,10 +1306,11 @@ require-with-check
;; we did load "it". (bug#74040)
;; So use a "permissive" search which doesn't pay attention to
;; differences between file extensions.
- (prefix (if (string-match
- (concat (regexp-opt (get-load-suffixes)) "\\'") fn)
- (concat (substring fn 0 (match-beginning 0)) ".")
- fn))
+ (prefix (when fn
+ (if (string-match
+ (concat (regexp-opt (get-load-suffixes)) "\\'") fn)
+ (concat (substring fn 0 (match-beginning 0)) ".")
+ fn)))
(lh load-history))
(while (and lh (let ((file (car-safe (car lh))))
(not (and file (string-prefix-p prefix file)))))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74289
; Package
emacs
.
(Sun, 10 Nov 2024 17:49:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 74289 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> `require-with-check' fails since
>> 0aae02a3741c397d6952e3128d434827aca0f912 on non-existing files.
>>
>> See the CI run of the Compat test suite:
>>
>> https://github.com/emacs-compat/compat/actions/runs/11763132765/job/32766767667
>>
>> This call fails:
>>
>> (require-with-check 'compat-does-not-exist nil 'noerror)
>
> Oops, can you confirm that the patch below works for you?
It does look correct :) Thanks.
Daniel
Reply sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
You have taken responsibility.
(Sun, 10 Nov 2024 21:52:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Daniel Mendler <mail <at> daniel-mendler.de>
:
bug acknowledged by developer.
(Sun, 10 Nov 2024 21:52:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 74289-done <at> debbugs.gnu.org (full text, mbox):
>>> `require-with-check' fails since
>>> 0aae02a3741c397d6952e3128d434827aca0f912 on non-existing files.
>>>
>>> See the CI run of the Compat test suite:
>>>
>>> https://github.com/emacs-compat/compat/actions/runs/11763132765/job/32766767667
>>>
>>> This call fails:
>>>
>>> (require-with-check 'compat-does-not-exist nil 'noerror)
>>
>> Oops, can you confirm that the patch below works for you?
>
> It does look correct :) Thanks.
Than you, Daniel, pushed to `emacs-30`.
Closing,
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74289
; Package
emacs
.
(Mon, 11 Nov 2024 04:55:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 74289-done <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>>> `require-with-check' fails since
>>>> 0aae02a3741c397d6952e3128d434827aca0f912 on non-existing files.
>>>>
>>>> See the CI run of the Compat test suite:
>>>>
>>>> https://github.com/emacs-compat/compat/actions/runs/11763132765/job/32766767667
>>>>
>>>> This call fails:
>>>>
>>>> (require-with-check 'compat-does-not-exist nil 'noerror)
>>>
>>> Oops, can you confirm that the patch below works for you?
>>
>> It does look correct :) Thanks.
>
> Than you, Daniel, pushed to `emacs-30`.
> Closing,
Hi Stefan,
I think there is one more bug a little bit later. prefix can be nil
here:
(while (and lh (let ((file (car-safe (car lh))))
(not (and file (string-prefix-p prefix file)))))
...)
In order to check, simply eval this code:
(require-with-check 'compat-does-not-exist nil 'noerror)
Daniel
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74289
; Package
emacs
.
(Wed, 13 Nov 2024 08:56:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 74289-done <at> debbugs.gnu.org (full text, mbox):
Btw, 3496234c8ed10a14f740199722ec727bd43c82d3 mentioned an unrelated
wrong bug number, not bug#74289.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74289
; Package
emacs
.
(Wed, 13 Nov 2024 16:41:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 74289-done <at> debbugs.gnu.org (full text, mbox):
> I think there is one more bug a little bit later.
My belief that it is fixed is a bit stronger now.
Can you confirm on your side?
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74289
; Package
emacs
.
(Wed, 13 Nov 2024 16:56:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 74289-done <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> I think there is one more bug a little bit later.
>
> My belief that it is fixed is a bit stronger now.
> Can you confirm on your side?
Thanks. It works. I've evaluated the function in my Emacs and executed
the test.
Daniel
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 12 Dec 2024 12:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 194 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.