Skip to content

Commit 7e6a207

Browse files
committed
Update the changelog for --version-win=latest
1 parent 1cd172b commit 7e6a207

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

changelog.d/issue-9511

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,43 @@ description:
1919
```
2020

2121
This change gives priority to version equality constraints that are less
22-
imported and does so by only passing along the top priority constraints (the
23-
least imported for any package) to the solver. The lower priority version
24-
equality constraints are discarded. If `nightly-2023-12-07` has `constraints:
25-
hashable ==1.4.3.0` then this fix will effectively allow the local
26-
`cabal.project` to override that version and pick another.
22+
imported (by default) and does so by only passing along the top priority
23+
constraints (the least imported for any package) to the solver. Priority can
24+
also be given to constraints so that the last version constraint for a package
25+
wins. The command line option for this is `--version-win=latest|shallowest`.
26+
27+
The lower priority version equality constraints are discarded. If
28+
`nightly-2023-12-07` has `constraints: hashable ==1.4.3.0` then this fix will
29+
effectively allow the local `cabal.project` to override that version and pick
30+
another.
2731

2832
```
2933
-- cabal.project
3034
import: https://www.stackage.org/nightly-2023-12-07/cabal.config
3135
constraints: hashable ==1.4.2.0
3236
```
3337

34-
The order of the import relative to the constraints does not matter within a
35-
project because the project is at the root of the import tree. Anything put
36-
there is top priority.
38+
With the following project and `--version-win=latest` the import from stackage
39+
would have priority and `hashable ==1.4.3.0` would be passed to the solver.
40+
41+
```
42+
-- cabal.project
43+
constraints: hashable ==1.4.2.0
44+
import: https://www.stackage.org/nightly-2023-12-07/cabal.config
45+
```
46+
47+
With `--version-win=shallowest`, the order of the import relative to the
48+
constraints **does not matter** within a project because the project is at the
49+
root of the import tree. Anything put there is top priority.
3750

3851
The same relative precedence rule applies per-package down an import tree for
3952
more complex import situations. Other constraints, such as flags, are not
4053
touched by this fix so it may be possible to orphan some flags that relate to
4154
versions of packages that get weeded out.
4255

56+
With `--version-win=latest`, the order of the import relative to the
57+
constraints **does matter**.
58+
4359
packages: cabal-install
4460
prs: #9510
4561
issues: #9511

0 commit comments

Comments
 (0)