Open pmeheut opened 1 year ago
If needed, I could create a repository with moke versions of the proprietary code but the problem and stack is exactly the same as https://github.com/lampepfl/dotty/issues/16439
That would be really helpful yes!
The previous error from #16439 was fixed. Can you verify that the error is still present when compiling with the latest nightly?
I just tried with Scala 3.3.2-RC1-bin-20230705-13f877b-NIGHTLY Same error:
`` unhandled exception while running MegaPhase{lambdaLift, elimStaticThis, countOuterAccesses} on /Users/pascal/Qarmin/gitlab/qarmin/development/WebReport/webPage/src/main/scala/io/softhedge/webreport/pages/TimePeriod.scala
An unhandled exception was thrown in the compiler. Please file a crash report here: https://github.com/lampepfl/dotty/issues/new/choose
while compiling: /Users/pascal/Qarmin/gitlab/qarmin/development/WebReport/webPage/src/main/scala/io/softhedge/webreport/pages/TimePeriod.scala
during phase: MegaPhase{lambdaLift, elimStaticThis, countOuterAccesses}
mode: Mode(ImplicitsEnabled)
library version: version 2.13.10
compiler version: version 3.3.2-RC1-bin-20230705-13f877b-NIGHTLY-git-13f877b
settings: -bootclasspath /Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_3/3.3.2-RC1-bin-20230705-13f877b-NIGHTLY/scala3-library_3-3.3.2-RC1-bin-20230705-13f877b-NIGHTLY.jar:/Users/pascal/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/pascal/Qarmin/gitlab/qarmin/development/WebReport/webPage/target/scala-3.3.2-RC1-bin-20230705-13f877b-NIGHTLY/classes:/Users/pascal/Qarmin/gitlab/qarmin/development/WebReport/core/js/target/scala-3.3.2-RC1-bin-20230705-13f877b-NIGHTLY/classes:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_sjs1_3/3.3.2-RC1-bin-20230705-13f877b-NIGHTLY/scala3-library_sjs1_3-3.3.2-RC1-bin-20230705-13f877b-NIGHTLY.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-library_2.13/1.13.0/scalajs-library_2.13-1.13.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/ghostdogpr/caliban-client_3/2.0.1/caliban-client_3-2.0.1.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/webjars/npm/plotly.js-dist-min/2.12.1/plotly.js-dist-min-2.12.1.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-dom_sjs1_3/2.3.0/scalajs-dom_sjs1_3-2.3.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/scalatags_sjs1_3/0.12.0/scalatags_sjs1_3-0.12.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/dev/zio/zio_sjs1_3/2.0.5/zio_sjs1_3-2.0.5.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/client3/core_sjs1_3/3.8.3/core_sjs1_3-3.8.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/client3/circe_sjs1_3/3.8.3/circe_sjs1_3-3.8.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/client3/zio_sjs1_3/3.8.3/zio_sjs1_3-3.8.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/raquo/laminar_sjs1_3/0.14.5/laminar_sjs1_3-0.14.5.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/be/doeraene/web-components-ui5_sjs1_3/1.9.0/web-components-ui5_sjs1_3-1.9.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/openmole/scala-js-plotlyjs_sjs1_3/1.6.2/scala-js-plotlyjs_sjs1_3-1.6.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/raquo/waypoint_sjs1_3/6.0.0/waypoint_sjs1_3-6.0.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/ghostdogpr/caliban-client_sjs1_3/2.0.1/caliban-client_sjs1_3-2.0.1.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/cquiroz/scala-java-time_sjs1_3/2.4.0/scala-java-time_sjs1_3-2.4.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/pmeheut/nscala-java-time_sjs1_3/0.1.1/nscala-java-time_sjs1_3-0.1.1.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-generic_sjs1_3/0.14.3/circe-generic_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-parser_sjs1_3/0.14.3/circe-parser_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/laminext/core_sjs1_3/0.14.3/core_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/laminext/fetch_sjs1_3/0.14.3/fetch_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/laminext/fetch-circe_sjs1_3/0.14.3/fetch-circe_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/laminext/websocket_sjs1_3/0.14.3/websocket_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/laminext/websocket-circe_sjs1_3/0.14.3/websocket-circe_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/github/ghostdogpr/caliban-client-laminext_sjs1_3/2.0.1/caliban-client-laminext_sjs1_3-2.0.1.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-javalib/1.13.0/scalajs-javalib-1.13.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_3/3.1.3/scala3-library_3-3.1.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-parser_3/0.14.2/circe-parser_3-0.14.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/client3/core_3/3.7.2/core_3-3.7.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/client3/circe_3/3.7.2/circe_3-3.7.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/sourcecode_sjs1_3/0.3.0/sourcecode_sjs1_3-0.3.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/lihaoyi/geny_sjs1_3/1.0.0/geny_sjs1_3-1.0.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/dev/zio/zio-internal-macros_sjs1_3/2.0.5/zio-internal-macros_sjs1_3-2.0.5.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/dev/zio/zio-stacktracer_sjs1_3/2.0.5/zio-stacktracer_sjs1_3-2.0.5.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/dev/zio/izumi-reflect_sjs1_3/2.2.2/izumi-reflect_sjs1_3-2.2.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scala-js-macrotask-executor_sjs1_3/1.0.0/scala-js-macrotask-executor_sjs1_3-1.0.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-weakreferences_sjs1_2.13/1.0.0/scalajs-weakreferences_sjs1_2.13-1.0.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/model/core_sjs1_3/1.5.2/core_sjs1_3-1.5.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/shared/core_sjs1_3/1.3.10/core_sjs1_3-1.3.10.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/shared/ws_sjs1_3/1.3.10/ws_sjs1_3-1.3.10.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-java-securerandom_sjs1_2.13/1.0.0/scalajs-java-securerandom_sjs1_2.13-1.0.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/client3/json-common_sjs1_3/3.8.3/json-common_sjs1_3-3.8.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-core_sjs1_3/0.14.3/circe-core_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/dev/zio/zio-streams_sjs1_3/2.0.2/zio-streams_sjs1_3-2.0.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/shared/zio_sjs1_3/1.3.10/zio_sjs1_3-1.3.10.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/raquo/airstream_sjs1_3/15.0.0/airstream_sjs1_3-15.0.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/raquo/domtypes_sjs1_3/0.15.3/domtypes_sjs1_3-0.15.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/querki/querki-jsext_sjs1_2.13/0.10/querki-jsext_sjs1_2.13-0.10.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/be/doeraene/url-dsl_sjs1_3/0.6.0/url-dsl_sjs1_3-0.6.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/portable-scala/portable-scala-reflect_sjs1_2.13/1.1.2/portable-scala-reflect_sjs1_2.13-1.1.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/cquiroz/scala-java-locales_sjs1_3/1.4.0/scala-java-locales_sjs1_3-1.4.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-scalajs_sjs1_3/0.14.3/circe-scalajs_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/laminext/util_sjs1_3/0.14.3/util_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-jawn_3/0.14.2/circe-jawn_3-0.14.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-core_3/0.14.2/circe-core_3-0.14.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/model/core_3/1.5.0/core_3-1.5.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/shared/core_3/1.3.7/core_3-1.3.7.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/shared/ws_3/1.3.7/ws_3-1.3.7.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/softwaremill/sttp/client3/json-common_3/3.7.2/json-common_3-3.7.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/dev/zio/izumi-reflect-thirdparty-boopickle-shaded_sjs1_3/2.2.2/izumi-reflect-thirdparty-boopickle-shaded_sjs1_3-2.2.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-numbers_sjs1_3/0.14.3/circe-numbers_sjs1_3-0.14.3.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-core_sjs1_3/2.8.0/cats-core_sjs1_3-2.8.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/app/tulz/tuplez-full-light_sjs1_3/0.4.0/tuplez-full-light_sjs1_3-0.4.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/raquo/ew_sjs1_3/0.1.2/ew_sjs1_3-0.1.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/github/cquiroz/cldr-api_sjs1_3/3.1.0/cldr-api_sjs1_3-3.1.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/jawn-parser_3/1.3.2/jawn-parser_3-1.3.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/io/circe/circe-numbers_3/0.14.2/circe-numbers_3-0.14.2.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-core_3/2.7.0/cats-core_3-2.7.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-kernel_sjs1_3/2.8.0/cats-kernel_sjs1_3-2.8.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-kernel_3/2.7.0/cats-kernel_3-2.7.0.jar:/Users/pascal/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/typelevel/simulacrum-scalafix-annotations_3/0.5.4/simulacrum-scalafix-annotations_3-0.5.4.jar -d /Users/pascal/Qarmin/gitlab/qarmin/development/WebReport/webPage/target/scala-3.3.2-RC1-bin-20230705-13f877b-NIGHTLY/classes -scalajs true
tree: EmptyTree
tree position: :<unknown>
tree type: <notype>
symbol: val <none>
call site: package <root> in module class <root>
== Source file context for tree position ==
[error] ## Exception when compiling 7 sources to /Users/pascal/Qarmin/gitlab/qarmin/development/WebReport/webPage/target/scala-3.3.2-RC1-bin-20230705-13f877b-NIGHTLY/classes
[error] java.lang.AssertionError: assertion failed
[error] scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11)
[error] dotty.tools.dotc.core.Types$MethodType.
Ah, OK. That's actually does not look like the error in https://github.com/lampepfl/dotty/issues/16439. So, yes, a minimization would be really helpful!
There is an example here: git@github.com:pmeheut/scala_bug.git This is the smallest I could do reasonably.
sbt compile
works.
Uncomment ++ waypointCross.value
line 16 in build.sbt and sbt compile
fails with the error above.
I figured out the root cause of the issue: when waypoint
is added as a library, the transitive dependency com.raquo::airstream
was upgraded from 0.14.5
to 15.0.0
, this upgrade is not binary-compatible and in particular it removes the SwitchFutureStrategy
object which the compiler tries to access while computing the trait setters of com.raquo.laminar.api.L.Val
Upgrading libraries to the new airstream fixes the crash:
diff --git project/Dependencies.scala project/Dependencies.scala
index 210a43b..cd1d26c 100644
--- project/Dependencies.scala
+++ project/Dependencies.scala
@@ -2,7 +2,7 @@ import sbt._
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
object Dependencies {
- val calibanVersion = "2.0.1"
+ val calibanVersion = "2.2.1"
val sttpVersion = "3.8.3"
@@ -27,9 +27,9 @@ object Dependencies {
val scalaTagsVersion = "0.12.0"
val circeVersion = "0.14.3"
- val laminarVersion = "0.14.5"
- val laminextVersion = "0.14.3"
- val laminarUI5Version = "1.9.0"
+ val laminarVersion = "15.0.1"
+ val laminextVersion = "0.15.0"
+ val laminarUI5Version = "1.10.0"
val waypointVersion = "6.0.0"
val scalajsPlotlyJsVersion = "1.6.2"
val plotlyJsVersion = "2.12.1"
There's a few compiler errors though, one is an issue with circe and caliban (which I see you reported before https://github.com/lampepfl/dotty/issues/18166, but should probably be reported to caliban instead) and the other are API changes in caliban.
Thanks for the quick diagnostic.
A project I've been working on compiles perfectly but as soon as I add
"com.raquo" %%% "waypoint" % "6.0.0"
to the dependencies, the compiler crashes. Even if no code is referencing the library.Compiler version
3.3.0
Minimized code
The problem occurs in a full-stack project with Scala JVM/Scala JS cross-compilation, Caliban, ZIO, Quill and when I had a library to the dependencies in sbt. I have tried to reproduce it but it disappears if the code is too simple. If needed, I could create a repository with moke versions of the proprietary code but the problem and stack is exactly the same as https://github.com/lampepfl/dotty/issues/16439
Output (click arrow to expand)