Skip to content

packages cannot be represented as URI #7537

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

Closed
izhangzhihao opened this issue Nov 12, 2019 · 1 comment · Fixed by #7538
Closed

packages cannot be represented as URI #7537

izhangzhihao opened this issue Nov 12, 2019 · 1 comment · Fixed by #7538

Comments

@izhangzhihao
Copy link
Contributor

minimized code

"a"

expectation

Welcome to Scala 2.13.1 (OpenJDK 64-Bit Server VM, Java 13).
Type in expressions for evaluation. Or try :help.

scala> "a"
res0: String = a

actually

Starting dotty REPL...
scala> "a"
failure to convert Constant(true) to TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Byte)
Exception in thread "main" java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI
	at java.base/jdk.internal.jrtfs.JrtPath.toUri(JrtPath.java:176)
	at dotty.tools.dotc.classpath.JrtClassPath.asURLs(DirectoryClassPath.scala:182)
	at dotty.tools.dotc.classpath.AggregateClassPath.asURLs$$anonfun$1(AggregateClassPath.scala:50)
	at scala.collection.StrictOptimizedIterableOps.flatMap(StrictOptimizedIterableOps.scala:118)
	at scala.collection.StrictOptimizedIterableOps.flatMap$(StrictOptimizedIterableOps.scala:105)
	at scala.collection.immutable.Vector.flatMap(Vector.scala:119)
	at dotty.tools.dotc.classpath.AggregateClassPath.asURLs(AggregateClassPath.scala:50)
	at dotty.tools.repl.Rendering.$anonfun$1(Rendering.scala:36)
	at scala.Option.getOrElse(Option.scala:201)
	at dotty.tools.repl.Rendering.classLoader(Rendering.scala:38)
	at dotty.tools.repl.Rendering.valueOf(Rendering.scala:68)
	at dotty.tools.repl.Rendering.renderVal(Rendering.scala:95)
	at dotty.tools.repl.ReplDriver.displayMembers$3$$anonfun$3(ReplDriver.scala:285)
	at scala.collection.immutable.List.map(List.scala:219)
	at scala.collection.immutable.List.map(List.scala:79)
	at dotty.tools.repl.ReplDriver.displayMembers$6(ReplDriver.scala:285)
	at dotty.tools.repl.ReplDriver.displayDefinitions$$anonfun$3$$anonfun$2(ReplDriver.scala:311)
	at scala.Option.map(Option.scala:242)
	at dotty.tools.repl.ReplDriver.displayDefinitions$$anonfun$1(ReplDriver.scala:311)
	at dotty.tools.dotc.core.Phases.atPhase$$anonfun$1(Phases.scala:35)
	at dotty.tools.dotc.core.Periods.atPhase(Periods.scala:25)
	at dotty.tools.dotc.core.Phases.atPhase(Phases.scala:35)
	at dotty.tools.dotc.core.Contexts$Context.atPhase(Contexts.scala:71)
	at dotty.tools.repl.ReplDriver.displayDefinitions(ReplDriver.scala:317)
	at dotty.tools.repl.ReplDriver.compile$$anonfun$2(ReplDriver.scala:241)
	at scala.util.Either.fold(Either.scala:189)
	at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:241)
	at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:193)
	at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:127)
	at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:130)
	at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:148)
	at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:130)
	at dotty.tools.repl.Main$.main(Main.scala:6)
	at dotty.tools.repl.Main.main(Main.scala)
Caused by: java.lang.RuntimeException: /packages cannot be represented as URI
	... 34 more
@nicolasstucki
Copy link
Contributor

Great minimization.

nicolasstucki added a commit that referenced this issue Nov 12, 2019
Fix #7537 "cannot be represented as URI" in JDK 13
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.

2 participants