Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
e08a1ea8
Commit
e08a1ea8
authored
Aug 21, 2016
by
Edward Z. Yang
Committed by
GitHub
Aug 21, 2016
Browse files
Merge pull request #3645 from grayjay/unknown-package-message
Avoid filtering the solver log before 'showMessages'.
parents
12ca63dd
f2d02983
Changes
2
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Solver/Modular/Log.hs
View file @
e08a1ea8
...
...
@@ -43,8 +43,8 @@ logToProgress mbj l = let
proc
::
Maybe
Int
->
Progress
Message
a
b
->
Progress
Message
(
Maybe
(
ConflictSet
QPN
))
b
proc
_
(
Done
x
)
=
Done
x
proc
_
(
Fail
_
)
=
Fail
Nothing
proc
mbj'
(
Step
(
Failure
cs
Backjump
)
xs
@
(
Step
Leave
(
Step
(
Failure
cs'
Backjump
)
_
)))
|
cs
==
cs'
=
proc
mbj'
xs
-- repeated backjumps count as one
proc
mbj'
(
Step
x
@
(
Failure
cs
Backjump
)
xs
@
(
Step
Leave
(
Step
(
Failure
cs'
Backjump
)
_
)))
|
cs
==
cs'
=
Step
x
(
proc
mbj'
xs
)
-- repeated backjumps count as one
proc
(
Just
0
)
(
Step
(
Failure
cs
Backjump
)
_
)
=
Fail
(
Just
cs
)
proc
(
Just
n
)
(
Step
x
@
(
Failure
_
Backjump
)
xs
)
=
Step
x
(
proc
(
Just
(
n
-
1
))
xs
)
proc
mbj'
(
Step
x
xs
)
=
Step
x
(
proc
mbj'
xs
)
...
...
cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs
View file @
e08a1ea8
...
...
@@ -43,6 +43,7 @@ tests = [
,
runTest
$
indep
$
mkTest
db1
"multipleInstances"
[
"F"
,
"G"
]
anySolverFailure
,
runTest
$
mkTest
db21
"unknownPackage1"
[
"A"
]
(
SolverSuccess
[(
"A"
,
1
),
(
"B"
,
1
)])
,
runTest
$
mkTest
db22
"unknownPackage2"
[
"A"
]
(
SolverFailure
(
isInfixOf
"unknown package: C"
))
,
runTest
$
mkTest
db23
"unknownPackage3"
[
"A"
]
(
SolverFailure
(
isInfixOf
"unknown package: B"
))
]
,
testGroup
"Flagged dependencies"
[
runTest
$
mkTest
db3
"forceFlagOn"
[
"C"
]
(
SolverSuccess
[(
"A"
,
1
),
(
"B"
,
1
),
(
"C"
,
1
)])
...
...
@@ -798,6 +799,17 @@ db22 = [
,
Right
$
exAv
"A"
2
[
ExAny
"C"
]
]
-- | Another test for the unknown package message. This database tests that
-- filtering out redundant conflict set messages in the solver log doesn't
-- interfere with generating a message about a missing package (part of issue
-- #3617). The conflict set for the missing package is {A, B}. That conflict set
-- is propagated up the tree to the level of A. Since the conflict set is the
-- same at both levels, the solver only keeps one of the backjumping messages.
db23
::
ExampleDb
db23
=
[
Right
$
exAv
"A"
1
[
ExAny
"B"
]
]
-- | Database for (unsuccessfully) trying to expose a bug in the handling
-- of implied linking constraints. The question is whether an implied linking
-- constraint should only have the introducing package in its conflict set,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment