fix(Cabal): Accept boolean values for debug-info and optimization levels - #12202
Open
zlonast wants to merge 5 commits into
Open
fix(Cabal): Accept boolean values for debug-info and optimization levels#12202zlonast wants to merge 5 commits into
debug-info and optimization levels#12202zlonast wants to merge 5 commits into
Conversation
jappeace
approved these changes
Aug 16, 2026
philderbeast
left a comment
Collaborator
There was a problem hiding this comment.
If we're parsing booleans for debug-info in the project, would that also apply to the command line? If not, is error the best message?
$ cabal build --help
...
--enable-debug-info[=n] Emit debug info (n is 0--3, default is 0)
--disable-debug-info Don't emit debug info
$ cabal run cabal-install:exe:cabal -- build all --dry-run \
--enable-debug-info=True
...
Can't parse debug info level True
HasCallStack backtrace:
error, called at src/Distribution/Simple/Compiler.hs:383:8 in
Cabal-3.19.0.0-inplace:Distribution.Simple.Compiler
$ cabal-3.18.1.0 build all --dry-run --enable-debug-info=True
Can't parse debug info level True
CallStack (from HasCallStack):
error, called at src/Distribution/Simple/Compiler.hs:392:8 in
Cabal-3.18.1.0-inplace:Distribution.Simple.Compiler
Collaborator
Author
|
@philderbeast Thanks for such a detailed review, yes, I think this approach should be applied to the command line as well. |
zlonast
force-pushed
the
zlonast/boolean-debug-info
branch
from
August 22, 2026 06:16
d922696 to
cb58f67
Compare
debug-info and optimization levels
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.
fix: #12140
debug-info: Falseare treated asNoDebugInfo, anddebug-info: Trueare treated asNormalDebugInfoTemplate Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.