-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cabal test
integration (GHC 9.4.5)
#411
Comments
I think it's documented in the
The recommended way to run However, as I mentioned before |
It’s documented in the README. I was aware of that. —
My cabal test definition stems from a boilerplate I made some time ago for continuous integration.
…one command and all tests are run: cabal test
If I can call it via cabal test (in the sense *that* it gets called like cabal repl), I assumed that it should work.
I learned, I misassumed.
The key is that the README didn’t tell me NOT to call it via cabal test for reason XYZ.
=> Do you think it’s valuable to add information to only call via cabal repl / not via cabal test?
> Ideal outcome: README of doctest shows example of doctest integration in package.yaml or cabal file.
>
The recommended way to run `doctest` is via `cabal repl`, so this is probably not going to happen.
Just to confirm: There is no and there will be no cabal integration of doctest?
What then is the recommended approach to run it along with other test suites with one simple command?
If there is no, is the README making that explicitly clear?
However, as I mentioned before <#410 (comment)> `cabal exec cabal test` should probably work for your example repo. Did you give it a try?
Not yet, will do — once I am back at my machine.
|
@benjaminweb wrote:
You can try https://github.com/haskellari/cabal-doctest . |
@sol |
@andreasabel got cabal-test now working (it is fast compared to |
Yeah, I also just did cut-and-paste to get it working. |
So, how is the speed compared to cabal-doctest in your case?
…On Thu, 9 Nov 2023, at 18:29, Andreas Abel wrote:
> I've found the README frustrating, though. Adopting the simple-example was the only option that worked.
>
Yeah, I also just did cut-and-paste to get it working.
However, I didn't like to have a custom `Setup.hs` that is *only* needed for tests, possibly complicating installation for the regular users.
Thus, I now follow the `cabal repl -w doctest` path. This has the drawback that it needs custom CI, while I would love to just write `cabal test`.
—
Reply to this email directly, view it on GitHub <#411 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAJ3EVP7GP3UG6PN5DVADYTYDUHIVAVCNFSM6AAAAAA3LFPZVOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBUGI2TSNBVGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Objective: How to let doctest run with
cabal test
?(I've spent considerable time to learn that I need to call
cabal repl --with-ghc=doctest
.)Ideal outcome: README of doctest shows example of doctest integration in package.yaml or cabal file.
Steps to reproduce:
cabal test
Expected behaviour:
The text was updated successfully, but these errors were encountered: