Open chreekat opened 6 months ago
I don't know why stack needs the list, seems odd if it wouldn't tie it to GHC versions.
For curator, I think:
a ghc-wired package missing in curator means we may upgrade it and that can break snapshots - but perhaps that would also break the creation of the snapshots since we build with stack. If it's missing in ghc it means that we won't upgrade them in snapshots even if we have to - so that's less of an issue.
I'm not sure what actual issues it may cause... we should keep it up-to-date
Yeah looks like you wouldn't be able to specify such a package in a snapshot:
let isWiredIn pn _ = pn `Set.member` wiredInGhcPackages
(wiredIn, packages) =
Map.partitionWithKey isWiredIn (Pantry.snapshotPackages snapshot)
if not (Map.null wiredIn)
then do
let errMsg = "GHC wired-in package can not be overriden"
pure $ Map.map (const [OtherError errMsg]) wiredIn
src/Curator/Snapshot:192
As wired-in packages are GHC boot packages, I think they should not be included directly in snapshots. I've done some spring cleaning on Stack's list.
@bergmark, Stack will not create a project with the same name as a wired-in package. For example:
❯ stack new rts
Error: [S-5682]
Stack declined to create a new directory for project rts, as
package rts is 'wired-in' to a version of GHC. That can cause
build errors.
The names blocked by Stack are: base, dph-par, dph-seq, ghc,
ghc-bignum, ghc-prim, integer-gmp, integer-simple, interactive,
rts and template-haskell.
Sort of related https://github.com/haskell/cabal/issues/9669
See also: https://github.com/haskell/cabal/issues/10087
GHC-9.12 is likely to not wire-in template-haskell and base.
GHC's wired-in packages are currently
https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Unit/Types.hs#L635-643
curator and stack both have different lists.
Curator:
https://github.com/commercialhaskell/curator/blob/master/src/Curator/Snapshot.hs#L565-L580
Stack: https://github.com/commercialhaskell/stack/issues/6558
I have no idea what effect this has on Stack or Stackage snapshots.