File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
cabal-install-solver/src/Distribution/Solver/Modular
cabal-install/tests/UnitTests/Distribution/Solver/Modular Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -282,16 +282,16 @@ showOption qpn@(Q _pp pn) (POption i linkedTo) =
282
282
-- >>> showOptions foobarQPN [k1, k2]
283
283
-- "foo-bar; foo-bar~>bazqux.foo-bar-1, foo-bar~>bazqux.foo-bar-2"
284
284
-- >>> showOptions foobarQPN [v0, i1, k2]
285
- -- "foo-bar; 0, 1/installed-inplace, foo-bar~>bazqux.foo-bar-2"
285
+ -- "foo-bar; 0, 1/installed-inplace, foo-bar~>bazqux.foo-bar-2 and earlier versions "
286
286
showOptions :: QPN -> [POption ] -> String
287
287
showOptions _ [] = " unexpected empty list of versions"
288
288
showOptions q [x] = showOption q x
289
289
showOptions q xs = showQPN q ++ " ; " ++ (L. intercalate " , "
290
290
[if isJust linkedTo
291
291
then showOption q x
292
292
else showI i -- Don't show the package, just the version
293
- | x@ (POption i linkedTo) <- xs
294
- ])
293
+ | x@ (POption i linkedTo) <- take 3 xs
294
+ ] ++ if length xs >= 3 then " and earlier versions " else " " )
295
295
296
296
showGR :: QGoalReason -> String
297
297
showGR UserGoal = " (user goal)"
Original file line number Diff line number Diff line change @@ -964,6 +964,19 @@ tests =
964
964
skipping = " skipping: A; 2.0.0/installed-2.0.0, 1.0.0/installed-1.0.0"
965
965
in mkTest db " show skipping versions list, installed" [" B" ] $
966
966
solverFailure (\ msg -> rejecting `isInfixOf` msg && skipping `isInfixOf` msg)
967
+ , runTest $
968
+ let db =
969
+ [ Right $ exAv " A" 1 []
970
+ , Right $ exAv " A" 2 []
971
+ , Right $ exAv " A" 3 []
972
+ , Right $ exAv " A" 4 []
973
+ , Right $ exAv " A" 5 []
974
+ , Right $ exAv " B" 1 [ExFix " A" 6 ]
975
+ ]
976
+ rejecting = " rejecting: A-5.0.0 (conflict: B => A==6.0.0)"
977
+ skipping = " skipping: A; 4.0.0, 3.0.0, 2.0.0 and earlier versions (has"
978
+ in mkTest db " show summarized skipping versions list" [" B" ] $
979
+ solverFailure (\ msg -> rejecting `isInfixOf` msg && skipping `isInfixOf` msg)
967
980
]
968
981
]
969
982
]
You can’t perform that action at this time.
0 commit comments