Remove duplicated constraints from CondTree#11626
Remove duplicated constraints from CondTree#11626leana8959 wants to merge 1 commit intohaskell:masterfrom
Conversation
|
Removing these trailing zeros causes the test "duplicate dependencies" and "duplicate flagged dependencies" to fail. Maybe I uncovered a bug in the test suite with this PR? When
|
ff16a51 to
815d6c2
Compare
|
@leana8959 I suggest you squash commits and mark as ready for review, if you want someone's feedback. People often perceive "drafts" as private experiments, not asking for immediate feedback. Essentially the PR removes cabal/Distribution/Configuration.hs Lines 221 to 224 in 0dbb6d4 Almost twenty years after the "possible optimizations later on" never materialized :) So high time to clean it up. |
48f0848 to
947f3bc
Compare
|
@Bodigrim You're right, I rebased and fixed the formatting. Glad to know that this refactor is heading in the right direction! |
|
Hello, I have tried to reproduce the problem on master. Indeed, changing Maybe disabling the trailing zero warning would be a good solution to make the |
54893a0 to
c429fc6
Compare
|
@leana8959 this needs a changelog entry under |
geekosaur
left a comment
There was a problem hiding this comment.
I haven't finished reading the diffs, I need to poke at a CI fix for an upstream dependency changing on us.
f7c5af6 to
32e4e96
Compare
|
CI will fail; see #11661, which I'll push in as soon as its CI finishes. |
32e4e96 to
b1eb9a4
Compare
|
@leana8959 I read more of the code for the solver DSL, and my best guess is that the test failure caused by cabal/cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs Lines 754 to 759 in ec8052b cabal/cabal-install/tests/UnitTests/Distribution/Solver/Modular/DSL.hs Lines 769 to 774 in ec8052b I prefer changing |
b1eb9a4 to
085cb19
Compare
|
@geekosaur I was able to derive @sebright Thanks for the help with the testsuite! I managed to fix all tests without supressing warnings. |
Derive Foldable for CondBranch We no longer support building Cabal with GHCs this old (8.0.1/8.0.2). The hand-written instance that was a necessary workaround for older GHCs was removed. Update testsuite fixtures Since CondTree refactor, trailing zeros in generated GPD in the testsuite started tripping GPD validation checks. Notably the `BaseNoUpperBounds` and `TrailingZeroUpperBounds` errors. The refactor removes the trailing zeros and adds a upperbound to base.
085cb19 to
a0364e4
Compare
|
Just force pushed to resolve merge conflict. Would appreciate to have a second reviewer so we could get this merged :) |
CondTreeis defined as follows:cabal/Cabal-syntax/src/Distribution/Types/CondTree.hs
Lines 57 to 61 in c5c2072
CondTreeis often instantiated withabeing a component that hasBuildInfoandcas[Dependency]. The[Dependency]is derived from theBuildInfoduring construction (see the last line).cabal/Cabal-syntax/src/Distribution/PackageDescription/Parsec.hs
Lines 485 to 496 in c5c2072
The accessors are exposed, this duplication of
[Dependency]can cause the data to be inconsistent.Cabal exact print aims to allow modifications to the GPD. Not having a single source of truth can also confuse programmers using GPD as an API to exact print.
Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.