Use parsec parser for project round trip prop tests#12139
Draft
philderbeast wants to merge 6 commits into
Draft
Conversation
philderbeast
force-pushed
the
test/parsec-parser-roundtrip-prop
branch
from
July 22, 2026 13:03
f21f8e8 to
34a1357
Compare
philderbeast
force-pushed
the
test/parsec-parser-roundtrip-prop
branch
from
July 22, 2026 13:23
34a1357 to
e3e2ebc
Compare
- Add haddocks for flagToDebugInfoLevel
philderbeast
marked this pull request as draft
July 23, 2026 18:02
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.
I've started working on #12138. This changes the property tests for round trip printing and parsing of projects to use the parsec parser from #8889.
Adds
parseProjectConfigand exports this fromDistribution.Client.ProjectConfig.Parsec. This is used for testing and is the equivalent of:cabal/cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
Lines 1250 to 1252 in 4907eec
The
parseProjectConfigfunction could be defined in the test suite but then we'd have to exportfieldsToConfigandreadPreprocessFields:$ git diff module Distribution.Client.ProjectConfig.Parsec ( -- * Package configuration parseProject - , parseProjectConfig , ProjectConfig (..) -- ** Parsing , ParseResult , runParseResult + , readPreprocessFields + , fieldsToConfig ) whereDifferences
There are test failures with commas in the packages field:
There are test failures with commas in the shared test:
There's a test failure in the local test parsing the debug level:
There's a test failure in the specific test parsing the debug level (same goes for the all test):