haskell / haskell/cabal

Parsec project parser can't parse debug-info boolean

Open
#12,140 2 comments 0 reactions 1 assignee Claimed by @zlonast View on GitHub
attention: pr-welcome type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
The pasec project parser can't parse `debug-info: True`.

**To Reproduce**
I'll add a `cabal-testsuite` test for this[^1]. Here's a preview when run locally:

```
$ cabal build all --project-file-parser=legacy --dry-run
Build profile: -w ghc-9.14.1 -O1
In order, the following would be built (use -v for more details):
- debug-info-0 (lib) (first run)

$ cabal build all --project-file-parser=parsec --dry-run
Can't parse debug info level True

HasCallStack backtrace:
error, called at src/Distribution/Simple/Compiler.hs:388:8 in Cabal-3.17.0.0-0ed1aa8ee4a268ed0366a89952dfc3676b1e0576dc8fd75d60be07a27b8427b1:Distribution.Simple.Compiler

$ cabal build all --project-file-parser=fallback --dry-run
Warning: this is a debug build of cabal-install with assertions enabled.
Can't parse debug info level True

HasCallStack backtrace:
error, called at src/Distribution/Simple/Compiler.hs:388:8 in Cabal-3.17.0.0-0ed1aa8ee4a268ed0366a89952dfc3676b1e0576dc8fd75d60be07a27b8427b1:Distribution.Simple.Compiler

$ cabal build all --project-file-parser=compare --dry-run
Warning: this is a debug build of cabal-install with assertions enabled.
Can't parse debug info level True

HasCallStack backtrace:
error, called at src/Distribution/Simple/Compiler.hs:388:8 in Cabal-3.17.0.0-0ed1aa8ee4a268ed0366a89952dfc3676b1e0576dc8fd75d60be07a27b8427b1:Distribution.Simple.Compiler
```

**Expected behavior**
That the parsec parser behaves like the legacy parser and is able to parse booleans for this field.

[^1]: The test is in #12141.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.