Stop stubbing file-exists-p in the dirconfig specs - #2191
Merged
Merged
Conversation
The dirconfig parser specs faked the file with an always-true `file-exists-p' spy. Under native compilation that breaks as soon as a primitive gets redefined while the spy is active: Emacs looks for the subr trampoline's .eln with `file-exists-p', is told it's there, and fails to load a file that doesn't exist. Buttercup redefines `message' when it captures the prefix-less dirconfig warning, so on a cold eln cache (a distro build, say) two of the specs died with native-lisp-load-failed. They now write a real `.projectile' into the sandbox instead. That also retires the 2023 workaround of keeping `insert-file-contents' out of trampoline compilation, which existed only for these specs. The spec that parsed the same file twice with different comment prefixes is split in two, since the parse is now cached against the file.
bbatsov
force-pushed
the
fix/native-comp-file-exists-spies
branch
from
September 16, 2026 11:54
bce5932 to
db8717b
Compare
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.
An always-true
file-exists-pstub makes a native-comp Emacs with a cold eln cache try to load subr trampolines it never compiled, which is how two dirconfig specs fail in distro builds. The specs now write a real.projectile, and the 2023insert-file-contentsworkaround for the same stubs goes away with them.Fixes #2100
eldev test)M-x checkdocwarnings