Skip to content

cabal-install seems to pass new implicit flags to the compiler by default, which breaks doctest. #10915

@Kleidukos

Description

@Kleidukos

Information

  • cabal-install version 3.15.0.0 (commit 2f3a45d, Tue Apr 8 00:30:30 2025 +0000)
  • doctest version 0.24.0

## Bug

doctest's manual tells users to run it as a substitute haskell compiler:

cabal repl --with-compiler=doctest

However with cabal-head, the passing of unexpected flags to the compiler breaks.

❯ cabal repl --with-compiler=doctest
Warning: this is a debug build of cabal-install with assertions enabled.
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Build profile: -w ghc-9.10.1 -O0
In order, the following will be built (use -v for more details):
 - servant-0.20.2 (interactive) (lib) (cannot read state cache)
Warning: this is a debug build of cabal-install with assertions enabled.
Configuring library for servant-0.20.2...
Warning: this is a debug build of cabal-install with assertions enabled.
Preprocessing library for servant-0.20.2...
doctest: unrecognized option `--interactive'
Try `doctest --help' for more information.
Error: [Cabal-7125]
repl failed for servant-0.20.2.

This behaviour cannot be reproduced with the `3.15.0.0.2024.10.3 pre-release. I'm surprised cabal's own doctest suite is able to run at all.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions