Skip to content

Commit

Permalink
Merge pull request #50 from juhp/master
Browse files Browse the repository at this point in the history
remove package override logic to unbreak ghc-9.10 (Cabal-3.12)
  • Loading branch information
juhp authored Dec 10, 2024
2 parents e5dbde5 + 995af0e commit 9e621eb
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Dockerfile.base-build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fpco/pid1:20.04
FROM fpco/pid1:22.04

ENV LANG C.UTF-8
RUN export DEBIAN_FRONTEND=noninteractive && \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Dockerfile.base-run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fpco/pid1:20.04
FROM fpco/pid1:22.04

RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
Expand Down
3 changes: 2 additions & 1 deletion curator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ executable casa-curator
TypeOperators
ghc-options: -optP-Wno-nonportable-include-path -threaded
build-depends:
aeson <2.2
aeson
, attoparsec-aeson
, base >=4.10 && <5
, bytestring
, casa-client
Expand Down
4 changes: 2 additions & 2 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ executables:
- text
- optparse-simple
- containers
# aeson 2.2 needs attoparsec-aeson
- aeson < 2.2
- aeson
- attoparsec-aeson
- http-conduit
- syb
- persistent-sqlite
Expand Down
20 changes: 3 additions & 17 deletions src/Curator/Snapshot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ checkDependencyGraph constraints snapshot = do
[ (pn, snapshotVersion (spLocation sp))
| (pn, sp) <- Map.toList (Pantry.snapshotPackages snapshot)
]
ghcBootPackages0 <- liftIO $ getBootPackages compilerVer
let ghcBootPackages = prunedBootPackages ghcBootPackages0 (Map.keysSet snapshotPackages)
declared = snapshotPackages <> Map.map (Just . bpVersion) ghcBootPackages
ghcBootPackages <- liftIO $ getBootPackages compilerVer
let declared = snapshotPackages <> Map.map (Just . bpVersion) ghcBootPackages
cabalName = "Cabal"
cabalError err = pure . Map.singleton cabalName $ [OtherError err]
pkgErrors <- case Map.lookup cabalName declared of
Expand All @@ -197,7 +196,7 @@ checkDependencyGraph constraints snapshot = do
return $ Map.mapWithKey (validatePackage constraints depTree cabalVersion) pkgInfos
let (rangeErrors, otherErrors) = splitErrors pkgErrors
rangeErrors' =
Map.mapWithKey (\(pname, _, _) bs -> (Map.member pname ghcBootPackages0, bs)) rangeErrors
Map.mapWithKey (\(pname, _, _) bs -> (Map.member pname ghcBootPackages, bs)) rangeErrors
unless (Map.null rangeErrors && Map.null otherErrors) $
throwM (BrokenDependencyGraph rangeErrors' otherErrors)

Expand Down Expand Up @@ -549,19 +548,6 @@ getBootPackages ghcVersion = do
in (name, BootPackage name version (installedUnitId ipi) (depends ipi))
Map.fromList . map toBootPackage <$> dump (hcPkgInfo db) silent GlobalPackageDB

prunedBootPackages ::
Map PackageName BootPackage
-> Set PackageName
-> Map PackageName BootPackage
prunedBootPackages ghcBootPackages0 overrides =
snd $
partitionReplacedDependencies
ghcBootPackages0
bpName
bpId
bpDepends
overrides

-- | GHC wired-in packages, list taken from Stack.Constants
-- see also ghc\/compiler\/basicTypes\/Module.hs
wiredInGhcPackages :: Set PackageName
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-21.25
resolver: lts-22.43
nix:
packages: [ pkg-config libz ]

Expand Down
8 changes: 4 additions & 4 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
packages: []
snapshots:
- completed:
sha256: a81fb3877c4f9031e1325eb3935122e608d80715dc16b586eb11ddbff8671ecd
size: 640086
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/25.yaml
original: lts-21.25
sha256: 08bd13ce621b41a8f5e51456b38d5b46d7783ce114a50ab604d6bbab0d002146
size: 720271
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/43.yaml
original: lts-22.43

0 comments on commit 9e621eb

Please sign in to comment.