Coder Social home page Coder Social logo

Comments (14)

andreasabel avatar andreasabel commented on July 29, 2024 1

doctest's own testsuite still has hardwired paths to files generated by cabal v1-build:

doctest/test/doctests.hs

Lines 10 to 12 in d5b1012

, "-idist/build/autogen/"
, "-optP-include"
, "-optPdist/build/autogen/cabal_macros.h"

So I can only run doctest's own testsuite when I create these files by e.g. cabal v1-build.

Once the build directory is present, @Mikolaj 's recipe works (tested with cabal version 3.6):

$ cabal build -w ghc-8.10.4 --enable-tests
$ cabal exec -w ghc-8.10.4 -- cabal test -w ghc-8.10.4

Notes:

  • --enable-tests is optional. If left out, the necessary packages for the tests are installed by cabal test in the second command.
  • -w ghc-8.10.4 is of course optional if your ghc is ghc-8.10.4.
  • The initial cabal build is not optional, since it prepares the environment for cabal exec. The latter has the effect that the doctests are run in the package environment of doctest. This is visible by messages like
    Loaded package environment from doctest/dist-newstyle/tmp/environment.-12856/.ghc.environment.x86_64-darwin-8.10.4
    
  • It is also important that there are no (or no stale) .ghc.environment.* files in the directory. My relevant .cabal/config setting is:
    write-ghc-environment-files: never
    

from doctest.

Mikolaj avatar Mikolaj commented on July 29, 2024 1

Indeed, it seems I was too optimistic. BTW, the most up to date cabal ticket about doctests (with links to other tickets), is here: haskell/cabal#4500

from doctest.

Mikolaj avatar Mikolaj commented on July 29, 2024

How about cabal exec cabal test? It works for me with GHC 8.10.4. Which version of cabal do you use?

from doctest.

sol avatar sol commented on July 29, 2024

This is fixed in doctest-0.20.0. doctest is now able to run on any cabal components via cabal repl:

cabal repl --with-ghc=doctest

Or if you have any prop>s:

cabal repl --build-depends=QuickCheck --with-ghc=doctest

