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

[1.3.0 Coursier] URISyntaxException downloading managed dependency #5046

Open
jxtps opened this issue Sep 6, 2019 · 2 comments

Comments

@jxtps
Copy link

commented Sep 6, 2019

steps

sbt version: 1.3.0
windows 10
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

Create build.sbt with a single line in it:

libraryDependencies += "org.nd4j" % "nd4j-native-platform" % "1.0.0-beta4"

Execute sbt run and get a long stack trace:

[error] java.net.URISyntaxException: Illegal character in path at index 118: https://repo1.maven.org/maven2/org/nd4j/nd4j-backend-impls/1.0.0-beta4/nd4j-backend-impls-1.0.0-beta4-windows-x86_64.${project.packaging}
[error]         at java.net.URI$Parser.fail(URI.java:2848)
[error]         at java.net.URI$Parser.checkChars(URI.java:3021)
[error]         at java.net.URI$Parser.parseHierarchical(URI.java:3105)
[error]         at java.net.URI$Parser.parse(URI.java:3053)
[error]         at java.net.URI.<init>(URI.java:588)
[error]         at java.net.URL.toURI(URL.java:946)
[error]         at sjsonnew.JavaExtraFormats.$anonfun$urlStringIso$1(JavaExtraFormats.scala:40)
[error]         at sjsonnew.IsoString$$anon$1.to(IsoString.scala:26)
[error]         at sjsonnew.IsoFormats$$anon$2.write(IsoFormats.scala:31)
[error]         at sjsonnew.StandardFormats$OptionFormat.write(StandardFormats.scala:37)
[error]         at sjsonnew.StandardFormats$OptionFormat.addField(StandardFormats.scala:44)
[error]         at sjsonnew.StandardFormats$OptionFormat.addField(StandardFormats.scala:33)
[error]         at sjsonnew.Builder.addField(Builder.scala:43)
[error]         at sbt.librarymanagement.ArtifactFormats$$anon$1.write(ArtifactFormats.scala:36)
[error]         at sbt.librarymanagement.ArtifactFormats$$anon$1.write(ArtifactFormats.scala:9)
[error]         at sjsonnew.CollectionFormats$$anon$2.$anonfun$write$2(CollectionFormats.scala:85)
[error]         at sjsonnew.CollectionFormats$$anon$2.$anonfun$write$2$adapted(CollectionFormats.scala:85)
[error]         at scala.collection.Iterator.foreach(Iterator.scala:941)
[error]         at scala.collection.Iterator.foreach$(Iterator.scala:941)
[error]         at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
[error]         at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error]         at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error]         at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error]         at sjsonnew.CollectionFormats$$anon$2.write(CollectionFormats.scala:85)
[error]         at sjsonnew.CollectionFormats$$anon$2.write(CollectionFormats.scala:80)
[error]         at sjsonnew.JsonWriter.addField(JsonFormat.scala:40)
[error]         at sjsonnew.JsonWriter.addField$(JsonFormat.scala:37)
[error]         at sjsonnew.CollectionFormats$$anon$2.addField(CollectionFormats.scala:80)
[error]         at sjsonnew.Builder.addField(Builder.scala:43)
[error]         at sbt.librarymanagement.ModuleReportFormats$$anon$1.write(ModuleReportFormats.scala:42)
[error]         at sbt.librarymanagement.ModuleReportFormats$$anon$1.write(ModuleReportFormats.scala:9)
[error]         at sjsonnew.CollectionFormats$$anon$2.$anonfun$write$2(CollectionFormats.scala:85)
[error]         at sjsonnew.CollectionFormats$$anon$2.$anonfun$write$2$adapted(CollectionFormats.scala:85)
[error]         at scala.collection.Iterator.foreach(Iterator.scala:941)
[error]         at scala.collection.Iterator.foreach$(Iterator.scala:941)
[error]         at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
[error]         at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error]         at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error]         at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error]         at sjsonnew.CollectionFormats$$anon$2.write(CollectionFormats.scala:85)
[error]         at sjsonnew.CollectionFormats$$anon$2.write(CollectionFormats.scala:80)
[error]         at sjsonnew.JsonWriter.addField(JsonFormat.scala:40)
[error]         at sjsonnew.JsonWriter.addField$(JsonFormat.scala:37)
[error]         at sjsonnew.CollectionFormats$$anon$2.addField(CollectionFormats.scala:80)
[error]         at sjsonnew.Builder.addField(Builder.scala:43)
[error]         at sbt.librarymanagement.ConfigurationReportFormats$$anon$1.write(ConfigurationReportFormats.scala:26)
[error]         at sbt.librarymanagement.ConfigurationReportFormats$$anon$1.write(ConfigurationReportFormats.scala:9)
[error]         at sjsonnew.CollectionFormats$$anon$2.$anonfun$write$2(CollectionFormats.scala:85)
[error]         at sjsonnew.CollectionFormats$$anon$2.$anonfun$write$2$adapted(CollectionFormats.scala:85)
[error]         at scala.collection.Iterator.foreach(Iterator.scala:941)
[error]         at scala.collection.Iterator.foreach$(Iterator.scala:941)
[error]         at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
[error]         at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error]         at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error]         at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error]         at sjsonnew.CollectionFormats$$anon$2.write(CollectionFormats.scala:85)
[error]         at sjsonnew.CollectionFormats$$anon$2.write(CollectionFormats.scala:80)
[error]         at sjsonnew.JsonWriter.addField(JsonFormat.scala:40)
[error]         at sjsonnew.JsonWriter.addField$(JsonFormat.scala:37)
[error]         at sjsonnew.CollectionFormats$$anon$2.addField(CollectionFormats.scala:80)
[error]         at sjsonnew.Builder.addField(Builder.scala:43)
[error]         at sbt.librarymanagement.UpdateReportFormats$$anon$1.write(UpdateReportFormats.scala:27)
[error]         at sbt.librarymanagement.UpdateReportFormats$$anon$1.write(UpdateReportFormats.scala:9)
[error]         at sjsonnew.SupportConverter.toJsonUnsafe(SupportConverter.scala:23)
[error]         at sjsonnew.SupportConverter.toJsonUnsafe$(SupportConverter.scala:20)
[error]         at sjsonnew.support.scalajson.unsafe.Converter$.toJsonUnsafe(Converter.scala:7)
[error]         at sjsonnew.SupportConverter.$anonfun$toJson$1(SupportConverter.scala:14)
[error]         at scala.util.Try$.apply(Try.scala:213)
[error]         at sjsonnew.SupportConverter.toJson(SupportConverter.scala:14)
[error]         at sjsonnew.SupportConverter.toJson$(SupportConverter.scala:13)
[error]         at sjsonnew.support.scalajson.unsafe.Converter$.toJson(Converter.scala:7)
[error]         at sbt.util.PlainOutput.write(Output.scala:16)
[error]         at sbt.util.FileBasedStore.$anonfun$write$1(CacheStore.scala:73)
[error]         at sbt.util.FileBasedStore.$anonfun$write$1$adapted(CacheStore.scala:72)
[error]         at sbt.io.Using.apply(Using.scala:27)
[error]         at sbt.util.FileBasedStore.write(CacheStore.scala:72)
[error]         at sbt.internal.InMemoryCacheStore$CacheStoreImpl.write(InMemoryCacheStore.scala:75)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:70)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:115)
[error]         at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:115)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:96)
[error]         at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:150)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:129)
[error]         at sbt.Classpaths$.$anonfun$updateTask0$5(Defaults.scala:2909)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:67)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:280)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:19)
[error]         at sbt.Execute.work(Execute.scala:289)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:280)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)

problem

SBT fails to download a dependency due to an incorrectly formatted URL: https://repo1.maven.org/maven2/org/nd4j/nd4j-backend-impls/1.0.0-beta4/nd4j-backend-impls-1.0.0-beta4-windows-x86_64.${project.packaging}

expectation

Should format the URL correctly and succeed in downloading the dependency.

notes

Works in SBT 1.2.8
Works in SBT 1.3.0 with coursier disabled (adding ThisBuild / useCoursier := false to build.sbt)

@eed3si9n

This comment has been minimized.

Copy link
Member

commented Sep 6, 2019

@jxtps Thanks for the report!

@sathyamoorthyrr

This comment has been minimized.

Copy link

commented Sep 10, 2019

I faced the same issue with sbt.version = 1.3.0
Switching to sbt.version = 1.2.8 solves the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.