Skip to content

Calling quoted.Expr.{run,show} crashes at runtime in Dotty 0.13.0-RC1, but not 0.12.0 #6007

Closed
@fhackett

Description

@fhackett

When testing if #5997 was reproducible on the latest version of Dotty, I found instead that trying to run my example on version 0.13.0-RC1 crashes at runtime. The same code running on 0.12.0 or 0.12.0-RC1 does not crash.

Steps to reproduce (on Ubuntu 16.04, with sbt 1.2.7):

$ git clone [email protected]:lampepfl/dotty-example-project.git
$ cd dotty-example-project
$ git log
commit a753b14e281bbaa6c69f26298913ad6feba969c7
Merge: 3169229 34953cd
Author: Aggelos Biboudis <[email protected]>
Date:   Tue Feb 26 19:34:33 2019 +0100

    Merge pull request #25 from lampepfl/dotty-0.13
    
    Release Dotty 0.13.0-RC1
[rest of log omitted]
$ sbt
sbt:dotty-example-project> about
[info] This is sbt 1.2.7
[info] The current project is ProjectRef(uri("file:/.../dotty-example-project/"), "root") 0.1.0
[info] The current project is built against Scala 0.13.0-RC1
[info] Available Plugins
[info]  - dotty.tools.sbtplugin.DottyIDEPlugin
[info]  - dotty.tools.sbtplugin.DottyPlugin
[info]  - sbt.ScriptedPlugin
[info]  - sbt.plugins.CorePlugin
[info]  - sbt.plugins.Giter8TemplatePlugin
[info]  - sbt.plugins.IvyPlugin
[info]  - sbt.plugins.JUnitXmlReportPlugin
[info]  - sbt.plugins.JvmPlugin
[info]  - sbt.plugins.SbtPlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.12.7
sbt:dotty-example-project> console
scala> import quoted.Toolbox.Default._
scala> val v = '{ (if true then Some(1) else None).map(v => v+1) }
scala> v.show
scala.quoted.Toolbox$ToolboxNotFoundException: Could not load the Toolbox class `dotty.tools.dotc.quoted.ToolboxImpl` from the JVM classpath. Make sure that the compiler is on the JVM classpath.
	at scala.quoted.Toolbox$.make(Toolbox.scala:29)
	at scala.quoted.Toolbox$Default$.make(Toolbox.scala:15)
	at rs$line$4$.<init>(rs$line$4:1)
[huge stacktrace omitted]
Caused by: java.lang.ClassNotFoundException: dotty.tools.dotc.quoted.ToolboxImpl
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at scala.quoted.Toolbox$.make(Toolbox.scala:21)
	... 54 more
scala> v.run
[the same or very similar error]

Let me know if you need any other information in order to reproduce the issue. I abridged the stacktraces for readability, but perhaps I cut out something important.

At first glance, it seems like either the Dotty sbt plugin is misbehaving by somehow not setting the classpath properly, or Dotty is doing something very weird. I don't know enough about the internals to determine which.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions