-
Notifications
You must be signed in to change notification settings - Fork 19
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
Handle GHC 9.8's x-partial warning, requires dropping GHC 7 #59
base: main
Are you sure you want to change the base?
Conversation
Fixing a use of `tail` in the library. In the test-suite, `tail []` is intended, so switch off the `x-partial` there. Ignoring `-Wx-partial` on older GHCs requires `-Wno-unrecognised-warning-flags`, which entered GHC only in 8.0. Thus, dropping GHC 7. Closes hspec#56.
CI run on my fork: andreasabel#1
|
I think this can be fixed by using |
@@ -1,3 +1,6 @@ | |||
{-# OPTIONS_GHC -Wno-unrecognised-warning-flags #-} -- since GHC 8.0 | |||
{-# OPTIONS_GHC -Wno-x-partial #-} -- since GHC 9.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is x-partial
included in -Wdefault
? If not, then maybe use -w -Wdefault
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I just noticed, all this tests are technically broken.
`seq` return ()
doesn't really work. This should be evaluate
instead. If you wanna fix this too, then that would be more than welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
x-partial
included in-Wdefault
? If not, then maybe use-w -Wdefault
.
Or maybe just delete the test case. Or alternatively replace it with one that uses read
.
@@ -1,6 +1,6 @@ | |||
cabal-version: 1.12 | |||
|
|||
-- This file has been generated from package.yaml by hpack version 0.34.3. | |||
-- This file has been generated from package.yaml by hpack version 0.36.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently the repository is missing a .gitattributes
file, something like
https://github.com/sol/markdown-unlit/blob/main/.gitattributes.
If you wanna add that, then that would be more than welcome.
- 9.4.8 | ||
- 9.6.6 | ||
- 9.8.2 | ||
- 9.10.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we only want to test the latest minor version, then I think it is better to use something like - "9.10"
, etc...
@@ -30,7 +30,7 @@ library | |||
hs-source-dirs: | |||
src | |||
build-depends: | |||
base ==4.*, | |||
base >=4.9, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Hackage accepting packages that don't specify an upper bound on base
by now? I may be wrong on this, but I think that was not the case in the past?
If we drop support for GHC 7.* then there is some CPP that can be removed as well, e.g. https://github.com/hspec/HUnit/blob/main/src/Test/HUnit/Lang.hs#L5 https://github.com/hspec/HUnit/blob/main/src/Test/HUnit/Base.hs#L6 |
Fixing a use of
tail
in the library.In the test-suite,
tail []
is intended, so switch off thex-partial
there.Ignoring
-Wx-partial
on older GHCs requires-Wno-unrecognised-warning-flags
, which entered GHC only in 8.0.Thus, dropping GHC 7.
Closes #56.