optics-dev / optics-dev/Monocle
IncompatibleClassChangeError
Open
@yilinwei is already working on this.
Since Jan 25, 2024.
more info
- Dominant language
- Scala
- Stars
- 1.7k
- Forks
- 207
- Avg merge
- 7h 59m
- Merged PRs (30d)
- 5
Description
scalaJSLinkerConfig ~= {
_.withESFeatures(_.withESVersion(ESVersion.ES2020))
}
ThisBuild / scalaVersion := "2.13.11"
"dev.optics" %%% "monocle-core" % "3.2.0",
"dev.optics" %%% "monocle-macro" % "3.2.0"
i'm running this scalatest scala.js test from intellij:
case class Chat(history:List[String])
chat.focus(_.history).replace(Nil)
It doesn't like to run the focus(_.history):
An exception or error caused a run to abort. This may have been caused by a problematic custom reporter.
java.lang.IncompatibleClassChangeError: class com.my.FooBarSpec$$anon$1 can not implement monocle.PLens, because it is not an interface (monocle.PLens is in unnamed module of loader 'app')
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3373)
at java.base/java.lang.Class.getConstructor0(Class.java:3578)
at java.base/java.lang.Class.getConstructor(Class.java:2271)
at org.scalatest.tools.SuiteDiscoveryHelper$.isAccessibleSuite(SuiteDiscoveryHelper.scala:180)
at org.scalatest.tools.SuiteDiscoveryHelper$.isAccessibleSuite(SuiteDiscoveryHelper.scala:190)
at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$6(Runner.scala:1180)
at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$6$adapted(Runner.scala:1177)
.....
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.