Skip to content

Commit 3ecd5b6

Browse files
authored
Merge pull request #5800 from mpilgrem/ghc922
Allow stack to build with GHC 9.2.3 (nightly-2022-07-29)
2 parents a2dfb76 + 934b775 commit 3ecd5b6

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/Stack/Package.hs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ import Distribution.Types.LibraryName (libraryNameString, maybeToLibra
5656
#endif
5757
import Distribution.Types.MungedPackageName
5858
import qualified Distribution.Types.UnqualComponentName as Cabal
59+
#if MIN_VERSION_Cabal(3,6,0)
60+
import Distribution.Utils.Path (getSymbolicPath)
61+
#endif
5962
import Distribution.Verbosity (silent)
6063
import Distribution.Version (mkVersion, orLaterVersion, anyVersion)
6164
import qualified HiFileParser as Iface
@@ -411,7 +414,11 @@ generateBuildInfoOpts BioInput {..} =
411414
, [ biCabalDir
412415
| null (hsSourceDirs biBuildInfo)
413416
]
417+
#if MIN_VERSION_Cabal(3,6,0)
418+
, mapMaybe (toIncludeDir . getSymbolicPath) (hsSourceDirs biBuildInfo)
419+
#else
414420
, mapMaybe toIncludeDir (hsSourceDirs biBuildInfo)
421+
#endif
415422
, [ componentAutogen ]
416423
, maybeToList (packageAutogenDir biCabalVersion biDistDir)
417424
, [ componentOutputDir biComponentName biDistDir ]
@@ -808,7 +815,11 @@ resolveComponentFiles
808815
-> [DotCabalDescriptor]
809816
-> RIO Ctx (Map ModuleName (Path Abs File), [DotCabalPath], [PackageWarning])
810817
resolveComponentFiles component build names = do
818+
#if MIN_VERSION_Cabal(3,6,0)
819+
dirs <- mapMaybeM (resolveDirOrWarn . getSymbolicPath) (hsSourceDirs build)
820+
#else
811821
dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build)
822+
#endif
812823
dir <- asks (parent . ctxFile)
813824
agdirs <- autogenDirs
814825
(modules,files,warnings) <-

stack-ghc-922.yaml renamed to stack-ghc-923.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# GHC 9.2.2
2-
resolver: nightly-2022-04-09
1+
# GHC 9.2.3
2+
resolver: nightly-2022-07-29
33

44
packages:
55
- .
@@ -22,7 +22,8 @@ ghc-options:
2222
"$locals": -fhide-source-paths
2323

2424
extra-deps:
25-
- pantry-0.5.6@rev:0 # https://github.com/commercialhaskell/pantry/pull/53
25+
# See https://github.com/commercialhaskell/pantry/pull/53
26+
- pantry-0.5.6@rev:0
2627

2728
drop-packages:
2829
# See https://github.com/commercialhaskell/stack/pull/4712

0 commit comments

Comments
 (0)