Closed Ptival closed 7 months ago
tasty
executable has no knowledge that it was invoked by cabal test
.
Yeah that's unfortunate.
Is it far-fetched to assume that a consequent portion of the users may be calling from cabal, and to have a note for them in the error message? :\
Or if not in the error message (since this is irrelevant information to non-cabal users), maybe a section of the README warning about this?
(I'm not a maintainer)
Well, at the very least it could be stack test
instead of cabal test
. Or cabal run
. Or stack run
.
Closing, I don't believe that tasty
should guess which tool has called it and how. This is more of a UI/UX issue for cabal
/ stack
.
When running tasty via
cabal test
with a failing test, the error message contains the mention:This is a nice suggestion for discoverability! But alas, a non-expert may then try:
which does not work, since
-p
means "enable profiling" forcabal
.They may be a slightly more enlightened user, who knows that this parameter should be passed to the test executable, and will therefore resort to the more clever:
which does not work, because for some reason
cabal test
does not pass parameters to the test executable.Only through being extremely savvy, or a couple of frustrating search engine queries, will one stumble into the "arcane" knowledge that, if you want to pass parameters to the test executable via
cabal
, you should switch to:Would it be possible to include or hint at this knowledge into the error message? :-)