Skip to content
Snippets Groups Projects
Commit 86c71533 authored by jgotoh's avatar jgotoh Committed by Matthew Pickering
Browse files

Replace cabal project parsing with parsec implementation

The new parser replicates the grammar of the legacy parser while providing
better error reporting and more maintainable code structure. The fallback
strategy ensures smooth transition while the legacy parser is phased out.

The flag `--project-file-parser` allows you to select which project file
parser to use.

* `legacy` - the old parser (will be removed in a future release)
* `default` - the default parser (uses `fallback` unless compiled with `-f+legacy-comparison`)
* `parsec` - the new parser using Parsec
* `fallback` - the new parser using Parsec, but falling back to the old parser if it fails
* `compare` - the new parser using Parsec, but comparing the results with the old parser

When `cabal-install` is compiled, then the `-f+legacy-comparision` flag
can be passed which changes the default parser mode to `compare`.

Fixes #6101 #7748 #10611
parent 9a343d13
No related branches found
No related tags found
Loading
Showing
with 487 additions and 171 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment