Skip to content

cabal bench suggests to add tests: True instead of benchmarks: True to cabal.project.local file #8537

Open
@Lev135

Description

@Lev135

Describe the bug
Running cabal bench for project without benchmarks: True provides the following hint:

cabal-3.6.2.0.exe: Cannot benchmark the package space-consumers-0.1.0.0
because none of the components are available to build: the benchmark
'bench-foo' is not available because the solver did not find a plan that
included the benchmarks. Force the solver to enable this for all packages by
adding the line 'tests: True' to the 'cabal.project.local' file.

however, only adding benchmarks: True, but not tests: True solves this problem

To Reproduce
Steps to reproduce the behavior:

  • create a new project without bechmarks: True in cabal.project file
  • add benchmark
  • run cabal bench

Expected behavior
Hint should contain correct suggestion (to add benchmarks: True)

System information

  • Operating system: Windows 10
  • cabal-install version 3.6.2.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions