Skip to content

Compiler handles some URIs incorrectly on Windows (shows in SettingsTests.jarOutput) #5155

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
melekhove opened this issue Sep 25, 2018 · 0 comments

Comments

@melekhove
Copy link
Contributor

Steps to reproduce from command line:

sbt:dotty> dotc -d out\jaredFoo.jar tests\pos\Foo.scala
[warn] Multiple main classes detected.  Run 'show discoveredMainClasses' to see the list
[info] Running (fork) dotty.tools.dotc.Main -classpath C:\Users\mev\.sbt\boot\scala-2.12.6\lib\scala-library.jar;D:\home
\projects\Scala\Dotty\git\library\..\out\bootstrap\dotty-library-bootstrapped\scala-0.10\dotty-library_0.10-0.10.0-bin-S
NAPSHOT.jar -d out\jaredFoo.jar tests\pos\Foo.scala
Exception in thread "main" java.lang.IllegalArgumentException: Illegal character in opaque part at index 11: jar:file:D:
\home\projects\Scala\Dotty\git\out\jaredFoo.jar
        at java.net.URI.create(URI.java:852)
        at dotty.tools.io.JarArchive$.open(JarArchive.scala:30)
        at dotty.tools.io.JarArchive$.create(JarArchive.scala:20)
        at dotty.tools.dotc.config.Settings$Setting.doSet$1(Settings.scala:150)
        at dotty.tools.dotc.config.Settings$Setting.tryToSet(Settings.scala:180)
        at dotty.tools.dotc.config.Settings$SettingGroup.loop$1(Settings.scala:242)
        at dotty.tools.dotc.config.Settings$SettingGroup.processArguments(Settings.scala:248)
        at dotty.tools.dotc.config.Settings$SettingGroup.loop$1(Settings.scala:243)
        at dotty.tools.dotc.config.Settings$SettingGroup.processArguments(Settings.scala:248)
        at dotty.tools.dotc.config.Settings$SettingGroup.processArguments(Settings.scala:256)
        at dotty.tools.dotc.config.CompilerCommand$.distill(CompilerCommand.scala:61)
        at dotty.tools.dotc.Driver.setup(Driver.scala:47)
        at dotty.tools.dotc.Driver.process(Driver.scala:133)
        at dotty.tools.dotc.Driver.process(Driver.scala:103)
        at dotty.tools.dotc.Driver.process(Driver.scala:115)
        at dotty.tools.dotc.Driver.main(Driver.scala:142)
        at dotty.tools.dotc.Main.main(Main.scala)
Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 11: jar:file:D:\home\projects\Scala\Do
tty\git\out\jaredFoo.jar
        at java.net.URI$Parser.fail(URI.java:2848)
        at java.net.URI$Parser.checkChars(URI.java:3021)
        at java.net.URI$Parser.parse(URI.java:3058)
        at java.net.URI.<init>(URI.java:588)
        at java.net.URI.create(URI.java:850)
        ... 16 more
[error] Nonzero exit code returned from runner: 1
[error] (dotty-compiler / Compile / runMain) Nonzero exit code returned from runner: 1
[error] Total time: 4 s, completed 25.09.2018 7:00:41
allanrenucci added a commit that referenced this issue Sep 25, 2018
Fix #5155: Use platform dependent URI creation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant