-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make --test-show-details=direct
the default
#7817
Comments
I agree, this should be the default. Personally, I usually opt for |
is it? on my machine (linux, cabal 3.7) it's "failures", and I think that's reasonable, since successful tests don't really carry any extra information |
That is a good alternatve (I also sometimes use it for passing arguments). I wonder why
Oh, you're right, but that doesn't change my points. It still has the same problem that results are only shown after the test suite finished. As for successful tests not carrying any extra information, I think it's satisfying to see the passing tests and also useful if you wanna know which tests exactly are run ( |
Multiple test suites, cwd changes, ... |
I disagree, seeing that tests are run is very valuable feedback: You have a way easier time telling whether your tests are stuck, what progress is made, etc... I have yet to encounter a single use-case, where I was glad about the default. In fact, I argue exactly the opposite: Everyone cares about the tests output, unless you don't (e.g. in CI successful tests can be probably ignored.) |
Right -- I think there are two use cases. In the CI case we really don't want to clutter already potentially super noisy logs with anything and only want failures. (This is generally the case with any sort of automation imho). In the interactive "fixing tests" case we want the nicest most interactive output we can have. I'm ok with switching the default to |
EDIT: |
I don't understand how the linked issue is coupled to direct? It does sound like the custom build type issue is an obstacle to this request, unless we either automatically downgrade direct to streaming, or add direct support to old cabal. |
Err. I confused |
Does this mean we are unblocked? It would be great to move forward with this ticket. |
The
part is still there. EDIT: please nuke |
|
That's a good remark. Should we enable logging in |
The |
@Mikolaj I would love to see the behaviour of |
We could complicate and add yet another option that controls logging, but if nobody objects, let's simply do what you propose. If there are existing or future use cases where the logs are huge and undesired, we can implement the no-logs flag separately in the future. A pull request would be very welcome (unless somebody objects within a few days). |
And then I think we can make |
We just got another request to get this #8604, so I add the 3.10 milestone. I understand the outcome of this discussion as follows:
The reason the second and third are separate is because I don't expect the third step to be entirely trivial: Or is losing logs in the default a dealbreaker? |
Edit: this is a non-issue, see next comment. I wonder, perhaps haskell-ci maintainers (cc @phadej, @RyanGlScott) could call |
The comment above (#7817 (comment)) indicates that haskell-ci already uses direct by default but allow to opt-out. So we're good on this front. (Why would you need a log file in CI anyway? it's too much hussle to access it, and it's much easier to use web interface to inspect console output, which you can also download as a text file). Reading on on the history of direct #2911, I become more certain that have both — colorful output and a log file — is not trivial: we pass a pipe to a test and it's either a terminal pipe, in which case we get colors, or a file pipe, in which case we don't. So I suggest we just flip the default switch to direct-as-it-is-today and be loud about it. |
If haskell-CI defaults to |
Just FTR, here’s a recently generated Haskell CI script that does have |
Description
Currently, the default is
failures
, which is not a good default (more details below). IMO, the default should bedirect
instead, which does the things a new user (or at least I) would expect.Comparison of the filters
always
: only shows the results after the test suite has finished (this behavior is quite unintuitive and it had lead me and others to believe it was a bug, see cabal test suppressing output #1581)never
: doesn't show any results (this is obviously a bad default)failures
: only shows failing test suites and only after they finished (this may be occasionally useful, but isn't a good default imo)streaming
: shows the results in real time, but doesn't support colorsdirect
: shows the results in real time and supports colors (in fact, it is the only filter supporting colors)So in summary, I think
direct
is the best default option (and it also matches the default behavior ofstack test
).The text was updated successfully, but these errors were encountered: