Coder Social home page Coder Social logo

Comments (23)

sol avatar sol commented on June 8, 2024

I'm not aware of that issue. Does the doctest test suite run flawlessly on your system? Say, the following reports no errors:

cabal configure && cabal build && ./tests/runtests.sh

from doctest.

sol avatar sol commented on June 8, 2024

Btw, thx for reporting this!

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

No errors were reported with runtests.sh. In my environement, compiled "Test.hs" can work well.

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

BTW. My plan is to integrate doctest to test-framework-th. I have already implemented it and doctest really enpowers test-framework. I will release the package in this week. Thank you for your work on doctest!

from doctest.

sol avatar sol commented on June 8, 2024

I think it is critical to make this work with runhaskell. I can not reproduce this on Linux (with GHC 7.0.4). I think it would be nice if we'd have a test case, that provokes this error. Can you try if runhaskell tests/Main.hs from the test-framework-doctest repository provokes this on your system?

Btw: Have you tried with doctest HEAD, or only with the latest release?

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

I tested both on Linux Mac:

---- 0.4.2 HEAD
Linux OK OK
Mac NG NG

NG means bus error or seg fault or "Too late for parseStaticFlags: call it before newSession".

I guess this bug is specific to Mac.

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

I forgot to write what I did:

Prelude> :m Test.DocTest
Prelude Test.DocTest> getDocTests [] ["Data/RBTree.hs"]

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

We can forget test-framework-doctest. Let's just think about doctest.

from doctest.

sol avatar sol commented on June 8, 2024

The "Too late for parseStaticFlags: call it before newSession" issue is a limitation of GHC (yes, GHC uses global state, see the code, if you are inclined). You can only run getDocTests once per process. So you have to start a new ghci session after a call to getDocTests. This is why I recommend to test this with runhaskell only.

Maybe you are affected by GHC bug #5031/#5132. Can you try one of the minimal test cases given in the tickets?

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

Thank you for your info.

Due to this bug, I cannot install GHC 7.4.0 on my Mac at this moment.

http://hackage.haskell.org/trac/ghc/ticket/5726

from doctest.

sol avatar sol commented on June 8, 2024

Can you verify that test-framework-doctest works with runhaskell once http://hackage.haskell.org/trac/ghc/ticket/5726 gets fixed? In that case I'd leave the ticket open until we have checked that.

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

I keep this issue in mind. I will try this with GHC RC2.

from doctest.

sol avatar sol commented on June 8, 2024

@kazu-yamamoto any new findings on that?

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

Good timing. I have tried GHC 7.4.0 rc2 just before but many packages including doctest and xhtml limit version of "base" and "ghc". I was tiered to fix them and stopped this confirm job...

from doctest.

sol avatar sol commented on June 8, 2024

@kazu-yamamoto Awesome! I saw you adapted test-framework-doctest to the latest version of Doctest.

Have you tested this with runhaskell/ghci and ghc-7.4.1?

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

Thank you for reminding. Now I can install all related packages. Unfortunately, runghc generated the following error:

lookupSymbol failed in relocateSection (relocate external)
/Users/kazu/Library/Haskell/ghc-7.4.0.20120126/lib/doctest-0.6.0/lib/HSdoctest-0.6.0.o: unknown symbol _doctestzm0zi6zi0_Pathszudoctest_version1_closure' Set.hs: Set.hs: unable to load packagedoctest-0.6.0'

If I use ghc to compile, the test program works well. Any thoughts?

from doctest.

sol avatar sol commented on June 8, 2024

Yes, the library section in the cabal file probably does not list all modules. I'll fix that, and do a maintenance release.

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

I will test this with GHC 7.4.1.

http://hackage.haskell.org/trac/ghc/ticket/5748

from doctest.

sol avatar sol commented on June 8, 2024

@kazu-yamamoto Ok, done.

Can you test with the latest version?

cabal update && cabal install doctest

from doctest.

sol avatar sol commented on June 8, 2024

Hmm, I think it would be nice to require that version in the cabal file of test-framework-doctest. Does checking for patch versions work in cabal files? If not, I'd do an other release as 0.6.1.

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

Bravo! runghc 7.4.1 works well with doctest 0.6.0.1!

from doctest.

kazu-yamamoto avatar kazu-yamamoto commented on June 8, 2024

I tested with test-framework-doctest which includes my patch exactly.

from doctest.

sol avatar sol commented on June 8, 2024

Ok, I think we can finally close this ticket.

from doctest.

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.