You may also want to run cabal build first and possibly even (re)install doctest (if it was already there, it's basically a noop, so no harm in doing it). Something that is bullet proof and ready to be used on CI for any project would look like this:

cabal install doctest --overwrite-policy=always && cabal build && cabal repl --build-depends=QuickCheck --with-ghc=doctest

This is not beautiful, but it works + I'm not aware of any other approach that will work with projects that use Paths_*.

from doctest.

Mikolaj avatar Mikolaj commented on July 29, 2024

@sol: thank you for doctest! I missed the link between repl and cabal test. E.g., I have to disable one of my test components that uses doctest behind a flag, because otherwise Stackage LTS fails (reportedly in GHC 9, but not with GHC8? they presumably use just cabal test without any preparation). Do the recent improvements help in this scenario in any way?

from doctest.

sol avatar sol commented on July 29, 2024

@Mikolaj not sure if I understand the full scenario. But let me try, with doctest-0.20.0 you can run doctest without modifying your .cabal file (specifically, you don't need a test stanza for doctest anymore). Instead, you just run doctest on the command-line with:

cabal repl --with-ghc=doctest

This will run doctest on the main component of your package. You can also pass any additional arguments to cabal repl to e.g. run doctest on an executable or even a test stanzas (see the Cabal docs for details).

All that said, you can still continue to use doctest as before (say use doctest as library an create a custom main driver + cabal test stanza). However, that may not play well with cabal-v2 (specifically, it will not work if you import Paths_* anywhere in your project). If we want the doctest-as-a-lib-with-a-test-stanza to work consistently with cabal-v2 we will need upstream support from cabal.

So to answer your question, if you remove the doctest test stanza from your .cabal file and add

cabal install doctest --overwrite-policy=always && cabal build && cabal repl --build-depends=QuickCheck --with-ghc=doctest

to your CI setup instead then yes, I think it will address that issue with Stackage.

However, Stackage will still not run your doctests.

Does this make sense?

from doctest.

Mikolaj avatar Mikolaj commented on July 29, 2024

Yes, it makes sense and I love that I don't need to use doctest-driver any more. However, it doesn't quite work. Would you like to test?

git clone [email protected]:LambdaHack/LambdaHack.git

cd LambdaHack

cabal install doctest --overwrite-policy=always && cabal build && cabal repl --build-depends=QuickCheck --with-ghc=doctest this-game-src && cabal repl --build-depends=QuickCheck --with-ghc=doctest this-game-content && cabal repl --build-depends=QuickCheck --with-ghc=doctest definition && cabal repl --build-depends=QuickCheck --with-ghc=doctest LambdaHack

(BTW, in README there are previous instructions for running doctest [edit: and they work]).

from doctest.

sol avatar sol commented on July 29, 2024

@Mikolaj what exact failures do you get? Does cabal repl work if you omit --with-ghc=doctest?

from doctest.

Mikolaj avatar Mikolaj commented on July 29, 2024

Failures:

~/r/LambdaHack$ cabal repl --build-depends=QuickCheck --with-ghc=doctest LambdaHack
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O0
In order, the following will be built (use -v for more details):
 - LambdaHack-0.11.0.0 (lib:definition) (configuration changed)
 - LambdaHack-0.11.0.0 (lib) (configuration changed)
Configuring library 'definition' for LambdaHack-0.11.0.0..
Preprocessing library 'definition' for LambdaHack-0.11.0.0..
Building library 'definition' for LambdaHack-0.11.0.0..

on the commandline: warning:
    unrecognised warning flag: -Winvalid-haddock
Configuring library for LambdaHack-0.11.0.0..
Preprocessing library for LambdaHack-0.11.0.0..

on the commandline: warning:
    unrecognised warning flag: -Winvalid-haddock

<no location info>: warning: [-Wunused-packages]
    The following packages were specified via -package or -package-id flags,
    but were not needed for compilation:
      - zlib-0.6.2.3
      - vector-binary-instances-0.2.5.2
      - vector-0.12.3.1
      - unordered-containers-0.2.15.0
      - transformers-0.5.6.2
      - time-1.9.3
      - text-1.2.4.1
      - stm-2.5.0.1
      - splitmix-0.1.0.4
      - sdl2-ttf-2.1.2
      - sdl2-2.4.1.0
      - primitive-0.7.3.0
      - pretty-show-1.10
      - optparse-applicative-0.16.1.0
      - open-browser-0.2.1.0
      - miniutter-0.5.1.1
      - keys-3.12.3
      - hsini-0.5.1.2
      - hashable-1.3.5.0
      - filepath-1.4.2.1
      - enummapset-0.6.0.3
      - directory-1.3.6.0
      - deepseq-1.4.4.0
      - containers-0.6.5.1
      - bytestring-0.10.12.0
      - binary-0.8.8.0
      - async-2.2.4
      - ansi-terminal-0.11
      - QuickCheck-2.14.2
      - LambdaHack-0.11.0.0
engine-src/Game/LambdaHack/Common/Point.hs:95: failure in expression `(toEnum :: PointI -> Point) (fromEnum p) == p'

<interactive>:46:19: error:
    Variable not in scope:
      mkName
        :: t0 -> template-haskell-2.16.0.0:Language.Haskell.TH.Syntax.Name

engine-src/Game/LambdaHack/Common/Point.hs:96: failure in expression `(fromEnum :: Point -> PointI) (toEnum p) == p'

<interactive>:61:19: error:
    Variable not in scope:
      mkName
        :: t0 -> template-haskell-2.16.0.0:Language.Haskell.TH.Syntax.Name

engine-src/Game/LambdaHack/Common/Point.hs:111: failure in expression `chessDist p1 p2 >= 0'

<interactive>:90:19: error:
    Variable not in scope:
      mkName
        :: t0 -> template-haskell-2.16.0.0:Language.Haskell.TH.Syntax.Name

engine-src/Game/LambdaHack/Common/Point.hs:112: failure in expression `chessDist p1 p2 ^ (2 :: Int) <= euclidDistSq p1 p2'

<interactive>:105:19: error:
    Variable not in scope:
      mkName
        :: t0 -> template-haskell-2.16.0.0:Language.Haskell.TH.Syntax.Name

Examples: 10  Tried: 10  Errors: 0  Failures: 4
Error: cabal: repl failed for LambdaHack-0.11.0.0.

~/r/LambdaHack$ 

it works without --with-ghc=doctest:

~/r/LambdaHack$ cabal repl --build-depends=QuickCheck LambdaHack
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O0
In order, the following will be built (use -v for more details):
 - LambdaHack-0.11.0.0 (lib) (file /home/mikolaj/r/LambdaHack/dist-newstyle/build/x86_64-linux/ghc-8.10.7/LambdaHack-0.11.0.0/l/definition/noopt/cache/build changed)
Preprocessing library for LambdaHack-0.11.0.0..

on the commandline: warning:
    unrecognised warning flag: -Winvalid-haddock
GHCi, version 8.10.7: https://www.haskell.org/ghc/  :? for help

<no location info>: warning: [-Wunused-packages]
    The following packages were specified via -package or -package-id flags,
    but were not needed for compilation:
      - zlib-0.6.2.3
      - vector-binary-instances-0.2.5.2
      - vector-0.12.3.1
      - unordered-containers-0.2.15.0
      - transformers-0.5.6.2
      - time-1.9.3
      - text-1.2.4.1
      - stm-2.5.0.1
      - splitmix-0.1.0.4
      - sdl2-ttf-2.1.2
      - sdl2-2.4.1.0
      - primitive-0.7.3.0
      - pretty-show-1.10
      - optparse-applicative-0.16.1.0
      - open-browser-0.2.1.0
      - miniutter-0.5.1.1
      - keys-3.12.3
      - hsini-0.5.1.2
      - hashable-1.3.5.0
      - filepath-1.4.2.1
      - enummapset-0.6.0.3
      - directory-1.3.6.0
      - deepseq-1.4.4.0
      - containers-0.6.5.1
      - bytestring-0.10.12.0
      - binary-0.8.8.0
      - async-2.2.4
      - ansi-terminal-0.11
      - QuickCheck-2.14.2
      - LambdaHack-0.11.0.0
[  1 of 114] Compiling Game.LambdaHack.Client.AI.Strategy ( engine-src/Game/LambdaHack/Client/AI/Strategy.hs, interpreted )
[  2 of 114] Compiling Game.LambdaHack.Client.UI.Content.Screen ( engine-src/Game/LambdaHack/Client/UI/Content/Screen.hs, interpreted )
[  3 of 114] Compiling Game.LambdaHack.Common.HSFile ( engine-src/Game/LambdaHack/Common/HSFile.hs, interpreted )
[  4 of 114] Compiling Game.LambdaHack.Common.File ( engine-src/Game/LambdaHack/Common/File.hs, interpreted )
[  5 of 114] Compiling Game.LambdaHack.Common.Misc ( engine-src/Game/LambdaHack/Common/Misc.hs, interpreted )
[  6 of 114] Compiling Game.LambdaHack.Common.ClientOptions ( engine-src/Game/LambdaHack/Common/ClientOptions.hs, interpreted )
[  7 of 114] Compiling Game.LambdaHack.Common.Point ( engine-src/Game/LambdaHack/Common/Point.hs, interpreted )
[  8 of 114] Compiling Game.LambdaHack.Common.Area ( engine-src/Game/LambdaHack/Common/Area.hs, interpreted )
[  9 of 114] Compiling Game.LambdaHack.Client.UI.PointUI ( engine-src/Game/LambdaHack/Client/UI/PointUI.hs, interpreted )
[ 10 of 114] Compiling Game.LambdaHack.Client.UI.Overlay ( engine-src/Game/LambdaHack/Client/UI/Overlay.hs, interpreted )
[ 11 of 114] Compiling Game.LambdaHack.Common.PointArray ( engine-src/Game/LambdaHack/Common/PointArray.hs, interpreted )
[ 12 of 114] Compiling Game.LambdaHack.Client.UI.Frame ( engine-src/Game/LambdaHack/Client/UI/Frame.hs, interpreted )
[ 13 of 114] Compiling Game.LambdaHack.Client.UI.Animation ( engine-src/Game/LambdaHack/Client/UI/Animation.hs, interpreted )
[ 14 of 114] Compiling Game.LambdaHack.Common.RingBuffer ( engine-src/Game/LambdaHack/Common/RingBuffer.hs, interpreted )
[ 15 of 114] Compiling Game.LambdaHack.Common.Thread ( engine-src/Game/LambdaHack/Common/Thread.hs, interpreted )
[ 16 of 114] Compiling Game.LambdaHack.Common.Time ( engine-src/Game/LambdaHack/Common/Time.hs, interpreted )
[ 17 of 114] Compiling Game.LambdaHack.Client.UI.Msg ( engine-src/Game/LambdaHack/Client/UI/Msg.hs, interpreted )
[ 18 of 114] Compiling Game.LambdaHack.Common.Types ( engine-src/Game/LambdaHack/Common/Types.hs, interpreted )
[ 19 of 114] Compiling Game.LambdaHack.Common.Perception ( engine-src/Game/LambdaHack/Common/Perception.hs, interpreted )
[ 20 of 114] Compiling Game.LambdaHack.Common.Faction ( engine-src/Game/LambdaHack/Common/Faction.hs, interpreted )
[ 21 of 114] Compiling Game.LambdaHack.Common.HighScore ( engine-src/Game/LambdaHack/Common/HighScore.hs, interpreted )
[ 22 of 114] Compiling Game.LambdaHack.Common.Analytics ( engine-src/Game/LambdaHack/Common/Analytics.hs, interpreted )
[ 23 of 114] Compiling Game.LambdaHack.Common.Vector ( engine-src/Game/LambdaHack/Common/Vector.hs, interpreted )
[ 24 of 114] Compiling Game.LambdaHack.Common.ItemAspect ( engine-src/Game/LambdaHack/Common/ItemAspect.hs, interpreted )
[ 25 of 114] Compiling Game.LambdaHack.Common.Kind ( engine-src/Game/LambdaHack/Common/Kind.hs, interpreted )
[ 26 of 114] Compiling Game.LambdaHack.Common.Save ( engine-src/Game/LambdaHack/Common/Save.hs, interpreted )
[ 27 of 114] Compiling Game.LambdaHack.Common.Item ( engine-src/Game/LambdaHack/Common/Item.hs, interpreted )
[ 28 of 114] Compiling Game.LambdaHack.Common.Tile ( engine-src/Game/LambdaHack/Common/Tile.hs, interpreted )
[ 29 of 114] Compiling Game.LambdaHack.Common.ReqFailure ( engine-src/Game/LambdaHack/Common/ReqFailure.hs, interpreted )
[ 30 of 114] Compiling Game.LambdaHack.Common.Level ( engine-src/Game/LambdaHack/Common/Level.hs, interpreted )
[ 31 of 114] Compiling Game.LambdaHack.Client.Preferences ( engine-src/Game/LambdaHack/Client/Preferences.hs, interpreted )
[ 32 of 114] Compiling Game.LambdaHack.Common.Actor ( engine-src/Game/LambdaHack/Common/Actor.hs, interpreted )
[ 33 of 114] Compiling Game.LambdaHack.Common.State ( engine-src/Game/LambdaHack/Common/State.hs, interpreted )
[ 34 of 114] Compiling Game.LambdaHack.Common.ActorState ( engine-src/Game/LambdaHack/Common/ActorState.hs, interpreted )
[ 35 of 114] Compiling Game.LambdaHack.Common.MonadStateRead ( engine-src/Game/LambdaHack/Common/MonadStateRead.hs, interpreted )
[ 36 of 114] Compiling Game.LambdaHack.Client.UI.EffectDescription ( engine-src/Game/LambdaHack/Client/UI/EffectDescription.hs, interpreted )
[ 37 of 114] Compiling Game.LambdaHack.Client.UI.ItemDescription ( engine-src/Game/LambdaHack/Client/UI/ItemDescription.hs, interpreted )
[ 38 of 114] Compiling Game.LambdaHack.Client.UI.ActorUI ( engine-src/Game/LambdaHack/Client/UI/ActorUI.hs, interpreted )
[ 39 of 114] Compiling Game.LambdaHack.Atomic.MonadStateWrite ( engine-src/Game/LambdaHack/Atomic/MonadStateWrite.hs, interpreted )
[ 40 of 114] Compiling Game.LambdaHack.Client.UI.Key ( engine-src/Game/LambdaHack/Client/UI/Key.hs, interpreted )
[ 41 of 114] Compiling Game.LambdaHack.Client.UI.Slideshow ( engine-src/Game/LambdaHack/Client/UI/Slideshow.hs, interpreted )
[ 42 of 114] Compiling Game.LambdaHack.Client.UI.Frontend.Common ( engine-src/Game/LambdaHack/Client/UI/Frontend/Common.hs, interpreted )
[ 43 of 114] Compiling Game.LambdaHack.Client.UI.Frontend.Teletype ( engine-src/Game/LambdaHack/Client/UI/Frontend/Teletype.hs, interpreted )
[ 44 of 114] Compiling Game.LambdaHack.Client.UI.Frontend.Sdl ( engine-src/Game/LambdaHack/Client/UI/Frontend/Sdl.hs, interpreted )
[ 45 of 114] Compiling Game.LambdaHack.Client.UI.Frontend.ANSI ( engine-src/Game/LambdaHack/Client/UI/Frontend/ANSI.hs, interpreted )
[ 46 of 114] Compiling Game.LambdaHack.Client.UI.Frontend ( engine-src/Game/LambdaHack/Client/UI/Frontend.hs, interpreted )
[ 47 of 114] Compiling Game.LambdaHack.Client.UI.HumanCmd ( engine-src/Game/LambdaHack/Client/UI/HumanCmd.hs, interpreted )
[ 48 of 114] Compiling Game.LambdaHack.Client.UI.UIOptions ( engine-src/Game/LambdaHack/Client/UI/UIOptions.hs, interpreted )
[ 49 of 114] Compiling Game.LambdaHack.Client.UI.UIOptionsParse ( engine-src/Game/LambdaHack/Client/UI/UIOptionsParse.hs, interpreted )
[ 50 of 114] Compiling Game.LambdaHack.Client.UI.Content.Input ( engine-src/Game/LambdaHack/Client/UI/Content/Input.hs, interpreted )
[ 51 of 114] Compiling Game.LambdaHack.Client.UI.ContentClientUI ( engine-src/Game/LambdaHack/Client/UI/ContentClientUI.hs, interpreted )
[ 52 of 114] Compiling Game.LambdaHack.Client.UI.KeyBindings ( engine-src/Game/LambdaHack/Client/UI/KeyBindings.hs, interpreted )
[ 53 of 114] Compiling Game.LambdaHack.Client.Request ( engine-src/Game/LambdaHack/Client/Request.hs, interpreted )
[ 54 of 114] Compiling Game.LambdaHack.Client.Bfs ( engine-src/Game/LambdaHack/Client/Bfs.hs, interpreted )
[ 55 of 114] Compiling Game.LambdaHack.Client.State ( engine-src/Game/LambdaHack/Client/State.hs, interpreted )
[ 56 of 114] Compiling Game.LambdaHack.Client.UI.SessionUI ( engine-src/Game/LambdaHack/Client/UI/SessionUI.hs, interpreted )
[ 57 of 114] Compiling Game.LambdaHack.Client.MonadClient ( engine-src/Game/LambdaHack/Client/MonadClient.hs, interpreted )
[ 58 of 114] Compiling Game.LambdaHack.Client.CommonM ( engine-src/Game/LambdaHack/Client/CommonM.hs, interpreted )
[ 59 of 114] Compiling Game.LambdaHack.Client.UI.MonadClientUI ( engine-src/Game/LambdaHack/Client/UI/MonadClientUI.hs, interpreted )
[ 60 of 114] Compiling Game.LambdaHack.Client.UI.RunM ( engine-src/Game/LambdaHack/Client/UI/RunM.hs, interpreted )
[ 61 of 114] Compiling Game.LambdaHack.Client.UI.MsgM ( engine-src/Game/LambdaHack/Client/UI/MsgM.hs, interpreted )
[ 62 of 114] Compiling Game.LambdaHack.Client.UI.DrawM ( engine-src/Game/LambdaHack/Client/UI/DrawM.hs, interpreted )
[ 63 of 114] Compiling Game.LambdaHack.Client.UI.FrameM ( engine-src/Game/LambdaHack/Client/UI/FrameM.hs, interpreted )
[ 64 of 114] Compiling Game.LambdaHack.Client.UI.SlideshowM ( engine-src/Game/LambdaHack/Client/UI/SlideshowM.hs, interpreted )
[ 65 of 114] Compiling Game.LambdaHack.Client.UI.HandleHelperM ( engine-src/Game/LambdaHack/Client/UI/HandleHelperM.hs, interpreted )
[ 66 of 114] Compiling Game.LambdaHack.Client.UI.Watch.WatchQuitM ( engine-src/Game/LambdaHack/Client/UI/Watch/WatchQuitM.hs, interpreted )
[ 67 of 114] Compiling Game.LambdaHack.Client.UI.Watch.WatchCommonM ( engine-src/Game/LambdaHack/Client/UI/Watch/WatchCommonM.hs, interpreted )
[ 68 of 114] Compiling Game.LambdaHack.Client.UI.InventoryM ( engine-src/Game/LambdaHack/Client/UI/InventoryM.hs, interpreted )
[ 69 of 114] Compiling Game.LambdaHack.Client.BfsM ( engine-src/Game/LambdaHack/Client/BfsM.hs, interpreted )
[ 70 of 114] Compiling Game.LambdaHack.Client.UI.HandleHumanLocalM ( engine-src/Game/LambdaHack/Client/UI/HandleHumanLocalM.hs, interpreted )
[ 71 of 114] Compiling Game.LambdaHack.Client.UI.HandleHumanGlobalM ( engine-src/Game/LambdaHack/Client/UI/HandleHumanGlobalM.hs, interpreted )
[ 72 of 114] Compiling Game.LambdaHack.Client.UI.HandleHumanM ( engine-src/Game/LambdaHack/Client/UI/HandleHumanM.hs, interpreted )
[ 73 of 114] Compiling Game.LambdaHack.Client.AI.ConditionM ( engine-src/Game/LambdaHack/Client/AI/ConditionM.hs, interpreted )
[ 74 of 114] Compiling Game.LambdaHack.Client.AI.PickTargetM ( engine-src/Game/LambdaHack/Client/AI/PickTargetM.hs, interpreted )
[ 75 of 114] Compiling Game.LambdaHack.Client.AI.PickActorM ( engine-src/Game/LambdaHack/Client/AI/PickActorM.hs, interpreted )
[ 76 of 114] Compiling Game.LambdaHack.Client.AI.PickActionM ( engine-src/Game/LambdaHack/Client/AI/PickActionM.hs, interpreted )
[ 77 of 114] Compiling Game.LambdaHack.Client.AI ( engine-src/Game/LambdaHack/Client/AI.hs, interpreted )
[ 78 of 114] Compiling Game.LambdaHack.Atomic.CmdAtomic ( engine-src/Game/LambdaHack/Atomic/CmdAtomic.hs, interpreted )
[ 79 of 114] Compiling Game.LambdaHack.Atomic.PosAtomicRead ( engine-src/Game/LambdaHack/Atomic/PosAtomicRead.hs, interpreted )
[ 80 of 114] Compiling Game.LambdaHack.Atomic.HandleAtomicWrite ( engine-src/Game/LambdaHack/Atomic/HandleAtomicWrite.hs, interpreted )
[ 81 of 114] Compiling Game.LambdaHack.Atomic ( engine-src/Game/LambdaHack/Atomic.hs, interpreted )
[ 82 of 114] Compiling Game.LambdaHack.Client.UI.Watch.WatchUpdAtomicM ( engine-src/Game/LambdaHack/Client/UI/Watch/WatchUpdAtomicM.hs, interpreted )
[ 83 of 114] Compiling Game.LambdaHack.Client.UI.Watch.WatchSfxAtomicM ( engine-src/Game/LambdaHack/Client/UI/Watch/WatchSfxAtomicM.hs, interpreted )
[ 84 of 114] Compiling Game.LambdaHack.Client.UI.Watch ( engine-src/Game/LambdaHack/Client/UI/Watch.hs, interpreted )
[ 85 of 114] Compiling Game.LambdaHack.Client.UI ( engine-src/Game/LambdaHack/Client/UI.hs, interpreted )
[ 86 of 114] Compiling Game.LambdaHack.Client.Response ( engine-src/Game/LambdaHack/Client/Response.hs, interpreted )
[ 87 of 114] Compiling Game.LambdaHack.Client.HandleAtomicM ( engine-src/Game/LambdaHack/Client/HandleAtomicM.hs, interpreted )
[ 88 of 114] Compiling Game.LambdaHack.Client.HandleResponseM ( engine-src/Game/LambdaHack/Client/HandleResponseM.hs, interpreted )
[ 89 of 114] Compiling Game.LambdaHack.Client.LoopM ( engine-src/Game/LambdaHack/Client/LoopM.hs, interpreted )
[ 90 of 114] Compiling Game.LambdaHack.Client ( engine-src/Game/LambdaHack/Client.hs, interpreted )
[ 91 of 114] Compiling Game.LambdaHack.Server.DungeonGen.AreaRnd ( engine-src/Game/LambdaHack/Server/DungeonGen/AreaRnd.hs, interpreted )
[ 92 of 114] Compiling Game.LambdaHack.Server.DungeonGen.Place ( engine-src/Game/LambdaHack/Server/DungeonGen/Place.hs, interpreted )
[ 93 of 114] Compiling Game.LambdaHack.Server.DungeonGen.Cave ( engine-src/Game/LambdaHack/Server/DungeonGen/Cave.hs, interpreted )
[ 94 of 114] Compiling Game.LambdaHack.Server.FovDigital ( engine-src/Game/LambdaHack/Server/FovDigital.hs, interpreted )
[ 95 of 114] Compiling Game.LambdaHack.Server.Fov ( engine-src/Game/LambdaHack/Server/Fov.hs, interpreted )
[ 96 of 114] Compiling Game.LambdaHack.Server.ItemRev ( engine-src/Game/LambdaHack/Server/ItemRev.hs, interpreted )
[ 97 of 114] Compiling Game.LambdaHack.Server.ServerOptions ( engine-src/Game/LambdaHack/Server/ServerOptions.hs, interpreted )
[ 98 of 114] Compiling Game.LambdaHack.Server.DungeonGen ( engine-src/Game/LambdaHack/Server/DungeonGen.hs, interpreted )
[ 99 of 114] Compiling Game.LambdaHack.Server.State ( engine-src/Game/LambdaHack/Server/State.hs, interpreted )
[100 of 114] Compiling Paths_LambdaHack ( /home/mikolaj/r/LambdaHack/dist-newstyle/build/x86_64-linux/ghc-8.10.7/LambdaHack-0.11.0.0/noopt/build/autogen/Paths_LambdaHack.hs, interpreted )
[101 of 114] Compiling Game.LambdaHack.Server.MonadServer ( engine-src/Game/LambdaHack/Server/MonadServer.hs, interpreted )
[102 of 114] Compiling Game.LambdaHack.Server.ItemM ( engine-src/Game/LambdaHack/Server/ItemM.hs, interpreted )
[103 of 114] Compiling Game.LambdaHack.Server.HandleAtomicM ( engine-src/Game/LambdaHack/Server/HandleAtomicM.hs, interpreted )
[104 of 114] Compiling Game.LambdaHack.Server.DebugM ( engine-src/Game/LambdaHack/Server/DebugM.hs, interpreted )
[105 of 114] Compiling Game.LambdaHack.Server.ProtocolM ( engine-src/Game/LambdaHack/Server/ProtocolM.hs, interpreted )
[106 of 114] Compiling Game.LambdaHack.Server.CommonM ( engine-src/Game/LambdaHack/Server/CommonM.hs, interpreted )
[107 of 114] Compiling Game.LambdaHack.Server.StartM ( engine-src/Game/LambdaHack/Server/StartM.hs, interpreted )
[108 of 114] Compiling Game.LambdaHack.Server.PeriodicM ( engine-src/Game/LambdaHack/Server/PeriodicM.hs, interpreted )
[109 of 114] Compiling Game.LambdaHack.Server.HandleEffectM ( engine-src/Game/LambdaHack/Server/HandleEffectM.hs, interpreted )
[110 of 114] Compiling Game.LambdaHack.Server.HandleRequestM ( engine-src/Game/LambdaHack/Server/HandleRequestM.hs, interpreted )
[111 of 114] Compiling Game.LambdaHack.Server.LoopM ( engine-src/Game/LambdaHack/Server/LoopM.hs, interpreted )
[112 of 114] Compiling Game.LambdaHack.Server.BroadcastAtomic ( engine-src/Game/LambdaHack/Server/BroadcastAtomic.hs, interpreted )
[113 of 114] Compiling Game.LambdaHack.Server.Commandline ( engine-src/Game/LambdaHack/Server/Commandline.hs, interpreted )
[114 of 114] Compiling Game.LambdaHack.Server ( engine-src/Game/LambdaHack/Server.hs, interpreted )
Ok, 114 modules loaded.
*Game.LambdaHack.Atomic>

from doctest.

sol avatar sol commented on July 29, 2024

@Mikolaj this works for me:

cabal repl --build-depends=QuickCheck --build-depends=template-haskell LambdaHack --with-ghc=doctest

from doctest.

Mikolaj avatar Mikolaj commented on July 29, 2024

I confirm it compiles fine now.

Sadly, cabal repl --build-depends=QuickCheck --with-ghc=doctest this-game-src spams terribly, but that's probaby GHC 8.10.7 bug.

And I'm getting a test failure suddenly, but let me investigate first.

from doctest.

Mikolaj avatar Mikolaj commented on July 29, 2024

So, the test failure is correct, the test should have triggered an assertion failure always, but it didn't so far, so this is an improvement. Probably, previously, the assertion that is in a CPP block based on a (True by default) cabal flag was ignored. No idea why, but the repl version does not ignore the assertion.

from doctest.

sol avatar sol commented on July 29, 2024

cabal repl will pass the the "correct" -D..s to doctest. I would assume this is why.

from doctest.

Mikolaj avatar Mikolaj commented on July 29, 2024

OK, so probably doctest-driver just didn't. Thank you again.

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.