-
Notifications
You must be signed in to change notification settings - Fork 718
Description
Describe the bug
I am trying to build latest cabal-install for Fedora with ghc-9.8.4.
But since I am packaging for a distro I use Setup.hs not cabal-install for building packages.
However I am not able to get cabal-install to compile against latest Cabal-syntax,
instead it is prefers the Cabal-syntax from ghc and so fails. You can say this is essentially v1-build
.
Is there some way I can force Cabal is use the new Cabal-syntax version?
Actual result
src/Distribution/Client/FetchUtils.hs:203:67: error: [GHC-83865]
• Couldn't match type ‘Distribution.Types.PackageId.PackageIdentifier’
with ‘Cabal-syntax-3.10.3.0:Distribution.Types.PackageId.PackageIdentifier’
Expected: Cabal-syntax-3.10.3.0:Distribution.Types.PackageId.PackageIdentifier
Actual: PackageId
NB: ‘Cabal-syntax-3.10.3.0:Distribution.Types.PackageId.PackageIdentifier’
is defined in ‘Distribution.Types.PackageId’
in package ‘Cabal-syntax-3.10.3.0’
‘Distribution.Types.PackageId.PackageIdentifier’
is defined in ‘Distribution.Types.PackageId’
in package ‘Cabal-syntax-3.12.1.0’
• In the second argument of ‘Sec.indexLookupFileInfo’, namely
‘pkgid’
In a stmt of a 'do' block:
fileInfo <- Sec.indexLookupFileInfo callbacks pkgid
In the first argument of ‘Sec.catchChecked’, namely
‘(do fileInfo <- Sec.indexLookupFileInfo callbacks pkgid
sz <- Sec.FileLength . fromInteger <$> getFileSize file
if sz /= Sec.fileInfoLength (Sec.trusted fileInfo) then
warnAndFail "file length mismatch"
else
do res <- Sec.compareTrustedFileInfo (Sec.trusted fileInfo)
<$> Sec.computeFileInfo (Sec.Path file :: Sec.Path Sec.Absolute)
if res then pure True else warnAndFail "file hash mismatch")’
|
203 | fileInfo <- Sec.indexLookupFileInfo callbacks pkgid
| ^^^^^
src/Distribution/Client/FetchUtils.hs:289:36: error: [GHC-83865]
• Couldn't match type ‘Distribution.Types.PackageId.PackageIdentifier’
with ‘Cabal-syntax-3.10.3.0:Distribution.Types.PackageId.PackageIdentifier’
Expected: Cabal-syntax-3.10.3.0:Distribution.Types.PackageId.PackageIdentifier
Actual: PackageId
NB: ‘Cabal-syntax-3.10.3.0:Distribution.Types.PackageId.PackageIdentifier’
is defined in ‘Distribution.Types.PackageId’
in package ‘Cabal-syntax-3.10.3.0’
‘Distribution.Types.PackageId.PackageIdentifier’
is defined in ‘Distribution.Types.PackageId’
in package ‘Cabal-syntax-3.12.1.0’
• In the second argument of ‘Sec.downloadPackage'’, namely ‘pkgid’
In a stmt of a 'do' block: Sec.downloadPackage' rep pkgid path
In the second argument of ‘($)’, namely
‘do info verbosity ("Writing " ++ path)
Sec.downloadPackage' rep pkgid path’
|
289 | Sec.downloadPackage' rep pkgid path
| ^^^^^
Expected behavior
Build using the Cabal-syntax I had prepared and built for it first.
System information
- Operating system: Fedora Linux Rawhide
ghc
9.8.4
Additional context
Since "forever" Fedora (or other distros) have just packaged and shipped the cabal-install that corresponds to the version of Cabal in their ghc version, but now I am trying to see if I can also have a package for the latest cabal-install built with bundled Cabal and Cabal-syntax (and cabal-install-solver).