On Nov 16, 2024, at 4:26 PM, Andrea Corallo <acorallo@gnu.org> wrote:
Hi Devlin,yes this difference is expected, 'native-compile' runs the compilationin the loaded Emacs so that all the definitions of loaded packages areknown to the compiler. 'native-compile-async' runs in a new fresh Emacsso all requires need to be there in the compilation unit in order to letthe compiler be able to load the definitions.We have also some doc in (info "(elisp) Native-Compilation Variables")which goes like this: A common cause for asynchronous native-compilation to produce warnings is compiling a file that is missing some ‘require’ of a necessary feature. The feature may be loaded into the main emacs, but because native compilation always starts from a subprocess with a pristine environment, that may not be true for the subprocess.Regards Andrea