Closed
Description
Describe the bug
The warning message for a mis-typed comment in a project import repeats the project name but not the source of the parse error.
To Reproduce
Take the test from #10546 and modify it:
$ git diff
diff --git \
a/cabal-testsuite/PackageTests/ProjectImport/DedupUsingConfigFromSimple/z-empty.config \
b/cabal-testsuite/PackageTests/ProjectImport/DedupUsingConfigFromSimple/z-empty.config
index 771bb389f..9a8cd37b9 100644
--- a/cabal-testsuite/PackageTests/ProjectImport/DedupUsingConfigFromSimple/z-empty.config
+++ b/cabal-testsuite/PackageTests/ProjectImport/DedupUsingConfigFromSimple/z-empty.config
@@ -1 +1 @@
--- This file is intentionally empty, just this comment.
+- This file is intentionally empty, just this comment.
$ ~/.ghcup/bin/cabal-3.12.1.0 build all --dry-run
...
Warning:
/.../cabal/cabal-testsuite/PackageTests/ProjectImport/DedupUsingConfigFromSimple/cabal.project,
cabal.project, cabal.project, cabal.project, cabal.project, cabal.project,
cabal.project, cabal.project, cabal.project, cabal.project, cabal.project,
cabal.project, cabal.project, cabal.project, cabal.project, cabal.project,
cabal.project: Unrecognized section '-' on line 1
When using configuration from:
- a-very-extra.config
- an-extra.config
- cabal.project
- https://www.stackage.org/lts-21.25/cabal.config
- https://www.stackage.org/lts-21.25/cabal.config
- https://www.stackage.org/lts-21.25/cabal.config
- with-ghc.config
- z-empty.config
The following errors occurred:
- The package location 'no-pkg-dir' does not exist.
Expected behavior
I'd expect that the source file z-empty.config
would have been mentioned for the "Unrecognized section '-'". Mentioning cabal.project
repeatedly is now redundant with the "using configuration from" message of #9985.