Porges / email-validate-hs

Email address validation for Haskell
Other
42 stars 23 forks source link

testsuite failing in Stackage Nightly #55

Closed juhp closed 1 year ago

juhp commented 3 years ago

Test suite failure for package email-validate-2.3.2.13

    src/Text/Email/Parser.hs:15:1: error:                                                                                   [8/9960]
        Could not load module ‘Data.Attoparsec.ByteString.Char8’
        It is a member of the hidden package ‘attoparsec-0.13.2.4’.
        You can run ‘:set -package attoparsec’ to expose it.
        (Note: this unloads all the modules in the current scope.)
        Use -v (or `:set -v` in ghci) to see a list of the files searched for.

    src/Text/Email/Parser.hs:16:1: error:
        Could not load module ‘Data.ByteString’
        It is a member of the hidden package ‘bytestring-0.10.12.0’.
        You can run ‘:set -package bytestring’ to expose it.
        (Note: this unloads all the modules in the current scope.)
        Use -v (or `:set -v` in ghci) to see a list of the files searched for.

    src/Text/Email/Parser.hs:17:1: error:
        Could not load module ‘Data.ByteString.Char8’
        It is a member of the hidden package ‘bytestring-0.10.12.0’.
        You can run ‘:set -package bytestring’ to expose it.
        (Note: this unloads all the modules in the current scope.)
        Use -v (or `:set -v` in ghci) to see a list of the files searched for.
    src/Text/Email/QuasiQuotation.hs:23: failure in expression `[email|someone@example.com|]'
    expected: "someone@example.com"
     but got: 
              ^
              <interactive>:25:1: error:
                  • Not in scope: ‘email’
                  • In the quasi-quotation: [email|someone@example.com|]

    src/Text/Email/Validate.hs:41: failure in expression `canonicalizeEmail "spaces. are. allowed@example.com"'
    expected: Just "spaces.are.allowed@example.com"
     but got: 
              ^
              <interactive>:39:1: error:
                  Variable not in scope: canonicalizeEmail :: t0 -> t

    src/Text/Email/Validate.hs:56: failure in expression `validate "example@example.com"'
    expected: Right "example@example.com"
     but got: 
              ^
              <interactive>:47:1: error:
                  Variable not in scope: validate :: t0 -> t

    Examples: 6  Tried: 5  Errors: 0  Failures: 3

This was with ghc-8.10.3

juhp commented 3 years ago

Hmm actually this may well be a stackage build issue.

ysangkok commented 2 years ago

I don't think it's a Stackage issue, it is more likely an issue with the doctest setup, since it doesn't consider environment files and it doesn't use cabal-doctest either. The tests pass if run with the new REPL invocation mode available in doctest-0.20.1:

cabal repl --with-ghc=doctest --ghc-options="-XQuasiQuotes -XOverloadedStrings"

And the package could be added back to Nightly when #65 is merged. The Stackage CI probably can't run the doctests, but that isn't a huge issue to me.

ysangkok commented 1 year ago

@Porges I see you removed doctest as a build dependency in recent commits. Would it be possible to make a release? Then Stackage wouldn't need to make an exception for

Porges commented 1 year ago

@ysangkok This is now done.