Open hasufell opened 4 years ago
Try building #1579
Same here. The first warning looks strange...
Failed to build cabal-helper-1.0.0.0.
Build log ( /Users/araga/.cabal/logs/ghc-8.6.5/cbl-hlpr-1.0.0.0-6451f928.log
):
Configuring library for cabal-helper-1.0.0.0..
Warning:
This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.
package cabal-helper (cbl-hlpr-1.0.0.0-fe302886) requires cbl-pln-0.6.2.0-a418802b
package cabal-helper (cabal-helper-1.0.0.0) requires cbl-pln-0.6.2.0-e9dc4fb4
Preprocessing library for cabal-helper-1.0.0.0..
Building library for cabal-helper-1.0.0.0..
[1 of 3] Compiling Distribution.Helper ( lib/Distribution/Helper.hs, dist/build/Distribution/Helper.o )
lib/Distribution/Helper.hs:591:68: error:
• Couldn't match expected type ‘cabal-plan-0.6.2.0:Cabal.Plan.PlanJson’
with actual type ‘PlanJson’
NB: ‘PlanJson’
is defined in ‘Cabal.Plan’ in package ‘cabal-plan-0.6.2.0’
‘cabal-plan-0.6.2.0:Cabal.Plan.PlanJson’
is defined in ‘Cabal.Plan’ in package ‘cabal-plan-0.6.2.0’
• In the first argument of ‘CabalInstall.planPackages’, namely
‘plan’
In the second argument of ‘(<$>)’, namely
‘CabalInstall.planPackages plan’
In a stmt of a 'do' block:
Just pkgs <- NonEmpty.nonEmpty <$> CabalInstall.planPackages plan
|
591 | Just pkgs <- NonEmpty.nonEmpty <$> CabalInstall.planPackages plan
| ^^^^
lib/Distribution/Helper.hs:597:24: error:
• Couldn't match expected type ‘cabal-plan-0.6.2.0:Cabal.Plan.PlanJson’
with actual type ‘PlanJson’
NB: ‘PlanJson’
is defined in ‘Cabal.Plan’ in package ‘cabal-plan-0.6.2.0’
‘cabal-plan-0.6.2.0:Cabal.Plan.PlanJson’
is defined in ‘Cabal.Plan’ in package ‘cabal-plan-0.6.2.0’
• In the ‘piV2Plan’ field of a record
In the ‘piImpl’ field of a record
In the first argument of ‘return’, namely
‘ProjInfo
{piCabalVersion = makeDataVersion pjCabalLibVersion,
piProjConfModTimes = pcm,
piPackages = NonEmpty.sortWith pPackageName pkgs,
piImpl = ProjInfoV2
{piV2Plan = plan, piV2PlanModTime = plan_mtime,
piV2CompilerId = (Text.unpack compName, makeDataVersion compVer)}}’
|
597 | { piV2Plan = plan
| ^^^^
lib/Distribution/Helper.hs:835:59: error:
• Couldn't match expected type ‘PlanJson’
with actual type ‘cabal-plan-0.6.2.0:Cabal.Plan.PlanJson’
NB: ‘cabal-plan-0.6.2.0:Cabal.Plan.PlanJson’
is defined in ‘Cabal.Plan’ in package ‘cabal-plan-0.6.2.0’
‘PlanJson’
is defined in ‘Cabal.Plan’ in package ‘cabal-plan-0.6.2.0’
• In the expression: plan
In a pattern binding:
PlanJson {pjCabalLibVersion = Ver pjCabalLibVersion} = plan
In an equation for ‘mkCompHelperEnv’:
mkCompHelperEnv
projloc
(DistDirCabal SCV2 distdir)
PreInfoCabal
ProjInfo {piImpl = ProjInfoV2 {piV2Plan = plan}}
= CompHelperEnv {..}
where
cheProjDir = plCabalProjectDir projloc
cheCabalVer = CabalVersion $ makeDataVersion pjCabalLibVersion
cheProjLocalCacheDir = distdir </> "cache"
chePkgDb = Nothing
....
|
835 | PlanJson {pjCabalLibVersion=Ver pjCabalLibVersion } = plan
| ^^^^
cabal: Failed to build cabal-helper-1.0.0.0 (which is required by
exe:hie-wrapper from haskell-ide-engine-1.0.0.0 and exe:hie from
haskell-ide-engine-1.0.0.0). See the build log above for details.
I've got the same error and i reported in cabal: https://github.com/haskell/cabal/issues/6483 It was close as duplicated legitimately, the cause seems to be some uncanny bug with the v2 install.
Workaround:
cabal-plan-{hash}
(or the offending ones) build dirs inside store-dir
and repair the store using cabal-store-check
: https://github.com/phadej/cabal-extras/tree/master/cabal-store-checkstore-dir
to run v2-install
and another for the rest of v2-build
commands, anyway they dont reuse the dependencies@hasufell could you do a direct cabal install
(running the failed command inside shake f.e.) without using the script to confirm it is the same error?
Don't know why, maybe a cabal store issue, but leaving here for reference.
Commit f4600b795178e937f93170d4af98f8cecab23184