`cabal bench` suggests to add `tests: True` instead of `benchmarks: True` to cabal.project.local file
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**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`
Contributor guide
Research direction
Reproduce the issue with a project lacking `benchmarks: True`, add a benchmark, and run `cabal bench` to confirm the misleading hint. Trace the hint generation from that command and verify that the completed behavior suggests adding `benchmarks: True` without requiring `tests: True`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100