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

Binary-breaking changes from 4.12.8 -> 4.12.9? #986

Closed
armanbilge opened this issue Sep 5, 2021 · 4 comments
Closed

Binary-breaking changes from 4.12.8 -> 4.12.9? #986

armanbilge opened this issue Sep 5, 2021 · 4 comments

Comments

@armanbilge
Copy link
Contributor

I'm using with discipline-specs2 1.1.6.

[error] cannot create an instance for class cheshire.TreeSpec
[error]   caused by java.lang.NoSuchMethodError: 'org.specs2.specification.dsl.mutable.ExampleDsl1$BlockExample org.specs2.mutable.SpecificationLike.blockExample(java.lang.String)'
[error]   java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error]   java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
[error]   java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error]   java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[error]   java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
[error]   org.specs2.reflect.Classes.$anonfun$createInstanceForConstructor$2(Classes.scala:77)
[error]   org.specs2.reflect.Classes.newInstance(Classes.scala:100)
[error]   org.specs2.reflect.Classes.createInstanceForConstructor(Classes.scala:77)
[error]   org.specs2.reflect.Classes.findInstance(Classes.scala:58)
[error]   org.specs2.reflect.Classes.createInstanceFromClass(Classes.scala:38)
[error]   org.specs2.reflect.Classes.createInstanceFromClass$(Classes.scala:37)
[error]   org.specs2.reflect.Classes$.createInstanceFromClass(Classes.scala:126)
[error]   org.specs2.reflect.Classes.$anonfun$createInstance$1(Classes.scala:31)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:383)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.IntoPolyLower2$$anon$3.$anonfun$apply$8(IntoPoly.scala:60)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:380)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.Interpret.$anonfun$interpretLoop$11(Interpret.scala:198)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:380)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.CollectedUnions.$anonfun$othersEff$1(Unions.scala:97)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:383)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:348)
[error]   org.specs2.control.eff.CollectedUnions.$anonfun$continuation$1(Unions.scala:84)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:380)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.Interpret$$anon$1.$anonfun$onEffect$1(Interpret.scala:53)
[error]   org.specs2.fp.EitherOps$.bimap$extension(EitherSyntax.scala:82)
[error]   org.specs2.control.eff.Interpret$$anon$1.onEffect(Interpret.scala:53)
[error]   org.specs2.control.eff.Interpret$$anon$1.onApplicativeEffect(Interpret.scala:61)
[error]   org.specs2.control.eff.Interpret$$anon$1.onApplicativeEffect(Interpret.scala:45)
[error]   org.specs2.control.eff.Interpret.go$1(Interpret.scala:200)
[error]   org.specs2.control.eff.Interpret.interpretLoop(Interpret.scala:207)
[error]   org.specs2.control.eff.Interpret.interpretLoop$(Interpret.scala:142)
[error]   org.specs2.control.eff.Interpret$.interpretLoop(Interpret.scala:635)
[error]   org.specs2.control.eff.Interpret.interpret(Interpret.scala:71)
[error]   org.specs2.control.eff.Interpret.interpret$(Interpret.scala:44)
[error]   org.specs2.control.eff.Interpret$.interpret(Interpret.scala:635)
[error]   org.specs2.control.eff.Interpret.interpret1(Interpret.scala:78)
[error]   org.specs2.control.eff.Interpret.interpret1$(Interpret.scala:77)
[error]   org.specs2.control.eff.Interpret$.interpret1(Interpret.scala:635)
[error]   org.specs2.control.eff.ErrorInterpretation.runError(ErrorEffect.scala:87)
[error]   org.specs2.control.eff.ErrorInterpretation.runError$(ErrorEffect.scala:68)
[error]   org.specs2.control.eff.ErrorEffect$.runError(ErrorEffect.scala:187)
[error]   org.specs2.control.eff.syntax.error$ErrorEffectOps.runError(error.scala:14)
[error]   org.specs2.control.ExecuteActions.executeActionFuture(ExecuteActions.scala:36)
[error]   org.specs2.control.ExecuteActions.executeActionFuture$(ExecuteActions.scala:31)
[error]   org.specs2.control.ExecuteActions$.executeActionFuture(ExecuteActions.scala:93)
[error]   org.specs2.runner.SbtTask.executeFuture(SbtRunner.scala:142)
[error]   org.specs2.runner.SbtTask.execute(SbtRunner.scala:162)
[error]   sbt.TestRunner.runTest$1(TestFramework.scala:140)
[error]   sbt.TestRunner.run(TestFramework.scala:155)
[error]   sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:318)
[error]   sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:278)
[error]   sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:318)
[error]   sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:318)
[error]   sbt.TestFunction.apply(TestFramework.scala:330)
[error]   sbt.Tests$.$anonfun$toTask$1(Tests.scala:435)
[error]   sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:46)
[error]   sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error]   sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error]   sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]   sbt.Execute.work(Execute.scala:291)
[error]   sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error]   sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]   sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error]   java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]   java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]   java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]   java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[error]   java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[error]   java.base/java.lang.Thread.run(Thread.java:831)
[error] 
[error] STACKTRACE
[error]   org.typelevel.discipline.specs2.mutable.Discipline.checkAll$$anonfun$1(Discipline.scala:15)
[error]   org.specs2.specification.core.Fragments$.$anonfun$foreach$1(Fragments.scala:144)
[error]   scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:169)
[error]   scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:165)
[error]   scala.collection.immutable.List.foldLeft(List.scala:79)
[error]   org.specs2.specification.core.Fragments$.foreach(Fragments.scala:144)
[error]   org.typelevel.discipline.specs2.mutable.Discipline.checkAll(Discipline.scala:16)
[error]   org.typelevel.discipline.specs2.mutable.Discipline.checkAll$(Discipline.scala:9)
[error]   cheshire.TreeSpec.checkAll(TreeSpec.scala:39)
[error]   cheshire.TreeSpec.<init>(TreeSpec.scala:101)
[error]   java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error]   java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
[error]   java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error]   java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[error]   java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
[error]   org.specs2.reflect.Classes.$anonfun$createInstanceForConstructor$2(Classes.scala:77)
[error]   org.specs2.reflect.Classes.newInstance(Classes.scala:100)
[error]   org.specs2.reflect.Classes.createInstanceForConstructor(Classes.scala:77)
[error]   org.specs2.reflect.Classes.findInstance(Classes.scala:58)
[error]   org.specs2.reflect.Classes.createInstanceFromClass(Classes.scala:38)
[error]   org.specs2.reflect.Classes.createInstanceFromClass$(Classes.scala:37)
[error]   org.specs2.reflect.Classes$.createInstanceFromClass(Classes.scala:126)
[error]   org.specs2.reflect.Classes.$anonfun$createInstance$1(Classes.scala:31)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:383)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.IntoPolyLower2$$anon$3.$anonfun$apply$8(IntoPoly.scala:60)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:380)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.Interpret.$anonfun$interpretLoop$11(Interpret.scala:198)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:380)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.CollectedUnions.$anonfun$othersEff$1(Unions.scala:97)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:383)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:348)
[error]   org.specs2.control.eff.CollectedUnions.$anonfun$continuation$1(Unions.scala:84)
[error]   org.specs2.control.eff.Arrs.go$1(Eff.scala:380)
[error]   org.specs2.control.eff.Arrs.apply(Eff.scala:399)
[error]   org.specs2.control.eff.Interpret$$anon$1.$anonfun$onEffect$1(Interpret.scala:53)
[error]   org.specs2.fp.EitherOps$.bimap$extension(EitherSyntax.scala:82)
[error]   org.specs2.control.eff.Interpret$$anon$1.onEffect(Interpret.scala:53)
[error]   org.specs2.control.eff.Interpret$$anon$1.onApplicativeEffect(Interpret.scala:61)
[error]   org.specs2.control.eff.Interpret$$anon$1.onApplicativeEffect(Interpret.scala:45)
[error]   org.specs2.control.eff.Interpret.go$1(Interpret.scala:200)
[error]   org.specs2.control.eff.Interpret.interpretLoop(Interpret.scala:207)
[error]   org.specs2.control.eff.Interpret.interpretLoop$(Interpret.scala:142)
[error]   org.specs2.control.eff.Interpret$.interpretLoop(Interpret.scala:635)
[error]   org.specs2.control.eff.Interpret.interpret(Interpret.scala:71)
[error]   org.specs2.control.eff.Interpret.interpret$(Interpret.scala:44)
[error]   org.specs2.control.eff.Interpret$.interpret(Interpret.scala:635)
[error]   org.specs2.control.eff.Interpret.interpret1(Interpret.scala:78)
[error]   org.specs2.control.eff.Interpret.interpret1$(Interpret.scala:77)
[error]   org.specs2.control.eff.Interpret$.interpret1(Interpret.scala:635)
[error]   org.specs2.control.eff.ErrorInterpretation.runError(ErrorEffect.scala:87)
[error]   org.specs2.control.eff.ErrorInterpretation.runError$(ErrorEffect.scala:68)
[error]   org.specs2.control.eff.ErrorEffect$.runError(ErrorEffect.scala:187)
[error]   org.specs2.control.eff.syntax.error$ErrorEffectOps.runError(error.scala:14)
[error]   org.specs2.control.ExecuteActions.executeActionFuture(ExecuteActions.scala:36)
[error]   org.specs2.control.ExecuteActions.executeActionFuture$(ExecuteActions.scala:31)
[error]   org.specs2.control.ExecuteActions$.executeActionFuture(ExecuteActions.scala:93)
[error]   org.specs2.runner.SbtTask.executeFuture(SbtRunner.scala:142)
[error]   org.specs2.runner.SbtTask.execute(SbtRunner.scala:162)
[error]   sbt.TestRunner.runTest$1(TestFramework.scala:140)
[error]   sbt.TestRunner.run(TestFramework.scala:155)
[error]   sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:318)
[error]   sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:278)
[error]   sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:318)
[error]   sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:318)
[error]   sbt.TestFunction.apply(TestFramework.scala:330)
[error]   sbt.Tests$.$anonfun$toTask$1(Tests.scala:435)
[error]   sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:46)
[error]   sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error]   sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error]   sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]   sbt.Execute.work(Execute.scala:291)
[error]   sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error]   sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]   sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error]   java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]   java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]   java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]   java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[error]   java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[error]   java.base/java.lang.Thread.run(Thread.java:831)
[error] 
[error]   CAUSED BY java.lang.NoSuchMethodError: 'org.specs2.specification.dsl.mutable.ExampleDsl1$BlockExample org.specs2.mutable.SpecificationLike.blockExample(java.lang.String)'
@etorreborre
Copy link
Owner

