@@ -261,6 +261,37 @@ An extra-dep will shadow a dependency specified in a [snapshot](#snapshot) of
261261the same name. An extra-dep can be shadowed by a [project package](#packages) of
262262the same name.
263263
264+ !!! info
265+
266+ Some Haskell packages published on Hackage, for example `base` and `ghc`,
267+ are referred to as 'wired-in' to one or more versions of GHC or as 'magic'.
268+ They can be distinguished from normal packages by the contents of their
269+ Cabal files : GHC's `-this-unit-id` option is set as the name of the package
270+ without a version. For example, the `base.cabal` for `base-4.19.1.0`
271+ includes :
272+
273+ ~~~yaml
274+ -- We need to set the unit id to base (without a version number)
275+ -- as it's magic.
276+ ghc-options : -this-unit-id base
277+ ~~~
278+
279+ The GHC boot packages that are 'wired-in' cannot be shaddowed with different
280+ versions of the same package. Given their dependencies, the use of these
281+ boot packages in a build plan may limit what can be specified as an
282+ extra-dep.
283+
284+ For example, GHC boot package `ghc-9.8.2` has a dependency on `process`. Its
285+ ` *.conf` file identifies the dependency as `process-1.6.18.0-4fb7`. If
286+ package `ghc-9.8.2` is part of a build plan and a different version of
287+ ` process` is specified as an extra-dep, during a build, Stack will identify
288+ that the build plan refers to two versions of `process` and warn that the
289+ build is likely to fail.
290+
291+ Stack treats the following as the names of 'wired-in' packages : ` base` ,
292+ ` dph-par` , `dph-seq`, `ghc-bignum`, `ghc-prim`, `ghc`, `integer-gmp`,
293+ ` integer-simple` , `interactive`, `rts` and `template-haskell`.
294+
264295# ## flags
265296
266297Default : ` {}`
0 commit comments