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

Reverted binary incompatible changes to generated parallel syntax #2702

Merged
merged 2 commits into from
Jan 22, 2019
Merged

Reverted binary incompatible changes to generated parallel syntax #2702

merged 2 commits into from
Jan 22, 2019

Conversation

barambani
Copy link
Contributor

In relation to this PR #2692, I realise only now that the same problem I had with the Semigroupal syntax is also affecting the boilerplate parallel syntax. I reverted the change to the generator and added a MimaExceptions test.

@codecov-io
Copy link

codecov-io commented Jan 18, 2019

Codecov Report

Merging #2702 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2702      +/-   ##
==========================================
- Coverage   95.13%   95.11%   -0.02%     
==========================================
  Files         365      365              
  Lines        6780     6781       +1     
  Branches      294      294              
==========================================
  Hits         6450     6450              
- Misses        330      331       +1
Impacted Files Coverage Δ
...patTest/src/main/scala/catsBC/MimaExceptions.scala 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eedb47c...69356ef. Read the comment docs.

kailuowang
kailuowang previously approved these changes Jan 18, 2019
Copy link
Contributor

@kailuowang kailuowang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@kailuowang kailuowang requested a review from LukaJCB January 18, 2019 03:15
@kailuowang kailuowang added this to the 1.6 milestone Jan 18, 2019
@kailuowang
Copy link
Contributor

Just so that I know that the MimaException test still works, the test you added failed with the private val change you made?

@barambani
Copy link
Contributor Author

The problematic bit is the syntax ops extending AnyVal. With

private[syntax] final class Tuple${arity}ParallelOps[M[_], ${`A..N`}](private val $tupleTpe)

the test result is

[info] MimaExceptionsTest:
[info] - is binary compatible
[info] Run completed in 960 milliseconds.
[info] Total number of tests run: 1
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 1, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
[success] Total time: 99 s

but changing it to

private[syntax] final class Tuple${arity}ParallelOps[M[_], ${`A..N`}](private val $tupleTpe) extends AnyVal

the test fails

[info] MimaExceptionsTest:
[info] catsBC.MimaExceptionsTest *** ABORTED ***
[info]   java.lang.NoSuchMethodError: cats.implicits$.catsSyntaxTuple3Parallel(Lscala/Tuple3;)Lcats/syntax/Tuple3ParallelOps;
[info]   at catsBC.MimaExceptions$.isBinaryCompatible(MimaExceptions.scala:30)
[info]   at catsBC.MimaExceptionsTest$$anonfun$1.apply(MimaExceptionsTest.scala:7)
[info]   at catsBC.MimaExceptionsTest$$anonfun$1.apply(MimaExceptionsTest.scala:7)
[info]   at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
[info]   at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
[info]   at org.scalatest.Transformer.apply(Transformer.scala:22)
[info]   at org.scalatest.Transformer.apply(Transformer.scala:20)
[info]   at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:186)
[info]   at org.scalatest.TestSuite$class.withFixture(TestSuite.scala:196)
[info]   at org.scalatest.FunSuite.withFixture(FunSuite.scala:1560)
[info]   ...

@kailuowang
Copy link
Contributor

Ah didn't realize that it wasnt value class and you changed that. I think we should still make the call private.

@barambani
Copy link
Contributor Author

Makes sense. I will do it 👍

@barambani
Copy link
Contributor Author

could the 2.13's travis job be restarted ?

CommutativeGroup[BigDecimal].commutativeGroup.associative *** FAILED ***
  GeneratorDrivenPropertyCheckFailedException was thrown during property evaluation.
   (Discipline.scala:14)
    Falsified after 4 successful property evaluations.
    Location: (Discipline.scala:14)
    Occurred when passed generated values (
      arg0 = 7.11522893613707E+63,
      arg1 = -1.6701798045816614E+43,
      arg2 = -1.1744341123863878E+45
    )
    Label of failing property:
      Expected: 7.115228936137069998808864089567796E+63
      Received: 7.115228936137069998808864089567795E+63

Copy link
Member

@LukaJCB LukaJCB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much @barambani!

@barambani
Copy link
Contributor Author

👍 , sorry it took a double PR to finish this.

@kailuowang kailuowang merged commit 9e617d8 into typelevel:master Jan 22, 2019
@kailuowang kailuowang added the bug label Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants