commercialhaskell / stack

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

Error S-6362 report does not acknowledge when the snapshot has been set at the command line #6583

Closed mpilgrem closed 1 month ago

mpilgrem commented 1 month ago

For example, the based on snapshot setting in report in:

> stack --snapshot lts-20.11 build --no-install-ghc --dry-run # lts-20.11 is GHC 9.2.5

Error: [S-6362]
       No compiler found, expected minor version match with ghc-9.2.5 (x86_64) (based on snapshot setting
       in D:\Users\mike\Code\Haskell\moo\stack.yaml).

       To install the correct version of GHC into the subdirectory for the specified platform in Stack's
       directory for local tools (C:\Users\mike\AppData\Local\Programs\stack\x86_64-windows\), try
       running stack setup or use the --install-ghc flag. To use your system GHC installation, run stack
       config set system-ghc --global true, or use the --system-ghc flag.

(S-6362 is the Stack.Types.Build.BuildPrettyException CompilerVersionMismatch, thrown by Stack.Setup.installGhcBindist.)