From 53fd7b00bcae28f7932adee426f49de8ebb2ce3d Mon Sep 17 00:00:00 2001 From: Phil de Joux Date: Tue, 17 Dec 2024 11:58:38 -0500 Subject: [PATCH] Add a changelog entry --- changelog.d/pr-10646 | 34 ++++++++++++++++++++++++++++++++++ changelog.d/pr-10646.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 changelog.d/pr-10646 create mode 100644 changelog.d/pr-10646.md diff --git a/changelog.d/pr-10646 b/changelog.d/pr-10646 new file mode 100644 index 00000000000..ab1366afaa9 --- /dev/null +++ b/changelog.d/pr-10646 @@ -0,0 +1,34 @@ +--- +synopsis: Deduplicate path separator 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 +``` + +## Ord ProjectConfigPath Instance Changes + +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 +``` diff --git a/changelog.d/pr-10646.md b/changelog.d/pr-10646.md new file mode 100644 index 00000000000..bd4981351a1 --- /dev/null +++ b/changelog.d/pr-10646.md @@ -0,0 +1,34 @@ +--- +synopsis: Deduplicate path separator 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 +``` + +## Ord ProjectConfigPath Instance Changes + +For comparison purposes, path separators are normalized to the @buildOS@ +platform's path separator. + +```haskell +-- >>> let abFwd = ProjectConfigPath $ "dir-a/b.config" :| [] +-- >>> let abBwd = ProjectConfigPath $ "dir-a\\b.config" :| [] +-- >>> compare abFwd abBwd +-- EQ +```