com-lihaoyi / unroll

23 stars 0 forks source link

`class _Object does not have a member method <init>` error only in upack Scala.3.3.x/Scala-Native #6

Closed lihaoyi closed 6 months ago

lihaoyi commented 6 months ago

Using the latest head version of Unroll in uPickle (https://github.com/com-lihaoyi/upickle/pull/555/files) gives me the error below. This only seems to happen in Scala-3.3.0/Scala-Native (3.3.1 gives same error)

[#0] [info] compiling 20 Scala sources to /Users/lihaoyi/Github/upickle/out/ujson/native/2.13.12/compile.dest/classes ...
[#3] 
[#3]   unhandled exception while running scalanative-genNIR on /Users/lihaoyi/Github/upickle/out/ujson/native/3.3.1/generatedSources.dest/BaseByteRenderer.scala
[#3] 
[#3]   An unhandled exception was thrown in the compiler.
[#3]   Please file a crash report here:
[#3]   https://github.com/lampepfl/dotty/issues/new/choose
[#3] 
[#3]      while compiling: <no file>
[#3]         during phase: <no phase>
[#3]                 mode: Mode(ImplicitsEnabled)
[#3]      library version: version 2.13.10
[#3]     compiler version: version 3.3.1
[#3]             settings: -Werror true -Xplugin List(/Users/lihaoyi/.ivy2/local/com.lihaoyi/unroll-plugin_3/0.1.7-1-be8402-DIRTYd927a002/jars/unroll-plugin_3.jar, /Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-native/nscplugin_3.3.1/0.4.14/nscplugin_3.3.1-0.4.14.jar) -bootclasspath /Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.10/scala-library-2.13.10.jar -classpath /Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_3/3.3.1/scala3-library_3-3.3.1.jar:/Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-native/nativelib_native0.4_3/0.4.14/nativelib_native0.4_3-0.4.14.jar:/Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-native/javalib_native0.4_3/0.4.14/javalib_native0.4_3-0.4.14.jar:/Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-native/auxlib_native0.4_3/0.4.14/auxlib_native0.4_3-0.4.14.jar:/Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-native/scala3lib_native0.4_3/0.4.14/scala3lib_native0.4_3-0.4.14.jar:/Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/geny_native0.4_3/1.0.0/geny_native0.4_3-1.0.0.jar:/Users/lihaoyi/.ivy2/local/com.lihaoyi/unroll-annotation_3/0.1.7-1-be8402-DIRTYd927a002/jars/unroll-annotation_3.jar:/Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-native/posixlib_native0.4_3/0.4.14/posixlib_native0.4_3-0.4.14.jar:/Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-native/windowslib_native0.4_3/0.4.14/windowslib_native0.4_3-0.4.14.jar:/Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-native/clib_native0.4_3/0.4.14/clib_native0.4_3-0.4.14.jar:/Users/lihaoyi/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-native/scalalib_native0.4_2.13/0.4.14/scalalib_native0.4_2.13-0.4.14.jar:/Users/lihaoyi/Github/upickle/upickle/core/compile-resources:/Users/lihaoyi/Github/upickle/out/upickle/core/native/3.3.1/compile.dest/classes:/Users/lihaoyi/Github/upickle/ujson/compile-resources:/Users/lihaoyi/Github/upickle/out/ujson/native/3.3.1/compile.dest/classes -d /Users/lihaoyi/Github/upickle/out/ujson/native/3.3.1/compile.dest/classes -deprecation true -encoding utf8 -feature true
[#3] 
[#3]                 tree: EmptyTree
[#3]        tree position: :<unknown>
[#3]            tree type: <notype>
[#3]               symbol: val <none>
[#3]            call site: package <root> in module class <root>
[#3] 
[#3]   == Source file context for tree position ==
[#3] 
[#3] 
[#5] [error] ## Exception when compiling 20 sources to /Users/lihaoyi/Github/upickle/out/ujson/native/3.3.1/compile.dest/classes
[#5] [error] dotty.tools.dotc.core.TypeError$$anon$1: class _Object does not have a member method <init>
[#5] [error] 
[#5] [error]            
[#5] [3588/3781] ujson.native[3.3.1].compile failed
lihaoyi commented 6 months ago

Seems to have gotten fixed with https://github.com/com-lihaoyi/unroll/issues/5