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. |
815d6c2 to
48f0848
Compare
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! |
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.