Allow case insensitive bools and move to numeric render#11828
Open
zlonast wants to merge 1 commit into
Open
Conversation
4e15a9c to
c846c51
Compare
Collaborator
Author
|
@philderbeast You often make pull requests like this, I'm interested in your opinion on this matter. |
c846c51 to
03d13bf
Compare
tdammers
approved these changes
May 26, 2026
Collaborator
tdammers
left a comment
There was a problem hiding this comment.
LGTM; comments are not show stoppers, just things I think would be worth considering.
03d13bf to
01a59e7
Compare
Collaborator
Author
|
@tdammers thanks for your feedback! |
6e1eecb to
3915fa5
Compare
3915fa5 to
e58c2d6
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.
The
.cabalfile parser now accepts boolean values in a case‑insensitive manner (true,True,TRUE,false, etc.) without emitting a warning.Previously only
TrueandFalsewere treated as “standard”, and other capitalisations triggered a parse warning. That warning was introduced in 2008 as a backwards‑compatibility shim to prevent Hackage uploads that would break very old Cabal versions. Since all supported Cabal releases can now handle case‑insensitive booleans, the warning has been removed as unnecessary.Additionally, the rendering of certain boolean‑like flags has been changed to use numeric levels:
-O(optimisation) flag,Trueor an unspecified value now renders as-O1, whileFalserenders as-O0.-g(debug info) flag,Trueor an unspecified value now renders-g2, whileFalserenders as-g0.This makes the displayed compiler flags more consistent with their internal semantics (e.g. optimisation level 1 is the default).
origin commit in 2008: e92d6573#r185301031
research done by @jappeace: https://github.com/haskell/cabal/pull/11716/changes#r3243914138
Template B: This PR does not modify behaviour or interface
E.g. the PR only touches documentation or tests, does refactorings, etc.
Include the following checklist in your PR: