Handle GHC 9.8's x-partial warning, requires dropping GHC 7#59
Handle GHC 9.8's x-partial warning, requires dropping GHC 7#59andreasabel wants to merge 1 commit intohspec:mainfrom
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.
Is x-partial included in -Wdefault? If not, then maybe use -w -Wdefault.
There was a problem hiding this comment.
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.
Is
x-partialincluded 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.
| 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.
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.
If we only want to test the latest minor version, then I think it is better to use something like - "9.10", etc...
| src | ||
| build-depends: | ||
| base ==4.*, | ||
| base >=4.9, |
There was a problem hiding this comment.
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
tailin the library.In the test-suite,
tail []is intended, so switch off thex-partialthere.Ignoring
-Wx-partialon older GHCs requires-Wno-unrecognised-warning-flags, which entered GHC only in 8.0.Thus, dropping GHC 7.
Closes #56.