-
Notifications
You must be signed in to change notification settings - Fork 928
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
sbt 0.13.14 doesn't run on Windows #3086
Labels
Comments
eed3si9n
changed the title
sbt 0.13.14 doesn't run on Windows
sbt 0.13.14 doesn't run on Windows: URI has an authority component
Apr 7, 2017
eed3si9n
added a commit
to eed3si9n/sbt
that referenced
this issue
Apr 8, 2017
"authority component" in an URI is the first domain name part. On Mac the absolute file path starts with a / naturally, but on Windows user.home doesn't, so it requires an extra / in front to prevent "URI has an authority component" error. Fixes sbt#3086
eed3si9n
added a commit
to eed3si9n/sbt
that referenced
this issue
Apr 8, 2017
Improve IO.toFile's handling for Windows, and use it for identifying resolvers. This adds support to convert URL to File on Windows in several ways: ``` val u0 = new URL("file:C:\\Users\\foo/.sbt/preloaded") val u1 = new URL("file:/C:\\Users\\foo/.sbt/preloaded") val u2 = new URL("file://unc/Users/foo/.sbt/preloaded") val u3 = new URL("file:///C:\\Users\\foo/.sbt/preloaded") val u4 = new URL("file:////unc/Users/foo/.sbt/preloaded") ``` Note that `u0` and `u2` are something `new File(u.toURI)` won't handle. This also correctly handles UNC convention specified by Microsoft in https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/. Fixes sbt#3086 Fixes sbt#2150
eed3si9n
changed the title
sbt 0.13.14 doesn't run on Windows: URI has an authority component
sbt 0.13.14 doesn't run on Windows
Apr 8, 2017
eed3si9n
added a commit
to eed3si9n/sbt
that referenced
this issue
Apr 9, 2017
sbt#3088 attemped to fix the sbt#3086, but by putting no slashes in `sbt.boot.properties` the launcher created by 0.13.15-* becomes incompatible for all previous sbt versions. The uglier but backward compatible fix for sbt#3086 is to use u3 format with three slashes. This on Windows will resolve to `file:///C:/Users/foo/.sbt/preloaded`, and on Mac and Linux `file:////root/.sbt/preloaded/`. Mac and Linux are both tolerant of extra slashes on the front: ``` > eval new File(new URL("file:////Users/foo/.sbt/preloaded/").toURI) [info] ans: java.io.File = /Users/foo/.sbt/preloaded ```
I just upgraded from sbt 0.13.12 to sbt 0.13.15: build works as expected (on Windows 10). |
The buggy part was the launcher so you have to test https://bintray.com/sbt/native-packages/download_file?file_path=sbt%2F0.13.15%2Fsbt-0.13.15.msi. |
Thank you! |
eed3si9n
added a commit
to eed3si9n/sbt
that referenced
this issue
Apr 12, 2017
The uglier but backward compatible fix for sbt#3086 is to use u3 format with three slashes. This on Windows will resolve to `file:///C:/Users/foo/.sbt/preloaded`, and on Mac and Linux `file:////root/.sbt/preloaded/`. Mac and Linux are both tolerant of extra slashes on the front: ``` > eval new File(new URL("file:////Users/foo/.sbt/preloaded/").toURI) [info] ans: java.io.File = /Users/foo/.sbt/preloaded ```
eed3si9n
added a commit
to eed3si9n/io
that referenced
this issue
Apr 12, 2017
Improve IO.toFile's handling for Windows, and use it for identifying resolvers. This adds support to convert URL to File on Windows in several ways: ``` val u0 = new URL("file:C:\\Users\\foo/.sbt/preloaded") val u1 = new URL("file:/C:\\Users\\foo/.sbt/preloaded") val u2 = new URL("file://unc/Users/foo/.sbt/preloaded") val u3 = new URL("file:///C:\\Users\\foo/.sbt/preloaded") val u4 = new URL("file:////unc/Users/foo/.sbt/preloaded") ``` Note that `u0` and `u2` are something `new File(u.toURI)` won't handle. This also correctly handles UNC convention specified by Microsoft in https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/. Fixes sbt/sbt#3086 Fixes sbt/sbt#2150
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you came here by Googling "URI has an authority component", see #3088 for URL encoding of file path on Windows.
steps
run sbt 0.13.14 on Windows
problem
expectation
notes
This is likely due to the way offline repo is specified.
The text was updated successfully, but these errors were encountered: