Repository navigation
Reject unconstrained dependency = none|all|eq - #11470
Open
philderbeast wants to merge 1 commit into
Open
philderbeast wants to merge 1 commit into
philderbeast wants to merge 1 commit into
Conversation
none|all|eq
philderbeast
force-pushed
the
add/constrain-eq-version
branch
from
February 2, 2026 02:48
0ddde8d to
4142036
Compare
philderbeast
marked this pull request as draft
February 3, 2026 12:09
philderbeast
force-pushed
the
add/constrain-eq-version
branch
11 times, most recently
from
February 10, 2026 16:24
8edde84 to
c5d436a
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
2 times, most recently
from
February 24, 2026 14:05
3e4a2ef to
6165816
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
4 times, most recently
from
March 4, 2026 14:43
e9feef8 to
e87fb1a
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
from
March 8, 2026 14:37
e87fb1a to
0151c4a
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
3 times, most recently
from
March 26, 2026 14:50
d7b6fd7 to
8339ba1
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
3 times, most recently
from
April 2, 2026 16:12
6c0a75b to
25aaa3f
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
from
April 5, 2026 16:01
25aaa3f to
57d0494
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
from
April 15, 2026 18:01
57d0494 to
f3c69ab
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
from
May 2, 2026 19:07
f3c69ab to
39e818d
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
3 times, most recently
from
May 28, 2026 00:54
29e84ab to
8341254
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
from
June 2, 2026 16:20
8341254 to
0fcc8b3
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
5 times, most recently
from
June 11, 2026 10:49
1465b97 to
d2cdd8a
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
2 times, most recently
from
June 20, 2026 17:25
d5d6e65 to
725ef5a
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
2 times, most recently
from
July 1, 2026 18:37
c8a3290 to
cb5b319
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
from
July 5, 2026 13:54
cb5b319 to
660f6ad
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
2 times, most recently
from
July 25, 2026 13:25
39b0135 to
142b86d
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
3 times, most recently
from
July 31, 2026 14:31
e4c14fb to
c775f69
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
from
November 12, 2026 15:47
c775f69 to
a39ba27
Compare
philderbeast
force-pushed
the
add/constrain-eq-version
branch
2 times, most recently
from
November 12, 2026 17:58
86513d3 to
65ba12b
Compare
- Update test for == constraint check - Add OnlyConstrainedEq - Test --reject-unconstrained-dependencies=eq - Add haddocks for eq option - Show flag setting in FailReason - Use onlyConstrainedAll in solver unit tests - Add unit tests for =eq and =none - Use normalise not normaliseVersionRange - Add freeze then =eq test - Add prop tests for reject-unconstrained-dependencies
philderbeast
force-pushed
the
add/constrain-eq-version
branch
from
November 12, 2026 18:00
65ba12b to
e7dc21a
Compare
Collaborator
Author
|
I've rebased this since the #12191 change merged and then added more tests, including property tests. I've updated the description and included a section about the very limited solver changes. One design point I'd like an opinion on: each constraint is checked on its own, so |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11468. Adds an
eqvalue for--reject-unconstrained-dependencies.With
eq, every non-local package that isn't a goal must have a version constraint that allows exactly one version. This is the setting to use with a freeze file:cabal freezethen--reject-unconstrained-dependencies=eqholds the build plan to the frozen set.When solving fails, the message now includes the option value, whether it was given as
=allor=eq(it shouldn't fail with=none).Solver Changes
The solver prune step,
onlyConstrained, fails a package choice when a predicate on the package name is false. Here we add one more case, that uses a newisThisVersionpredicate with the existingfilterVersionfunction. The predicate does a normalised version equality check.The solver's search is untouched and
=alland=nonecases are unchangedManual QA
With this repository,
cabal freeze.Edit
cabal.project.freezecommenting out the line for theprettydependency.Now
cabal build cabal-install-solver --reject-unconstrained-dependencies=?will only build when ? is none.Edit
cabal.project.freezechanging the line for theprettydependency.Now
cabal build --reject-unconstrained-dependencies=?will build when ? isnone|allbut won't build when ? iseq.Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.