commercialhaskell / stackage

Stable Haskell package sets: vetted consistent packages from Hackage
https://www.stackage.org/
MIT License
530 stars 805 forks source link

triplesec test failure #4644

Closed mihaimaruseac closed 5 years ago

mihaimaruseac commented 5 years ago
Loaded package environment from /tmp/stack14/test-ghc-env
Loaded package environment from /tmp/stack14/test-ghc-env

src/Crypto/TripleSec/Tutorial.hs:18:1: error:
    Could not load module ‘Crypto.TripleSec’
    It is a member of the hidden package ‘triplesec-0.2.2.0’.
    You can run ‘:set -package triplesec’ to expose it.
    (Note: this unloads all the modules in the current scope.)
    Use -v to see a list of the files searched for.
   |
18 | import Crypto.TripleSec
   | ^^^^^^^^^^^^^^^^^^^^^^^
triplesec

CC @SamProtas

SamProtas commented 5 years ago

As far as I could tell the test failure was due to a change in the way stack loads modules into ghci (which is relied on by doctest). I updated the doctest test-suite to explicitly load the src directory which has fixed the problem on all versions according to travis.

https://travis-ci.org/SamProtas/hs-triplesec

This has been updated to Hackage as a patch update 2.2.1:

http://hackage.haskell.org/package/triplesec

Let me know if further action from me is required.

gelisam commented 5 years ago

Btw, I think that was a bug in stack which is now fixed in the stable branch. Stack now limits the packages which doctest can see to the packages listed in the build-depends section of your test-suite, but until the above fix, they accidentally excluded the library defined in the same .cabal file from that list. Adding -isrc works too, but should now be unnecessary.