emacs: add two parameters to genericBuild to control errors#328573
Merged
vcunat merged 3 commits intoNixOS:staging-nextfrom Jul 21, 2024
Merged
emacs: add two parameters to genericBuild to control errors#328573vcunat merged 3 commits intoNixOS:staging-nextfrom
vcunat merged 3 commits intoNixOS:staging-nextfrom
Conversation
Contributor
Author
|
It would be good to create a job set (using emacs-overlay's nix-community hydra maybe?) with |
Member
|
This is wild. What is the raison d'étre of this? |
Contributor
Author
Like other languages, reducing compilation errors and warnings is a way to improve code quality. In addition, currently, |
AndersonTorres
approved these changes
Jul 20, 2024
c831a00 to
194a14f
Compare
This patch introduces two parameters, turnCompilationWarningToError and ignoreCompilationError, to control errors in genericBuild, which makes "nix build" be able to fail at elisp native compilation errors or warnings. This feature can be used in CI to improve code quality. Note that this patch keeps the old behavior by default. Hopefully one day we can flip the default value of ignoreCompilationError to false when enough packages are fixed. Also note that these two parameters can be changed per package using the overrideAttrs interface.
194a14f to
45f2e58
Compare
Contributor
Author
|
Tested it by building all 6213 elisp packages |
Contributor
Author
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.
Description of changes
Motivation:
nix buildfor elisp packages can fail at errors or warnings now, which can be used in CI to improve code quality.The patch introduces two parameters, turnCompilationWarningToError and
ignoreCompilationError, to control errors in genericBuild.
Note that this patch keeps the old behavior by default. Hopefully one
day we set the default value of ignoreCompilationError to false.
Also note that these two parameters can be changed per package using
the overrideAttrs interface.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.