From 2d03f00cf169395663db6be3017a0a7d83bf7486 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 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 changelog.d/pr-10646 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 +```