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

SemanticDB URISyntaxException #15860

Closed
kierendavies opened this issue Aug 15, 2022 · 0 comments · Fixed by #15863
Closed

SemanticDB URISyntaxException #15860

kierendavies opened this issue Aug 15, 2022 · 0 comments · Fixed by #15863
Assignees
Milestone

Comments

@kierendavies
Copy link
Contributor

kierendavies commented Aug 15, 2022

I have a source file whose name contains a colon, where the part before the colon is not a valid URI scheme according to RFC 2396. When I compile with SemanticDB enabled, compilation fails with a URISyntaxException.

Compiler version

3.2.0-RC3, 3.1.3

Minimized code

In a shell:

touch 1:a.scala
cs launch scalac:3.2.0-RC3 -- -Ysemanticdb 1:a.scala

Output

exception occurred while compiling 1:a.scala
java.net.URISyntaxException: Illegal character in scheme name at index 0: 1:a.scala while compiling 1:a.scala
Exception in thread "main" java.net.URISyntaxException: Illegal character in scheme name at index 0: 1:a.scala
	at java.base/java.net.URI$Parser.fail(URI.java:2973)
	at java.base/java.net.URI$Parser.checkChars(URI.java:3144)
	at java.base/java.net.URI$Parser.checkChar(URI.java:3154)
	at java.base/java.net.URI$Parser.parse(URI.java:3169)
	at java.base/java.net.URI.<init>(URI.java:708)
	at java.base/java.net.URI.<init>(URI.java:809)
	at dotty.tools.dotc.semanticdb.Tools$.$anonfun$1(Tools.scala:15)
	at scala.collection.StrictOptimizedIterableOps.map(StrictOptimizedIterableOps.scala:100)
	at scala.collection.StrictOptimizedIterableOps.map$(StrictOptimizedIterableOps.scala:87)
	at scala.collection.convert.JavaCollectionWrappers$JIterableWrapper.map(JavaCollectionWrappers.scala:58)
	at dotty.tools.dotc.semanticdb.Tools$.mkURIstring(Tools.scala:15)
	at dotty.tools.dotc.semanticdb.ExtractSemanticDB$.write(ExtractSemanticDB.scala:499)
	at dotty.tools.dotc.semanticdb.ExtractSemanticDB.run(ExtractSemanticDB.scala:50)
	at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:311)
	at scala.collection.immutable.List.map(List.scala:246)
	at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:312)
	at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:234)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1328)
	at dotty.tools.dotc.Run.runPhases$1(Run.scala:245)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:253)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:262)
	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:68)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:262)
	at dotty.tools.dotc.Run.compileSources(Run.scala:186)
	at dotty.tools.dotc.Run.compile(Run.scala:170)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
	at dotty.tools.dotc.Driver.process(Driver.scala:195)
	at dotty.tools.dotc.Driver.process(Driver.scala:163)
	at dotty.tools.dotc.Driver.process(Driver.scala:175)
	at dotty.tools.dotc.Driver.main(Driver.scala:205)
	at dotty.tools.MainGenericCompiler$.run$1(MainGenericCompiler.scala:162)
	at dotty.tools.MainGenericCompiler$.main(MainGenericCompiler.scala:186)
	at dotty.tools.MainGenericCompiler.main(MainGenericCompiler.scala)
@kierendavies kierendavies added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Aug 15, 2022
kierendavies added a commit to zivver/dotty that referenced this issue Aug 15, 2022
@KacperFKorban KacperFKorban added area:semanticdb and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Aug 15, 2022
kierendavies added a commit to zivver/dotty that referenced this issue Aug 16, 2022
kierendavies added a commit to zivver/dotty that referenced this issue Aug 17, 2022
@Kordyjan Kordyjan added this to the 3.2.1 milestone Aug 1, 2023
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.

3 participants