-
Notifications
You must be signed in to change notification settings - Fork 35
Removing Fuzz.andThen #183
base: master
Are you sure you want to change the base?
Conversation
It allows user to case on it using the `Ok` and `Err` instructors, which would make their tests dependant on the `Fuzzer` implementation. elm-package doesn't consider this a major change, but it is one to users who were doing this type of pattern matching.
Resolves #161.
It's sole purpose now is containing the hidden internal type of the Fuzzer, like before.
From my perspective this is ready to merge but of course happy to make adjustments! |
Love it! Looks good to me! |
src/Test/Runner.elm
Outdated
@@ -373,18 +374,15 @@ type Shrinkable a | |||
{-| Given a fuzzer, return a random generator to produce a value and a | |||
Shrinkable. The value is what a fuzz test would have received as input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment saying why there is a Result
in the return type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Something like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, much better.
This looks good to me. I'm sorting through upcoming changes and don't want breaking API on master right this moment though. |
I'm cool with saying "this is ready to merge, but let's not push the button
yet."
…On Sun, Jul 9, 2017, 12:45 PM Max Goldstein ***@***.***> wrote:
This looks good to me. I'm sorting through upcoming changes and don't want
breaking API on master right this moment though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#183 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABCxwH47tNyyGyct8Qh433GMbpYsYXgWks5sMQOtgaJpZM4OLTPO>
.
|
Tagging major-release-blocker so we don't forget about this. Merge conflicts suck but I don't think it's worth resolving them now is we're still not ready to merge. Merging onto a |
Resolves #160 and #161.
This removes Fuzz.andThen making it a breaking change.
It also fixes two points @mgold alluded to before:
Fuzzer
type is wrapped in a type instead of being a type alias to prevent people from casing on it. This is not a major change according toelm-package
but it is to a user who for some reason is casing on the fuzzer now, so it makes sense to me to bundle the change in here.Fuzz.Internal
over toFuzz
.Some things I think should be wrapped up before merging this:
andThen
for building recusive fuzzers orMsg
fuzzers presentable, either by publishing them in a library or linking to them as a sort of cookbook.Test.Runner.fuzz
so it doesn't need aDebug.crash
anymore (the last in the codebase).