Comments (23)
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.
Btw, thx for reporting this!
from doctest.
No errors were reported with runtests.sh. In my environement, compiled "Test.hs" can work well.
from doctest.
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.
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.
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.
I forgot to write what I did:
Prelude> :m Test.DocTest
Prelude Test.DocTest> getDocTests [] ["Data/RBTree.hs"]
from doctest.
We can forget test-framework-doctest. Let's just think about doctest.
from doctest.
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.
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.
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.
I keep this issue in mind. I will try this with GHC RC2.
from doctest.
@kazu-yamamoto any new findings on that?
from doctest.
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.
@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.
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 package
doctest-0.6.0'
If I use ghc to compile, the test program works well. Any thoughts?
from doctest.
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.
I will test this with GHC 7.4.1.
http://hackage.haskell.org/trac/ghc/ticket/5748
from doctest.
@kazu-yamamoto Ok, done.
Can you test with the latest version?
cabal update && cabal install doctest
from doctest.
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.
Bravo! runghc 7.4.1 works well with doctest 0.6.0.1!
from doctest.
I tested with test-framework-doctest which includes my patch exactly.
from doctest.
Ok, I think we can finally close this ticket.
from doctest.
Related Issues (20)
- Support GHC 9.2 HOT 2
- doctest extracts examples from code blocks
- New major version? HOT 1
- I could discuss if you wouldn't limit discussion. HOT 1
- Weird test failure due to type error with GHC 9.2.1 HOT 5
- "not in scope" errors when running with GHC 9 + stack test; redux HOT 20
- Disable test without changing rendering HOT 1
- 0.20.0 doesn't build on ghc 9.4.2 HOT 6
- Invalid platform constants HOT 2
- Error related to OverloadedLists not reported as such HOT 3
- Extra `type-defaults` warnings (from `OverloadedStrings`) make doctests fail HOT 10
- Build failure on GHC 9.6 HOT 1
- How to pass `--fast` when going via `cabal repl`? HOT 1
- `doctest` in multi-GHC setting HOT 5
- One test fails with GHC 9.6.1 HOT 1
- Ci: ubuntu-18.04 will be discontinued soon HOT 1
- Can I focus doctest on a particular function in a module or can I exclude functions from being tested? HOT 2
- GHC 9.4.5, doctest 0.22.0 `$setup import …` does only work with `cabal repl --with-ghc=doctest` HOT 1
- `cabal test` integration (GHC 9.4.5) HOT 7
- cabal repl --enable-multi-repl --with-ghc=doctest fails with "unrecognized option `-unit'" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doctest.