Skip to content

packages cannot be represented as URI #7537

Closed
@izhangzhihao

Description

@izhangzhihao

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions