Skip to content

Commit

Permalink
Merge pull request #5800 from mpilgrem/ghc922
Browse files Browse the repository at this point in the history
Allow stack to build with GHC 9.2.3 (nightly-2022-07-29)
  • Loading branch information
mpilgrem authored Jul 30, 2022
2 parents a2dfb76 + 934b775 commit 3ecd5b6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
11 changes: 11 additions & 0 deletions src/Stack/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ import Distribution.Types.LibraryName (libraryNameString, maybeToLibra
#endif
import Distribution.Types.MungedPackageName
import qualified Distribution.Types.UnqualComponentName as Cabal
#if MIN_VERSION_Cabal(3,6,0)
import Distribution.Utils.Path (getSymbolicPath)
#endif
import Distribution.Verbosity (silent)
import Distribution.Version (mkVersion, orLaterVersion, anyVersion)
import qualified HiFileParser as Iface
Expand Down Expand Up @@ -411,7 +414,11 @@ generateBuildInfoOpts BioInput {..} =
, [ biCabalDir
| null (hsSourceDirs biBuildInfo)
]
#if MIN_VERSION_Cabal(3,6,0)
, mapMaybe (toIncludeDir . getSymbolicPath) (hsSourceDirs biBuildInfo)
#else
, mapMaybe toIncludeDir (hsSourceDirs biBuildInfo)
#endif
, [ componentAutogen ]
, maybeToList (packageAutogenDir biCabalVersion biDistDir)
, [ componentOutputDir biComponentName biDistDir ]
Expand Down Expand Up @@ -808,7 +815,11 @@ resolveComponentFiles
-> [DotCabalDescriptor]
-> RIO Ctx (Map ModuleName (Path Abs File), [DotCabalPath], [PackageWarning])
resolveComponentFiles component build names = do
#if MIN_VERSION_Cabal(3,6,0)
dirs <- mapMaybeM (resolveDirOrWarn . getSymbolicPath) (hsSourceDirs build)
#else
dirs <- mapMaybeM resolveDirOrWarn (hsSourceDirs build)
#endif
dir <- asks (parent . ctxFile)
agdirs <- autogenDirs
(modules,files,warnings) <-
Expand Down
7 changes: 4 additions & 3 deletions stack-ghc-922.yaml → stack-ghc-923.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# GHC 9.2.2
resolver: nightly-2022-04-09
# GHC 9.2.3
resolver: nightly-2022-07-29

packages:
- .
Expand All @@ -22,7 +22,8 @@ ghc-options:
"$locals": -fhide-source-paths

extra-deps:
- pantry-0.5.6@rev:0 # https://github.com/commercialhaskell/pantry/pull/53
# See https://github.com/commercialhaskell/pantry/pull/53
- pantry-0.5.6@rev:0

drop-packages:
# See https://github.com/commercialhaskell/stack/pull/4712
Expand Down

0 comments on commit 3ecd5b6

Please sign in to comment.