Make --rdmd-default-compiler optional#339
Conversation
|
Thanks for your pull request and interest in making D better, @marler8997! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
|
As previously discussed, let's not do this. |
|
This change is different than the previous. It makes the option optional instead of removing it. |
4a9e4ff to
f319820
Compare
|
Leaving aside pros and cons of this particular change for the moment, I note that many of the recent changes suggested seem to have been with the aim of making it simpler (for a certain definition of "simpler"...) to run I'd like to understand why that's a desired outcome, because a large part of the work done on revising the design was intended to make it so that developers didn't really need to care about Is there a use-case that I didn't anticipate, that makes it useful or necessary to run |
|
Being able to run |
|
Which options do you need to set? And just for clarity -- are you working on POSIX or on Windows? |
|
I work and test on both POSIX and Windows. So far I execute multiple back to back runs of |
|
Right. But you shouldn't need to run i.e. Is that problematic for you in some way (e.g. too verbose)? |
|
OK, I looked into this a bit deeper: it looks like the I think everything else should be covered, though. |
|
As far as I know, Digital Mars make doesn't allow you to override variables on the command line which means your suggestions don't work on Windows. Also you didn't mention the verbose flag. In any case, I don't think that having a Makefile interface means we should forget about the program's command line interface. You can tell developers to use the Makefile interface, but they still need to understand |
That's what I was worried about :-( Anyway, this makes things clearer. For now, we can't avoid scenarios (at least on Windows) where people need to run So, with respect to this specific PR, the intent is good (making it easy to run That's really the opposite of how a test suite ought to behave: by default, it ought to be as rigorous as possible, with the possibility to request only a subset of the tests as an optional extra. (Think how e.g. So, by that standard, unfortunately, this PR still won't wash, despite the improvements made since the first version of these changes. Ease of use shouldn't trump the requirement to give the test suite all the input it needs to carry out a rigorous test. That's even before we get to the question of whether it is reasonable to try to extract test settings from However, I will take a look at the Longer term, it would be good to discuss the sort of test cases you're running that require these manual invocations, because the fact that you have to do this suggests that test coverage might not be as robust as it ought to be. Maybe we can find a way to extend the range of stuff that is available via a simple Lastly, but importantly:
Can you describe the errors that you're encountering? I don't have a Windows build setup in place right now, so can't test directly. :-( |
|
I agree with your points. In order to prevent someone from accidentally removing the |
|
I think my particular windows box is failing because my compiler is a This would be fixed by using |
That was a nice touch. But it kind of emphasizes the point -- the default behaviour of |
What should it result in? |
|
Sorry for taking a while to get back to you on this.
The default behaviour should be to apply all test cases, rigorously. And that means that when invoking it, we need to provide all required information to allow those tests to be rigorous. When I was beginning the rewrite of And then, having thought it through, I realized: that could easily lead to false positives. For example, if I introduce a bug into how In other words, as long as This PR introduces the same chance for false-positive test passes. Probably the long-term best way to address this is to update |
|
Yes you have a valid point. However, the warning message that occurs when you omit this argument seems fine to me. The tradeoff is that now you don't have to type out that long command line option every time for the simple check that the "defaultCompiler" matches what you expect. |
|
If a warning is output, then it's easy for someone to tweak CI to remove the I do sympathize over the extra typing, but I wouldn't prioritize it over ensuring that the test suite is rigorous by default. |
I understand this concern but this isn't really a strong argument. If someone can remove this flag, they can just as easily remove the whole command. You're locking a door to a house that has no walls. Locking the door might make you "feel" more safe but that's all it is...the appearance of safety. This isn't a big deal though unless this is impeding other features...such as the one I've implemented in this PR. |
I presume a slightly higher level of scrutiny to removing a test-case from the test suite, than making a small and easy-to-miss-the-significance tweak to how CI invokes the test suite. Bottom line, I think there is consensus on the review side that we should not make this change to FWIW I would happily accept a patch to rename We could also implement a single-character variant of that flag to the same purpose. |
|
I don't see consensus yet. @CyberShadow's single comment assumed this change was the same as the previous PR. |
|
Fair enough; @CyberShadow have you changed your mind? FWIW I think the fundamental dodginess of parsing the app's help output to determine the input to a test case, is reason enough to reject this PR. |
|
And bear in mind -- if we implement a friendly single-char flag for the compiler, your burden is going to be limited to: ... which doesn't seem onerous. |
This was a valid argument with the original PR, but not this one. |
Oh come on, that won't wash. This PR means that, by default (warning or no), And warning or no, default or no, it shouldn't be doing that at all. |
There are 2 things being tested here
If Saying that using the "help text" to verify the "fallback" name isn't dodgy...it's already being done since the "help text" name must already match the |
And that's one of the problems.
There is a fundamental difference between
Self-consistency is nice, but things can be self-consistent and still wrong. |
I'm not arguing against this...I'm saying your "dodgy" comment wasn't a good argument. The legitimate argument you've given is "this PR makes compiler name verification optional instead of required". I think the time it saves typing out the extra argument is worth allowing it to be optional, especially since it prints a warning when you don't provide it. Is the PR justified? Maybe, I think it's a matter of opinion. Since I have to run this all the time I prefer to make my life easier, so you know what my opinion is. |
I do recognize that you have a usability issue here. But I think we should value robustness of the test suite over the difficulty of typing a few extra characters for each manual invocation. Perhaps we should discuss in more detail the variety of ways in which you need to run the script. It might be that we could find a way to provide greater test coverage just from a single invocation. It would be good to see what we can do in that respect, before considering weakening the robustness of the tests. |
This PR is not "sacrificing robustness". It is making one aspect of the test "optional". |
If one part of the test is optional rather than obligatory, then by definition the test suite is less robust. Come on, let's not go round in circles. We have our positions on this. The only constructive way to go forward in this discussion is to discuss the details of your usage so that we can examine whether we can find a way to simplify that for you. |
It's not optional when running the test via the Makefile, only optional for those running the test directly. And saying that this makes the "test suite" less robust is misleading...it just makes a part of the test optional. If you have a test suite with multiple parts that can be run independently, that doesn't make it "less robust" just because you can run one without the other. This is clearly a logical fallacy.
At this point I'm just corrrecting the false claims you are making. If you don't want me to correct you then don't make them. I've already summarized the case...but you continue to add invalid points to it so I feel obliged to correct them. |
There's no problem with test-suite options that allow the user to explicitly request, "Please run only a subset of the test suite." There is a problem when the default behaviour of the test suite is to run only a subset of its tests. Which is clearly the case here. |
|
The default is to use the Makefile...so no, that's not the case here. |
|
The default collection of tests should be the same whether invoked via the makefile or whether by running |
This statement is demonstrably false. The tests would only be the same if the developer mimicked the same command line arguments as the makefile, i.e. These 2 are certainly not the same thing. You would have to include all of the command line parameters for it to be the same (regardless of whether or not this PR is integrated) Please refrain from adding more false claims to this conversation, it's exhausting having to constantly correct them. You have brought up a valid point, namely, that this PR makes compiler name verification optional instead of required when running |
The collection of tests is the same. The particular configuration parameters are different. That is fundamentally different from running |
Demonstrably false again Not the same as The command line parameters need to be the same for both to be the same. |
... where the same set of tests get repeated, once with one compiler, the second time with another. |
Yup, you see why your statement was false now? |
|
No. I see that you are failing to see the distinction between test cases, versus test configuration. The bottom line of this is that you are asking that, by default, running That is not, I think, a recipe for good or reliable testing. Now, I've offered to discuss with you your use-cases to see if we can avoid the need for you to perform so many individual runs of So, with that in mind, I suggest that we stop this discussion now and allow @CyberShadow to respond on whether he's changed his mind about this being a worthwhile change to the test suite or not. |
|
My current plan is to wait for this PR to get merged until I continue work on If I have to keep dealing with this kind of resistance for such simple changes, it's really not worth my time. |
|
Hi, Sorry to see disagreements and extended debates about such minor things again. @marler8997 The time spent debating this change could have been used hundred-fold to write a small wrapper script around @WebDrake / @joseph-wakeling-sociomantic Consider whether debating this has been the best use of your time. There will inevitably be disagreements (boiling down to subjective differences of opinion) among contributors in any sufficiently-large project. Ultimately we want to maximize the utility function of our time (how effectively spending it advances our ultimate goals), whether that's contributing to a software project we like or otherwise improving our life and the world around us. Please consider how the time spent on this issue ranks on your utility functions. Does the negative impact of the worst-case scenario (the command line syntax of the rdmd test suite changed in a way that doesn't align with your vision) outweigh the cost of this debate? I am going to close this PR. Not because I agree with one side or the other - both sides have presented good arguments - but due to the disproportional difference between the importance of this change and decision, and the time needed to resolve it. As a matter of policy I would like to do the same with similar future PRs and debates, because it really is not a good use of anyone's resources. Thank you for your consideration. |
|
Any work that I've done with |
I don't regret merging the good contributions, and thanks for those. I do kind of regret merging #335, because what I said above applied to it as well.
Unlike this PR and #335, #292 is actually meaningful and worth spending time on, but it is your decision to make. I hope you'll understand that we can't afford to be held hostage either. |
Well feel free to revert it, I won't be spending my time with
Yeah I understand. It just comes down to people, I've tried to work with @WebDrake but its just not working, everyone's time will be better spent if I work on other things. Good luck, I hope someone will pick up #292 for D's sake...rdmd's performance is really bad so it's definitely worthwhile. |
No description provided.