-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename the changelog with *.md extension
- Add a section on cabal-testsuite changes
- Loading branch information
1 parent
a7a092e
commit 80552bc
Showing
2 changed files
with
71 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
synopsis: Configuration messages without duplicates | ||
packages: [cabal-install-solver] | ||
prs: 10646 | ||
issues: 10645 | ||
--- | ||
|
||
The "using configuration from" message no longer has duplicates on Windows when | ||
the `cabal.project` uses forward slashes for its imports but the message reports | ||
imports with backslashes. | ||
|
||
```diff | ||
$ cat cabal.project | ||
import: dir-a/b.config | ||
|
||
$ cabal build all --dry-run | ||
... | ||
When using configuration from: | ||
- - dir-a/b.config | ||
- dir-a\b.config | ||
- cabal.project | ||
``` | ||
|
||
## Changed `Ord ProjectConfigPath` Instance | ||
|
||
For comparison purposes, path separators are normalized to the `buildOS` | ||
platform's path separator. | ||
|
||
```haskell | ||
-- >>> let abFwd = ProjectConfigPath $ "a/b.config" :| [] | ||
-- >>> let abBwd = ProjectConfigPath $ "a\\b.config" :| [] | ||
-- >>> compare abFwd abBwd | ||
-- EQ | ||
``` | ||
|
||
## Changes in `cabal-testsuite` | ||
|
||
With `ghc-9.12.1` adding `-XMultilineStrings` it would be easier to write | ||
multiline strings in `cabal-testsuite/PackageTests/**/*.test.hs` scripts but the | ||
catch is we run these tests with older `GHC` versions so would need to use | ||
`-XCPP` for those versions and the C preprocessor does not play nicely with | ||
string gaps. To avoid these problems a `readVerbatimFile` function can be used | ||
to read the expected multiline output for tests verbatim. This has the same | ||
implementation as `readFile` from the `strict-io` package to avoid problems at | ||
cleanup. | ||
|
||
``` | ||
Warning: Windows file locking hack: hit the retry limit 3 while trying to | ||
remove C:\Users\phild\AppData\Local\Temp\cabal-testsuite-8376 | ||
cabal.test.hs: | ||
C:\Users\<username>\AppData\Local\Temp\cabal-testsuite-8376\errors.expect.txt: | ||
removePathForcibly:DeleteFile | ||
"\\\\?\\C:\\Users\\<username>\\AppData\\Local\\Temp\\cabal-testsuite-8376\\errors.expect.txt": | ||
permission denied (The process cannot access the file because it is being | ||
used by another process.) | ||
``` | ||
|
||
The other process accessing the file is `C:\WINDOWS\System32\svchost.exe` | ||
running a `QueryDirectory` event and this problem only occurs when the test | ||
fails. | ||
|
||
The `assertOutputContains` function was modifying the output but in a way not | ||
"visible" enough. An added `assertOn` function (that `assertOutputContains` | ||
calls) takes a `NeedleHaystack` configuration for how the search is made, what | ||
to expect and and how to display the expected and actual values. A pilcrow ¶ is | ||
often used to visibly display line endings but our terminal output is restricted | ||
to ASCII so lines are visibly delimited between `^` and `$` visible markers. The | ||
needle (the expected output fragment) is shown annotated this way and the | ||
haystack (the output) can optionally be shown this way too. | ||
|
||
The `concatOutput` function is renamed to `lineBreaksToSpaces`. |