-
Notifications
You must be signed in to change notification settings - Fork 407
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
Comprehensive review of Test.Parameters. #522
Conversation
This commit does several things: 1. Ensures that overrideParameters applies *after* cmdline 2. Fixes initialSeed to work with Test.Parameters 3. Adds parameter to disable Shrink-based shrinking 4. Fixes numerous bugs around cmdline parsing 5. Adds tests to ensure Test.Parameters is working 6. Internal clean up and refactoring This commit includes the work from typelevel#463 and subsumes it.
I tagged @ashawley on the review here but I'd appreciate reviews from others, especially folks who have a good handle on the SBT testing hooks. |
💯 for a That said, I'm just curious if it's intended to be the same/similar to my #444 PR? The only reason I ask is that it appears (but I'm not 100% sure) to disable shrinking for |
Yes, they would disable shrinking for properties run with These features for users to disable shrinking at various levels do not preclude additional improvements to shrinking, later. Those will be major changes to the library that we'll be able to entertain after this patch release. |
@charleso Yes, this would disable all shrinking. It's possible that we could differentiate |
@charleso The meta-point is that the future of "correct" shrinking in ScalaCheck is to use a totally different strategy. That's partially why I want to characterize the |
@ashawley I'm assuming that you meant the parameter name changes are binary-compatible but are source-incompatible, right? I'll go ahead and change those parameter names back -- I don't think there's a strong reason for me to have changed them. I'm going to think more about your other comment. |
Sorry for the confusion. I corrected the comment. I predict there aren't many cases where users leveraged the named arguments for these methods. You managed to be so hygienic about avoiding breaking changes here, I figured I'd raise it. |
@ashawley I didn't do exactly what you suggested but I did clean up the naming and also added methods to |
Yeah, this is better: override def overrideParameters(prms: Test.Parameters) = {
prms.disableLegacyShrinking
} |
@non Thanks for the reply/clarification, I appreciate it.
Oh for sure. That's not to mention anyone who might have locally overridden an Arbitrary implicit (instead of using forAll with I guess I was taking a somewhat optimistic view that normal usage with the ScalaCheck provided
Cool. I guess I still wasn't 100% sure people didn't think I was crazy/wrong about that point. :) |
This commit does several things:
This commit includes the work from #463 and subsumes it. I believe it also fixes #360, #289, and #221.
Given how broken parameters are I think this change is a strict improvement. Without making bigger breaking changes I think it will be hard to "rationalize" how parameters work in ScalaCheck, but I think this gets us much closer to having a story that makes sense.
Using the
-disableLegacyShrinking
argument to disable shrinking, this PR can partially mitigate #443, #432, #347, #338, #317, and #129.