fix: lazy initialization for clipboard enable flag - #2017
Merged
Conversation
Contributor
|
✅ Code Contractor Validation: PASSED 📚 About Code ContractorDeclarative Code Standards That Learn and Improve Define domain-specific validation rules in YAML. Want this for your repo? |
On Nix builds, the clipboard enable flag was incorrectly initialized at compile time rather than runtime. This caused the platform detection (macOS SBCL version check, WSL detection) to evaluate in the build environment instead of the execution environment. Change *enable-clipboard-p* from defparameter to defvar and move the initialization logic into enable-clipboard-p function to ensure platform detection happens at runtime.
cxxxr
force-pushed
the
refactor/clipboard-lazy-init
branch
from
December 8, 2025 23:28
f931254 to
7607dea
Compare
Explain why defvar is used instead of defparameter to ensure platform detection runs at runtime, not compile time on Nix builds.
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.
Summary
*enable-clipboard-p*fromdefparametertodefvarfor lazy initializationenable-clipboard-pfunctionProblem
On Nix builds, the clipboard enable flag was incorrectly initialized at compile time rather than runtime. This caused the platform detection (macOS SBCL version check, WSL detection) to evaluate in the build environment instead of the execution environment, resulting in incorrect clipboard behavior.
Solution
Defer the platform detection to runtime by initializing the flag lazily on first access to
enable-clipboard-p.