[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 11860f8: * test/src/comp-tests.el: Eliminate byte-compiler wa
From: |
Stefan Monnier |
Subject: |
Re: master 11860f8: * test/src/comp-tests.el: Eliminate byte-compiler warnings (Bug#52105). |
Date: |
Fri, 26 Nov 2021 12:27:46 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> +(eval-when-compile
> + (require 'cl-lib)
> + (require 'comp))
> +(eval-and-compile
> + (require 'comp-cstr) ;in eval-and-compile for its defstruct
> + (defconst comp-test-src (ert-resource-file "comp-test-funcs.el"))
> + (defconst comp-test-dyn-src (ert-resource-file "comp-test-funcs-dyn.el"))
> + (defconst comp-test-pure-src (ert-resource-file "comp-test-pure.el"))
> + (defconst comp-test-45603-src (ert-resource-file "comp-test-45603.el"))
> + ;; Load the test code here so the compiler can check the function
> + ;; names used in this file.
> + (load comp-test-src nil t)
> + (load comp-test-dyn-src nil t)
> + (load comp-test-pure-src nil t)
> + (load comp-test-45603-src nil t))
This looks pretty ugly, in my book.
Were the warnings false positives or were they diagnosing real problems?
The cleanup could start by moving the (require 'comp-cstr) outside of
the `eval-and-compile` since toplevel `require`s are processed both at
compile and run time anyway.
Stefan
- Re: master 11860f8: * test/src/comp-tests.el: Eliminate byte-compiler warnings (Bug#52105).,
Stefan Monnier <=