Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in 2.15.1: stack passes unknown flag -no-keep-hi-files to ghc 8.0 #6509

Closed
andreasabel opened this issue Mar 5, 2024 · 3 comments

Comments

@andreasabel
Copy link

Stack 2.15.1 passes -no-keep-hi-files to GHC 8.0, crashing it: https://github.com/debug-ito/staversion/actions/runs/8159145946/job/22302754180?pr=11#step:7:477

ghc: unrecognised flag: -no-keep-hi-files
did you mean one of:
  -keep-hc-files
unrecognised flag: -no-keep-o-files
did you mean one of:
  -keep-s-files

Usage: For basic information, try the `--help' option.

Error: [S-6374]
       While building simple Setup.hs (scroll up to its section to see the error) using:
       /usr/local/.ghcup/ghc/8.0.2/bin/ghc-8.0.2 -rtsopts -threaded 
-clear-package-db -global-package-db -hide-all-packages -package base 
-main-is StackSetupShim.mainOverride -package Cabal-1.24.2.0 
/home/runner/.stack/setup-exe-src/setup-6HauvNHV.hs 
/home/runner/.stack/setup-exe-src/setup-shim-6HauvNHV.hs 
-o /home/runner/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_6HauvNHV_1.24.2.0_ghc-8.0.2 
-no-keep-hi-files -no-keep-o-files

The flag -no-keep-hi-files has apparently only been added in GHC 8.2, according to the milestone in https://gitlab.haskell.org/ghc/ghc/-/issues/4114 .
Unfortunately, the GHC docs have no "since" info for flags, and the release notes for 8.2 do not mention this flag either.

@andreasabel
Copy link
Author

Oh, this seems to be

I searched only the open issues...

Shouldn't closing this issue at least entail patch to Stack 2.15.1 so that it outright refuses to build with GHC 8.0 and lower?

Checking that it can handle the requested GHC is part of the "type checking" of a stack command so to say, and I would like a proper "type error" rather than a "crash at runtime". (After all we are strongly typed Haskellers...)

@mpilgrem
Copy link
Member

mpilgrem commented Mar 5, 2024

Given your experience, I'll see if I can release a Stack 2.15.3 that fixes this soon.

@mpilgrem
Copy link
Member

mpilgrem commented Mar 5, 2024

Closing as duplicate of #6498, which I have re-opened.

@mpilgrem mpilgrem closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants