Repository navigation
Conversation
cider-test-menu and cider-start-menu let-bind cider-test-default-*-selectors and cider-edit-jack-in-command around the command they run, but those defcustoms come later in their files. A file compiled in a fresh Emacs, as native compilation does, treats the bindings as lexical, so the menu's selector and edit-command arguments never reached the code reading them.
Native compilation byte-compiles each file in a fresh Emacs, so a file only knows the functions it requires or declares. Several relied on another file having been loaded first, which triggered "not known to be defined" warnings on native-comp builds.
lm-with-file is a macro, but lisp-mnt was only required at runtime, so a standalone compile emitted a plain function call. The version lookup then failed inside ignore-errors and the Version-header fallback never worked.
Several files read variables that are defined further down or in another file, which the byte compiler flags as free variables when a file is compiled on its own. Move the definitions up where they're local, and declare the rest. cider-test now silences the obsolete warning for cider-auto-select-error-buffer, which it still reads on purpose.
eldev compile builds everything in one Emacs, so functions and variables from files loaded earlier hide missing requires and declarations. Native compilation compiles each file in a fresh process and reports them to users. compile-isolated does the same, and CI runs it after the regular byte-compile.
bbatsov
force-pushed
the
fix-native-comp-warnings
branch
from
September 28, 2026 20:58
16f8717 to
1f262e7
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native compilation compiles each file in a fresh Emacs, so it flags missing requires and declarations that
eldev compilehides by building everything in one process. On Emacs 31 that meant a screen of "not known to be defined" warnings, and in natively compiled builds thecider-test-menuselectors, thecider-start-menuedit-command option and thecider-doctorversion fallback quietly didn't work. CI now runseldev compile-isolatedto catch this.The "docstring wider than 80 characters" warnings are left as they are: they only show up with
native-comp-async-warnings-errors-kindset toall, and the project allows 100 columns on purpose.Fixes #4201