Skip to content

Commit

Permalink
Add a z-empty.config lexically sorted last
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Dec 12, 2024
1 parent 5c9d530 commit f4d9610
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
packages: no-pkg-dir
import: z-empty.config
import: an-extra.config
import: an-extra.config
import: a-very-extra.config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ main = cabalTest . recordMode RecordMarked $ do
\ .*a-very-extra\\.config(\n|\r\n) \
\ .*an-extra\\.config(\n|\r\n) \
\ .*with-ghc\\.config(\n|\r\n) \
\ .*z-empty\\.config(\n|\r\n) \
\ .*https://www.stackage.org/lts-21.25/cabal.config(\n|\r\n)"
out

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- This file is intentionally empty, just this comment.
12 changes: 10 additions & 2 deletions changelog.d/pr-10546
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ build failure. We can trigger that message by using a non-existant package in
the project, "no-pkg-dir".

If an import is repeated in a `.project` or `.config` file it only imported once
but if the same import is made from an imported file then it is repeated in the
message.
but if the same import is made from an imported file then it was being repeated
in the message. Additional problems were not showing the project first and
mixing configuration files and URIs together.

* The test set up:

```
$ cat cabal.project
cat cabal.project
packages: no-pkg-dir
import: z-empty.config
import: an-extra.config
import: an-extra.config
import: a-very-extra.config
Expand All @@ -34,6 +37,9 @@ message.
$ cat a-very-extra.config
import: https://www.stackage.org/lts-21.25/cabal.config
import: https://www.stackage.org/lts-21.25/cabal.config

$ cat z-empty.config
- This file is intentionally empty, just this comment.
```

* Before the fix:
Expand All @@ -47,6 +53,7 @@ message.
- 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
- z-empty.config
The following errors occurred:
- The package location 'no-pkg-dir' does not exist.
```
Expand All @@ -59,6 +66,7 @@ message.
- cabal.project
- a-very-extra.config
- an-extra.config
- z-empty.config
- https://www.stackage.org/lts-21.25/cabal.config
The following errors occurred:
- The package location 'no-pkg-dir' does not exist.
Expand Down

0 comments on commit f4d9610

Please sign in to comment.