commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
3.95k stars 842 forks source link

wiredInGhcPackages is out of date and depends on GHC version #6558

Closed chreekat closed 2 months ago

chreekat commented 2 months ago

GHC's wired-in packages are currently

https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Unit/Types.hs#L635-643

wiredInUnitIds =
   [ primUnitId
   , bignumUnitId
   , ghcInternalUnitId
   , baseUnitId
   , rtsUnitId
   , thUnitId
   , experimentalUnitId
   ]

curator and stack both have different lists.

Stack:

https://github.com/commercialhaskell/stack/blob/master/src/Stack/Constants.hs#L256-L285

  mparsed = mapM parsePackageName
    [ "ghc-prim"
      -- A magic package
    , "integer-gmp"
      -- No longer magic > 1.0.3.0. With GHC 9.6.4 at least, there seems to be
      -- no problem in using it.
    , "integer-simple"
      -- A magic package
    , "base"
      -- A magic package
    , "rts"
      -- Said to be not a \'real\' package
    , "template-haskell"
      -- A magic package
    , "dph-seq"
      -- Deprecated in favour of dph-prim-seq, which does not appear to be
      -- magic. With GHC 9.6.4 at least, there seems to be no problem in using
      -- it.
    , "dph-par"
      --  Deprecated in favour of dph-prim-par, which does not appear to be
      -- magic. With GHC 9.6.4 at least, there seems to be no problem in using
      -- it.
    , "ghc"
      -- A magic package
    , "interactive"
      -- Could not identify information about this package name. With GHC 9.6.4
      -- at least, there seems to be no problem in using it.
    , "ghc-bignum"
      -- A magic package
    ]

Curator: https://github.com/commercialhaskell/curator/issues/40

I have no idea what effect this has on Stack or Stackage snapshots.

mpilgrem commented 2 months ago

@chreekat, I had cause to look at this recently. The only packages that are, in a sense, 'out of date' are dph-seq and dph-par (deprecated) and integer-gmp (was once magic, but no longer magic). I think it is harmless but as the master branch of Stack has dropped support for GHC < 8.4, there might be some scope for a 'spring clean'.