Thanks for reporting this. Please use specs2-4.12.10 which fixes this issue (I tested it with https://github.com/armanbilge/cheshire)

@armanbilge
Copy link
Contributor Author

armanbilge commented Sep 6, 2021

Wow, thanks for testing downstream! It indeed works. Thank you! Out of curiosity, did MiMa miss this somehow?

Btw looking forward to switching to specs2 v5, currently I'm blocked by typelevel/discipline-specs2#192 (for this project) and typelevel/cats-effect-testing#190 (for my other projects).

@etorreborre
Copy link
Owner

Out of curiosity, did MiMa miss this somehow?

Good question. I've never used MiMa before and this very bug got me thinking that I should use it. Unfortunately something doesn't work for both Scala 2 (with a fix on the way apparently) and Scala 3.

About the upgrade of discipline-specs2 and cats-effect-testing that's something I can work on. The first step for cats-effect-testing was to get a new executor for ScalaJS and it has just arrived. I will integrate it and see how well it works.

@armanbilge
Copy link
Contributor Author

I've never used MiMa before and this very bug got me thinking that I should use it. Unfortunately something doesn't work for both Scala 2 (with a fix on the way apparently) and Scala 3.

Ouch, that scala 3 compilation issue is especially a puzzler.

The first step for cats-effect-testing was to get a new executor for ScalaJS and it has just arrived. I will integrate it and see how well it works.

Yes, that was us! Glad to see someone is excited about it 😁 please do!

About the upgrade of discipline-specs2 and cats-effect-testing that's something I can work on.

Wow, thanks, that would be much appreciated! I looked into this a bit and I think there's quite a few new features in specs2 v5 that at least cats-effect-testing warrants a bit of rewriting. discipline-specs2 should be more straightforward I think.

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

No branches or pull requests

2 participants