The gruntwork is now done by `packageFromPackageDescription`. The idea
is that if you already have a resolved `GenericPackageDescription`,
i.e. a `PackageDescription`, then you should still be able to get
a `Package` out of it.
`Distribution.Simple` based `Setup.hs` sometimes create
`<package>.buildinfo` files as an artifact of the configure phase.
This is the case in particular when using the autoconf hooks. Since
this is an internal detail private to any given package's `Setup.hs`,
Stack shouldn't (and doesn't) need to care or be aware of this. But
`stack ghci` does, since in that use case we're not using Cabal to
build - we're taking care of the build ourselves. In particular,
ignoring the `<package.buildinfo` file can mean that a successful
build using `stack build` can't be replicated using `stack ghci`.
E.g. in the case of the `network` package, the set of C files to build
is decided at configure time, based on the current platform. So the
`c-files` stanza in the .cabal file is not complete. This in turn
means `stack ghci` isn't aware of all object files it has to link in,
leading to obscure link errors (see #1239).
See  for more on .buildinfo files.