Skip to content
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

ScalaCheck 1.13.0 #942

Closed
wants to merge 1 commit into from
Closed

Conversation

adelbertc
Copy link
Contributor

Proposed fix for #810

This currently compiles, but does not run! When I try running it I get:

[error] Could not run test cats.tests.RegressionTests: java.lang.IncompatibleClassChangeError: Implementing class
[info] DeferredAbortedSuite:
[info] Exception encountered when attempting to run a suite with class name: org.scalatest.DeferredAbortedSuite *** ABORTED *** (0 milliseconds)
[info]   java.lang.IncompatibleClassChangeError: Implementing class

many many times. I thought it might be Discipline so I cloned Discipline, bumped ScalaCheck to 1.13.0, did a publishLocal, and bumped the Cats Discipline version. Still same error. Leaving here for comments/if anyone else has suggestions/wants to give it a shot.

@ceedubs
Copy link
Contributor

ceedubs commented Mar 21, 2016

I think you will also need a version of scalatest built against scalacheck 1.13

@ceedubs
Copy link
Contributor

ceedubs commented Mar 21, 2016

See also: scalatest/scalatest#837

@adelbertc
Copy link
Contributor Author

@ceedubs
Copy link
Contributor

ceedubs commented Mar 25, 2016

Update: @adelbertc has this working with locally published versions of Discipline and Algebra. It even seems to have caught a law-breaking instance! We should be able to move forward with this once there's a stable scalatest release.

Or perhaps we should update to the SNAP (stable snapshot) now and just make sure we wait until there's a stable version before the next cats release? That's actually sounding better to me considering builds are almost all failing.

Edit: I wasn’t thinking about the fact that that needs to happen in both algebra and discipline too. That probably complicates matters a bit.

@ceedubs
Copy link
Contributor

ceedubs commented May 9, 2016

To my understanding, typelevel/scalacheck#218 is a deal-breaker for upgrading to scalacheck 1.13.

Here is my understanding of the situation:

The Cogen support in scalacheck 1.13 is forced to call Option.get because of the fact that scalacheck generators return Option[A] instead of A. This can result in None.get exceptions when using Cogen along with generators that use suchThat/filter. This becomes quite problematic, because many common generators (such as choose, frequency and oneOf) in scalacheck use suchThat.

My understanding is based off of things that @xuwei-k and @non have said. It might not be entirely accurate.

@non
Copy link
Contributor

non commented May 10, 2016

@ceedubs that's correct although it's a bit more complicated. Even if you remove almost all use of suchThat / filter you still get the failure. I think it has to do with the fact that shrinking can produce invalid Gen instances which will always fail. I'm hoping to get some time this week/weekend to test a proposed fix.

@rossabaker
Copy link
Member

Specs2 users: a downgrade to specs2-3.7 gets past the linker errors. That is the latest version based on scalacheck-1.12.x.

@ceedubs
Copy link
Contributor

ceedubs commented Sep 5, 2016

@adelbertc @non should this be closed in favor of #1345 ?

@non
Copy link
Contributor

non commented Sep 5, 2016

Yes I think so.

@non non closed this Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants