-
Notifications
You must be signed in to change notification settings - Fork 152
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
add label option "BeforeAndAfter" #630
Conversation
I'm holding off on code review till more team members weigh in on the use of All versus BeforeAndAfter versus other options. See issue #628 for discussion. |
I don't like |
@rprouse IIRC we "deprecated" it in our discussion but didn't have any way to express that deprecation either at the command line or as an engine option, which is a string value. If anyone can think of a way to do that, which will be visible to users, it might be worth trying. |
OTOH one could argue that if All showed all possible labels for all tests, it would no longer be ambiguous. |
@CharliePoole you are right. We could just deprecate it by no longer documenting it and/or we could deprecate it by printing a warning note on the console when it is used. To be honest, I think we should have taken a stronger stand when we introduced the My problem with I don't have a strong opinion on this, I just don't like making an already confusing feature potentially more so 😉 |
@rprouse I felt there was some confusion about how we got where we are so I posted s mini-history of the feature on the issue. You can see that On and All preceded Before and After. Of course, history explains why we're here but doesn't tell us what to do next. Personally, I think that developing an API incrementally means you will occasionally need to break it. I wish we had dropped All when we added the synonym Before, but we didn't. |
@rprouse Just reread your last paragraph. After already includes On. So does Before and All. I was suggesting we redefine All as Before plus After unless we ate willing to get rid of it entirely. I don't think it helps to treat this as a flags enum because the option controls two subtly different things: labelling of tests and labelling of test output. |
No so long ago Joseph added a deprecation warning for nunit-console/src/NUnitConsole/nunit3-console/CommandLineOptions.cs Lines 288 to 294 in ec66e00
|
@mikkelbu Thanks, I'd forgotten about that.Same thing would work here. |
Thanks for doing this @johannes-schmitt - looks good. @nunit/engine-team I agree with the general sentiment that this API is getting too confusing. I'd like to propose the changes below for the overall API. I do think they are out of scope for this PR however - if we agree on this (or similar) - I think we should merge this as is, and make the later changes as a separate issue. My thoughts on the existing API (that I think we're in agreement on) is that
|
@ChrisMaddock Makes sense to me. |
@ChrisMaddock I like that. If now's the time to change stuff, what use is the |
@jnm2 Since Off is the default, eliminating it would be a pretty major change, bigger than just changing the spelling of an option. |
Okay. I didn't realize that. |
Excellent proposal @ChrisMaddock 👍 |
Note On and All as deprecated. See nunit/nunit-console#721 and nunit/nunit-console#630 for relevant changes.
Note On and All as deprecated. See nunit/nunit-console#721 and nunit/nunit-console#630 for relevant changes.
Note On and All as deprecated. See nunit/nunit-console#721 and nunit/nunit-console#630 for relevant changes. 9919fa4
fixes #628