-
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
Nested non empty list generation fail #581
Comments
Yeah, I know that a fix for part of #568 was merged to master. I'd need to study this further to see if it handles your case or not. Incidentally, there are snapshots published when commits are pushed to master. If you're using sbt, you can use them with the the following snippet: resolvers +=
"Sonatype OSS Snapshots" at
"https://oss.sonatype.org/content/repositories/snapshots" Then this is the sha version that contains the merge of #569: libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.2-e3883f6-SNAPSHOT" % "test" Feel free to give it a try and let us know. |
As noted this looks like a duplicate of #568 to me. In 1.14.2, Gen.posNum[Int] will fail to return a value sometimes, basically due to filtering out zeros. nonEmptyListOf, listOfN, etc all fail if the passed generator fails just once. This does seem to work though given the sha version by @ashawley:
|
I can also confirm we hit this issue, using the snapshot fixes the regression |
I hit the same issue. Thanks everybody! |
Is it possible to make a new release with this fix in there considering this was a pretty serious regression? |
Yes, it does seem worth releasing, and verifying that the fix doesn't have any regressions. I'm going to try and cherry-pick the change to the 1.14 branch. It will probably be a little while until 1.15 is ready. |
Does this mean there will be a 1.14b release (or something like this?) |
Current version is 1.14.2. It will be 1.14.3. |
Ah right, awesome thanks! |
@ashawley Sorry to bug you but is there an ETA for this? Unfortunately we are hitting coursier/coursier#1149 which means the scalacheck snapshot isn't entirely working for us. I can also try and set up a PR if that would speed up the process. |
I’m happy to do the work of making the release if someone can point me to the appropriate branch/commit. I have the appropriate access to do so. |
@djspiewak This is the PR/commit #569 . @ashawley said earlier that the safest option would be to cherry pick the above commit in the 1.14.x branch and release 1.14.3 (see #581 (comment)) |
Sorry for the delay. I'm just getting back from a trip, and trying to catch up on things. Thanks for offering to help with publishing, Daniel. I will likely use it. I'm going to work on #587 and when that's done I'll work on preparing the 1.14.3 release as Matthew described. |
Alrighty, I'll see about helping out a bit later today |
We can continue the discussion of 1.14.3 in #591 |
closing because it's a duplicate of #568 (and they are both fixed, though the fix isn't released yet) |
Some changes in 1.14.1 and 1.14.2 make the following test to fail during value generation. With the version 1.14.0, it passes.
This makes it impossible to use generators with nested collections.
Output
I believe the change that results in the issue was introduced here.
https://github.com/typelevel/scalacheck/blob/1.14.x/src/main/scala/org/scalacheck/Gen.scala#L866
Thank you.
PS. this looks related #568
PSS. seems like it is already being fixed in master.
The text was updated successfully, but these errors were encountered: