Code Monkey home page Code Monkey logo

Comments (12)

phadej avatar phadej commented on July 30, 2024

@wpoosanguansit you might have a typo, do you have your package somewhere publicly viewable?

EDIT: duh, I made a typo in a word typo.

from cabal-doctest.

wpoosanguansit avatar wpoosanguansit commented on July 30, 2024

@phadej thanks for your help. Unfortunately, we don't have it in a publicly viewable project. Below are the two package and stack yaml files we are using. Thanks again for your help.

package.yaml.txt
stack.yaml.txt

from cabal-doctest.

phadej avatar phadej commented on July 30, 2024

I don't see anything obviously wrong with those.

You could try a version in #48 which would log the location of generated Build_doctests file. (I though have no idea how make stack to make custom setup verbose, --cabal-verbose doesn't seem to do the trick). Or you could try to find . -name 'Build_depends.hs to see if it's created at all.

from cabal-doctest.

wpoosanguansit avatar wpoosanguansit commented on July 30, 2024

find didn't return any result. So the file was not generated at all I think. Also, i did use the commit you mentioned. I also didn't see any print out that is different from my earlier stack test runs. Any other suggestions? Thanks.

from cabal-doctest.

phadej avatar phadej commented on July 30, 2024

from cabal-doctest.

wpoosanguansit avatar wpoosanguansit commented on July 30, 2024

from cabal-doctest.

phadej avatar phadej commented on July 30, 2024
main = do
    defaultMainGeneratingProtos "src/System/Proto"
    defaultMainWithDoctests "doctests"

That's definitely incorrect. You might take a look into adding hooks with http://hackage.haskell.org/package/cabal-doctest-1.0.6/docs/Distribution-Extra-Doctest.html#v:addDoctestsUserHook

Look how defaultMainWithDoctests or defaultMainAutoconfWithDoctests are implemented.

from cabal-doctest.

wpoosanguansit avatar wpoosanguansit commented on July 30, 2024

I do see this in the doc:

defaultMainWithDoctests Source #

:: String	
doctests test-suite name
-> IO ()	 
A default main with doctests:

import Distribution.Extra.Doctest
       (defaultMainWithDoctests)

main :: IO ()
main = defaultMainWithDoctests "doctests"

And I do have this:

import Distribution.Extra.Doctest ( defaultMainWithDoctests )
import Data.ProtoLens.Setup

main :: IO ()
main = do
    defaultMainGeneratingProtos "src/System/Proto"
    defaultMainWithDoctests "doctests"

defaultMainWithDoctests "doctests" will get run, right? I have to apologize that I didn't see what is missing yet. Thanks for your help.

from cabal-doctest.

phadej avatar phadej commented on July 30, 2024

I'm pretty sure that defaultMainWithDoctests "doctests" isn't run. Or if it is, it doesn't do anything reasonable.

from cabal-doctest.

alissa-tung avatar alissa-tung commented on July 30, 2024

Whats your test-suite name for doctests in the Cabal file? In the pkg doc case, it is "doctests".

from cabal-doctest.

wpoosanguansit avatar wpoosanguansit commented on July 30, 2024

I am so sorry @alissa-tung that I have stop working on the code awhile back and I totally lost the hd that this project was on from encryption. Thanks for your help.

from cabal-doctest.

alissa-tung avatar alissa-tung commented on July 30, 2024

I am so sorry @alissa-tung that I have stop working on the code awhile back and I totally lost the hd that this project was on from encryption. Thanks for your help.

You're welcome and sorry to hear that. I ran into this issue because I initially use the name in the example instead the test-suite of the package I am working on and after I made CI passing I thought I can help if it can be the reason in this issue. Hoping someone who indexed the issues in the future can save some time :)

from cabal-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.