Skip to content

doctest-0.25.0: unrecognized option `--interactive' #487

Description

@philderbeast

If I switch from doctest-0.24.3 to doctest-0.25.0, the latest version on hackage, then doctest is failing to get started on Cabal's doctests, reporting "unrecognized option `--interactive'".

$ git rev-parse HEAD
49689b494cd17d693fcc22376bb665d5924cd562

$ make doctest
cd Cabal-syntax && cabal repl --with-compiler=doctest --build-depends=QuickCheck --repl-options='-w -Wdefault -Wno-inconsistent-flags'
...
Build profile: -w ghc-9.12.4 -O1
In order, the following will be built (use -v for more details):
 - Cabal-syntax-3.17.0.0 (interactive) (lib) (configuration changed)
Configuring library for Cabal-syntax-3.17.0.0...
Preprocessing library for Cabal-syntax-3.17.0.0...
doctest: unrecognized option `--interactive'
Try `doctest --help' for more information.
Error: [Cabal-7125]
repl failed for Cabal-syntax-3.17.0.0.
make: *** [Makefile:154: doctest] Error 1

This is the change to Cabal's Makefile that installs the later doctest tool rather than the pinned earlier version:

$ git diff
diff --git a/Makefile b/Makefile
index 54905a9d5..4c91f864c 100644
...
 .PHONY: doctest-install
 doctest-install: ## Install doctest tool needed for running doctests.
-       cabal install doctest-0.24.3 --overwrite-policy=always --ignore-project --flag cabal-doctest
+       cabal install doctest-0.25.0 --overwrite-policy=always --ignore-project --flag cabal-doctest

With doctest-0.24.3, the make doctest recipe runs to completion and all doctests pass:

$ make doctest
cd Cabal-syntax && cabal repl --with-compiler=doctest --build-depends=QuickCheck --repl-options='-w -Wdefault -Wno-inconsistent-flags'
...
Build profile: -w ghc-9.12.4 -O1
In order, the following will be built (use -v for more details):
 - Cabal-syntax-3.17.0.0 (interactive) (lib) (configuration changed)
...
Examples: 154  Tried: 154  Errors: 0  Failures: 0
cd Cabal-described && cabal repl --with-compiler=doctest --build-depends=QuickCheck --repl-options='-w -Wdefault -Wno-inconsistent-flags'
...
Build profile: -w ghc-9.12.4 -O1
In order, the following will be built (use -v for more details):
 - Cabal-syntax-3.17.0.0 (lib) (configuration changed)
 - Cabal-3.17.0.0 (lib) (dependency rebuilt)
 - Cabal-described-3.17.0.0 (interactive) (lib) (dependency rebuilt)
...
Examples: 6  Tried: 6  Errors: 0  Failures: 0
cd Cabal && cabal repl --with-compiler=doctest --build-depends=QuickCheck --repl-options='-w -Wdefault -Wno-inconsistent-flags'
...
Build profile: -w ghc-9.12.4 -O1
In order, the following will be built (use -v for more details):
 - Cabal-3.17.0.0 (interactive) (lib) (configuration changed)
...
Examples: 25  Tried: 25  Errors: 0  Failures: 0
cd cabal-install-solver && cabal repl --with-compiler=doctest --build-depends=QuickCheck --repl-options='-w -Wdefault -Wno-inconsistent-flags'
...
Build profile: -w ghc-9.12.4 -O1
In order, the following will be built (use -v for more details):
 - Cabal-3.17.0.0 (lib) (configuration changed)
 - cabal-install-solver-3.17.0.0 (interactive) (lib) (configuration changed)
...
Examples: 48  Tried: 48  Errors: 0  Failures: 0
cd cabal-install && cabal repl --with-compiler=doctest --build-depends=QuickCheck --repl-options='-w -Wdefault -Wno-inconsistent-flags'
...
Build profile: -w ghc-9.12.4 -O1
In order, the following will be built (use -v for more details):
 - cabal-install-solver-3.17.0.0 (lib) (configuration changed)
 - hooks-exe-0.1 (lib) (file /home/philderbeast/dev/src/cabalism/cabal/dist-newstyle/build/x86_64-linux/ghc-9.12.4/Cabal-3.17.0.0/cache/build changed)
 - cabal-install-3.17.0.0 (interactive) (lib) (dependency rebuilt)
...
Examples: 57  Tried: 57  Errors: 0  Failures: 0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions