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

add support for building tests with ghc-8.8 #15

Open
cdepillabout opened this issue Feb 29, 2020 · 3 comments
Open

add support for building tests with ghc-8.8 #15

cdepillabout opened this issue Feb 29, 2020 · 3 comments

Comments

@cdepillabout
Copy link

When building the tests for semver-range with ghc-8.8.2, I get the following errors:

Preprocessing test suite 'unit-tests' for semver-range-0.2.8..
Building test suite 'unit-tests' for semver-range-0.2.8..

<no location info>: warning: [-Wmissing-home-modules]
    These modules are needed for compilation but not listed in your .cabal file's other-modules:
        Data.SemVer Data.SemVer.Parser Data.SemVer.Types
[1 of 4] Compiling Data.SemVer.Types ( src/Data/SemVer/Types.hs, dist/build/unit-tests/unit-tests-tmp/Data/SemVer/Types.o )
[2 of 4] Compiling Data.SemVer.Parser ( src/Data/SemVer/Parser.hs, dist/build/unit-tests/unit-tests-tmp/Data/SemVer/Parser.o )
[3 of 4] Compiling Data.SemVer      ( src/Data/SemVer.hs, dist/build/unit-tests/unit-tests-tmp/Data/SemVer.o )
[4 of 4] Compiling Main             ( tests/Unit.hs, dist/build/unit-tests/unit-tests-tmp/Main.o )

tests/Unit.hs:319:26: error:
    • Variable not in scope: fail :: String -> Expectation
    • Perhaps you meant one of these:
        ‘fail_’ (line 316), ‘tail’ (imported from ClassyPrelude),
        ‘T.tail’ (imported from Data.Text)
    |
319 |         (Left err, _) -> fail $ "Semver range parse failed: " <> show err
    |                          ^^^^

tests/Unit.hs:320:26: error:
    • Variable not in scope: fail :: String -> Expectation
    • Perhaps you meant one of these:
        ‘fail_’ (line 316), ‘tail’ (imported from ClassyPrelude),
        ‘T.tail’ (imported from Data.Text)
    |
320 |         (_, Left err) -> fail $ "Semver parse failed: " <> show err
    |                          ^^^^

I believe this is because of the monadfail changes in 8.8:

https://gitlab.haskell.org/ghc/ghc/wikis/migration/8.8#base-41300

@adnelson
Copy link
Owner

adnelson commented Apr 8, 2020

Sorry this took me a while to get to, but it should be fixed now. Please let me know if it's still problematic for you. Thanks a bunch for making this issue! :)

@cdepillabout
Copy link
Author

Thanks for updating this!

Would you be able to make a release with this change? It looks like 0.2.8 is still the latest on Hackage: https://hackage.haskell.org/package/semver-range-0.2.8

@cdepillabout
Copy link
Author

@adnelson Any way to get a fix for this uploaded to Hackage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants