`cabal install` failure with GHC 8.10
Closed this issue · 2 comments
sjakobi commented
For some reason, cabal install vgrep
tried to build v0.1.4.1 for me, which unfortunately fails:
src/Vgrep/Environment/Config.hs:28:25: error:
Not in scope: type constructor or class ‘Attr’
|
28 | { _lineNumbers :: Attr
| ^^^^
src/Vgrep/Environment/Config.hs:31:25: error:
Not in scope: type constructor or class ‘Attr’
|
31 | , _lineNumbersHl :: Attr
| ^^^^
src/Vgrep/Environment/Config.hs:34:25: error:
Not in scope: type constructor or class ‘Attr’
|
34 | , _normal :: Attr
| ^^^^
src/Vgrep/Environment/Config.hs:37:25: error:
Not in scope: type constructor or class ‘Attr’
|
37 | , _normalHl :: Attr
| ^^^^
src/Vgrep/Environment/Config.hs:40:25: error:
Not in scope: type constructor or class ‘Attr’
|
40 | , _fileHeaders :: Attr
| ^^^^
src/Vgrep/Environment/Config.hs:44:25: error:
Not in scope: type constructor or class ‘Attr’
|
44 | , _selected :: Attr
| ^^^^
Here's the output when I try to force cabal
to install the latest v0.2.2.0:
$ cabal install vgrep --constraint 'vgrep ==0.2.2.0' --minimize-conflict-set
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: vgrep-0.2.2.0 (user goal)
[__1] trying: template-haskell-2.16.0.0/installed-2.16.0.0 (dependency of
vgrep)
[__2] next goal: aeson (dependency of vgrep)
[__2] rejecting: aeson-1.5.4.0 (conflict: vgrep => aeson>=0.11 && <1.3 ||
>=0.9 && <0.10)
[__2] skipping: aeson-1.5.3.0, aeson-1.5.2.0, aeson-1.5.1.0, aeson-1.5.0.0,
aeson-1.4.7.1, aeson-1.4.7.0, aeson-1.4.6.0, aeson-1.4.5.0, aeson-1.4.4.0,
aeson-1.4.3.0, aeson-1.4.2.0, aeson-1.4.1.0, aeson-1.4.0.0, aeson-1.3.1.1,
aeson-1.3.1.0, aeson-1.3.0.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '>=0.11 && <1.3 || >=0.9 &&
<0.10' from 'vgrep')
[__2] trying: aeson-1.2.4.0
[__3] next goal: th-abstraction (dependency of aeson)
[__3] rejecting: th-abstraction-0.3.2.0 (conflict: aeson =>
th-abstraction>=0.2.2 && <0.3)
[__3] skipping: th-abstraction-0.3.1.0, th-abstraction-0.3.0.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=0.2.2 && <0.3' from 'aeson')
[__3] rejecting: th-abstraction-0.2.11.0 (conflict:
template-haskell==2.16.0.0/installed-2.16.0.0, th-abstraction =>
template-haskell>=2.5 && <2.15)
[__3] skipping: th-abstraction-0.2.10.0, th-abstraction-0.2.9.0,
th-abstraction-0.2.8.0, th-abstraction-0.2.7.0, th-abstraction-0.2.6.0,
th-abstraction-0.2.5.0, th-abstraction-0.2.4.0, th-abstraction-0.2.3.0,
th-abstraction-0.2.2.0, th-abstraction-0.2.1.0, th-abstraction-0.2.0.0,
th-abstraction-0.1.3.0, th-abstraction-0.1.2.1, th-abstraction-0.1.2.0,
th-abstraction-0.1.1.0, th-abstraction-0.1.0.0 (has the same characteristics
that caused the previous version to fail: excludes 'template-haskell' version
2.16.0.0)
[__3] fail (backjumping, conflict set: aeson, template-haskell,
th-abstraction)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: aeson, vgrep, template-haskell,
th-abstraction
This indicates that vgrep
should be made compatible with the latest aeson
. It's not as easy as updating the bounds on aeson
though:
$ cabal install vgrep --constraint 'vgrep ==0.2.2.0' --allow-newer=aeson
<snip>
src/Vgrep/Ansi/Type.hs:51:10: error:
• Could not deduce (Semigroup (Formatted attr))
arising from the superclasses of an instance declaration
from the context: (Eq attr, Monoid attr)
bound by the instance declaration
at src/Vgrep/Ansi/Type.hs:51:10-58
• In the instance declaration for ‘Monoid (Formatted attr)’
|
51 | instance (Eq attr, Monoid attr) => Monoid (Formatted attr) where
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Vgrep/Ansi/Type.hs:129:62: error:
• Could not deduce (Semigroup (Formatted attr))
arising from a use of ‘<>’
from the context: (Eq attr, Monoid attr)
bound by the type signature for:
fuse :: forall attr.
(Eq attr, Monoid attr) =>
Formatted attr -> Formatted attr -> Formatted attr
at src/Vgrep/Ansi/Type.hs:123:1-84
• In the third argument of ‘Format’, namely ‘(t <> t')’
In the expression: Format (l + l') attr (t <> t')
In a case alternative:
(Format l attr t, Format l' attr' t')
| attr' == attr -> Format (l + l') attr (t <> t')
|
129 | | attr' == attr -> Format (l + l') attr (t <> t')
| ^^^^^^^
(Possibly related to #52)
sjakobi commented
v0.2.3.0 is compatible. Thanks! :)
sjakobi commented
I just ran into this issue again. In response I've used my Hackage trustee powers to constrain vgrep < 0.1.5
to require vty < 5.15
. See e.g. https://hackage.haskell.org/package/vgrep-0.1.4.1/revisions/.