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

repl crash ClassNotFoundException: ValueOf #17231

Closed
bishabosha opened this issue Apr 11, 2023 · 6 comments · Fixed by #17300
Closed

repl crash ClassNotFoundException: ValueOf #17231

bishabosha opened this issue Apr 11, 2023 · 6 comments · Fixed by #17300

Comments

@bishabosha
Copy link
Member

bishabosha commented Apr 11, 2023

Compiler version

3.2.2

Minimized code

scala> summon[ValueOf["a"]]
Exception in thread "main" java.lang.ClassNotFoundException: ValueOf
	at dotty.tools.repl.AbstractFileClassLoader.findClass(AbstractFileClassLoader.scala:51)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:587)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at dotty.tools.repl.AbstractFileClassLoader.loadClass(AbstractFileClassLoader.scala:57)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:467)
	at dotty.tools.repl.Rendering.rewrapValueClass(Rendering.scala:135)
	at dotty.tools.repl.Rendering.$anonfun$4(Rendering.scala:114)
	at scala.Option.flatMap(Option.scala:283)
	at dotty.tools.repl.Rendering.valueOf(Rendering.scala:114)
	at dotty.tools.repl.Rendering.renderVal(Rendering.scala:157)
	at dotty.tools.repl.ReplDriver.$anonfun$7(ReplDriver.scala:365)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.immutable.List.foreach(List.scala:333)
	at dotty.tools.repl.ReplDriver.extractAndFormatMembers$1(ReplDriver.scala:371)
	at dotty.tools.repl.ReplDriver.renderDefinitions$$anonfun$2(ReplDriver.scala:403)
	at scala.Option.map(Option.scala:242)
	at dotty.tools.repl.ReplDriver.renderDefinitions(ReplDriver.scala:409)
	at dotty.tools.repl.ReplDriver.compile$$anonfun$2(ReplDriver.scala:307)
	at scala.util.Either.fold(Either.scala:189)
	at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:323)
	at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:248)
	at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:168)
	at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:171)
	at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:191)
	at dotty.tools.repl.ReplDriver.runBody$$anonfun$1(ReplDriver.scala:179)
	at dotty.tools.runner.ScalaClassLoader$.asContext(ScalaClassLoader.scala:80)
	at dotty.tools.repl.ReplDriver.runBody(ReplDriver.scala:179)
	at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:171)
	at dotty.tools.repl.ReplDriver.tryRunning(ReplDriver.scala:133)
	at dotty.tools.repl.Main$.main(Main.scala:7)
	at dotty.tools.repl.Main.main(Main.scala)
@bishabosha bishabosha added itype:bug itype:crash stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 11, 2023
@bishabosha bishabosha changed the title repl crash using sttp library repl crash using sttp library - ClassNotFoundException: StatusCode Apr 11, 2023
@bishabosha bishabosha changed the title repl crash using sttp library - ClassNotFoundException: StatusCode repl crash ClassNotFoundException: ValueOf Apr 14, 2023
@bishabosha
Copy link
Member Author

found a much simpler crasher:

scala> summon[ValueOf["a"]]

@scala-center-bot
Copy link

This issue was picked for the Issue Spree No. 29 of 18 April 2023 which takes place in a week from now. @SethTisue, @Sporarum, @Decel, @gagandeepkalra will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.

@SethTisue
Copy link
Member

I can't make the spree this week after all :-(

@anatoliykmetyuk anatoliykmetyuk added area:repl and removed itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Apr 17, 2023
@Sporarum
Copy link
Contributor

I was not able to replicate this issue on main (6980b2e):

scala> summon[ValueOf["a"]]
val res0: ValueOf["a"] = scala.ValueOf@61

@dwijnand
Copy link
Member

Ah, right, ValueOf is a value class, so this is fixed by #16393.

Sporarum pushed a commit to dotty-staging/dotty that referenced this issue Apr 18, 2023
@Sporarum Sporarum reopened this Apr 18, 2023
@Sporarum Sporarum linked a pull request Apr 18, 2023 that will close this issue
@Sporarum Sporarum self-assigned this Apr 18, 2023
Sporarum pushed a commit that referenced this issue Apr 18, 2023
@mbovel
Copy link
Member

mbovel commented Apr 18, 2023

Thanks a lot @Sporarum.

Instead of this issue, @Sporarum, @Decel, @gagandeepkalra and @jan-pieter will work on #12460 during today's issue spree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants