Misspelled dependency in benchmark causes unhelpful errors #10796
Labels
needs triage
re: benchmarks
Concerning building/running benchmarks
re: error-message
Concerning error messages delivered to the user
type: bug
Describe the bug
If you write an invalid name into the dependencies of a benchmark and run
cabal bench
, it will produce the following error:If you follow the advice and add
tests: True
in the cabal.project.local file, then the error does not change.If you run
cabal repl tmp-lme6AnaAzo:benchmarks
, it will produce a similarly unhelpful error:To Reproduce
Steps to reproduce the behavior:
Expected behavior
Ideally, in both cases the error message would immediately produce the real error (which does get produced if you add
benchmarks: True
in the cabal.project.local file):(The problem is that I removed the
o
at the end of thetmp-lme6AnaAz
dependency name)But if that is too hard, then I'd at least add to the error message that you should put
benchmarks: True
in yourcabal.project.local
file to force the benchmark to be included.System information
cabal
3.14.1.0,ghc
9.6.6The text was updated successfully, but these errors were encountered: