* bug#74289: 30.0.92; `require-with-check' fails on non-existing files
@ 2024-11-10 8:43 Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-10 17:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-10 8:43 UTC (permalink / raw)
To: 74289; +Cc: Stefan Monnier
`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)
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74289: 30.0.92; `require-with-check' fails on non-existing files
2024-11-10 8:43 bug#74289: 30.0.92; `require-with-check' fails on non-existing files Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-10 17:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-10 17:46 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-10 17:38 UTC (permalink / raw)
To: Daniel Mendler; +Cc: 74289
> `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)))))
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#74289: 30.0.92; `require-with-check' fails on non-existing files
2024-11-10 17:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-10 17:46 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-10 21:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-10 17:46 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 74289
Stefan Monnier <monnier@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74289: 30.0.92; `require-with-check' fails on non-existing files
2024-11-10 17:46 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-10 21:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-11 4:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-10 21:51 UTC (permalink / raw)
To: Daniel Mendler; +Cc: 74289-done
>>> `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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74289: 30.0.92; `require-with-check' fails on non-existing files
2024-11-10 21:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-11 4:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 8:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 16:40 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 8+ messages in thread
From: Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-11 4:52 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 74289-done
Stefan Monnier <monnier@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
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74289: 30.0.92; `require-with-check' fails on non-existing files
2024-11-11 4:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-13 8:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 16:40 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 8+ messages in thread
From: Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-13 8:52 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 74289-done
Btw, 3496234c8ed10a14f740199722ec727bd43c82d3 mentioned an unrelated
wrong bug number, not bug#74289.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#74289: 30.0.92; `require-with-check' fails on non-existing files
2024-11-11 4:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 8:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-13 16:40 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 16:53 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-13 16:40 UTC (permalink / raw)
To: Daniel Mendler; +Cc: 74289-done
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-11-13 16:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-10 8:43 bug#74289: 30.0.92; `require-with-check' fails on non-existing files Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-10 17:38 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-10 17:46 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-10 21:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-11 4:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 8:52 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 16:40 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-13 16:53 ` Daniel Mendler via Bug reports for GNU Emacs, the Swiss army knife of text editors
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).