GithubHelp home page GithubHelp logo

Comments (13)

snoyberg avatar snoyberg commented on June 17, 2024

Pinging @sol. I don't have this problem, but @jwiegley reported something similar. Any ideas Simon?

from stackage.

sol avatar sol commented on June 17, 2024

This is probably again ghc not finding sandbox packages. @snoyberg I guess you don't have this problem, because you installed setenv outside your sandbox.

I think the general solution would really be to set GHC_PACKAGE_PATH before running the test suites.

@snoyberg you mentioned some complications with cabal (or cabal-dev here?). If patching cabal-dev is not viable, would it still work to only build the test suites with cabal-dev but run them ourself?

from stackage.

sol avatar sol commented on June 17, 2024

If nothing else helps, I can of course somehow special-case this particular test case ;)

(BTW: The affected test case does not really test Hspec, rather a precondition it relies on.)

from stackage.

snoyberg avatar snoyberg commented on June 17, 2024

The problem is with cabal-install itself. If you try to set GHC_PACKAGE_PATH, it fails...

But I just checked, and GHC_PACKAGE_PATH=foo: cabal test seems to work. Let me test this a little further.

from stackage.

snoyberg avatar snoyberg commented on June 17, 2024

Alright, by removing setenv from my user package repo I was able to reproduce the error, and with the attached commit was able to resolve it. Can you test this and let me know if it works for you?

from stackage.

sol avatar sol commented on June 17, 2024

@snoyberg It would be possible to use GHC_PACKAGE_PATH instead of HASKELL_PACKAGE_SANDBOX in doctest, right?

from stackage.

snoyberg avatar snoyberg commented on June 17, 2024

It still wouldn't work for the case of cabal-dev install hspec --enable-tests, since in that case you can't use GHC_PACKAGE_PATH. I'm still confused as to why the HASKELL_PACKAGE_SANDBOX didn't solve this problem entirely, do you know why not? IMO it's still the more resilient solution.

from stackage.

sol avatar sol commented on June 17, 2024

Because this is not related to doctest.

from stackage.

snoyberg avatar snoyberg commented on June 17, 2024

Oh, the hspec test suite is calling GHCi itself directly?

from stackage.

sol avatar sol commented on June 17, 2024

Yes, it is to make sure that future versions of ghci keep changes to env.

from stackage.

snoyberg avatar snoyberg commented on June 17, 2024

Got it, makes sense. Sorry for the mistaken assumption about hspec.

from stackage.

sol avatar sol commented on June 17, 2024

np ;)

from stackage.

snoyberg avatar snoyberg commented on June 17, 2024

This test suite should now build. Please reopen issue if problem reappears.

from stackage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.