Closed Forge36 closed 2 weeks ago
Hello, thanks for reporting! Could you describe in detail how you are trying to compile the program? (Operating System, Emacs version, with or without an init file?) If you are compiling with an init file then it would also be useful to try to reproduce the problem without one, e.g., using the "-q" switch when starting Emacs.
To my knowledge the native compilation is automatic (provide emacs is built with support). I'm not able to trigger this error directly with byte-recompile-file
System details:
I have an init file (emacs-version) GNU Emacs 29.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2024-05-10
OS Windows 10 in WSL (Ubuntu 22.04.4 LTS)
Some testing to reproduce:
I modify citeproc-sort.el
restart emacs, and insert a citation in org triggers the async-compile.
I can then "fix" the citeproc-sort.el
warning by adding (require 'citeproc-number)
.
I'm not having luck using emacs -q
to produce a minimal test case unfortunately (I'm struggling to use emacs in that scenario). These warnings appear to only display on the native compile (which occurs after a restart of emacs in my instance).
I'm going to poke at an MR to address these if I can determine how (I'm new to upstreaming fixes apologies if I'm not following proper etiquette).
Edit: Found the docs on fixing these
https://www.gnu.org/software/emacs/manual/html_node/elisp/Declaring-Functions.html
I've usually seen these resolved with (require 'package')
(which is how I based my draft MR). Given there aren't any known errors/issues that suggests the use of (declare-function <function> "<package>" ())
. I can use this method to resolve the warnings without risking behavior changes.
Edit 2: Draft MR is up-to-date. Let me know what changes you'd like.
This appears fixed with the latest #169!
Closing