Team846 / sbt-frc-example

An example project for using sbt-frc
2 stars 0 forks source link

Example Contains Unresolved Dependencies #1

Open benjiboy50fonz opened 3 years ago

benjiboy50fonz commented 3 years ago

I'm not sure if this example is still maintained, but if so, I am afraid I have found some errors or lack of clarification.

I am running the project in VSCode on a Windows 10 machine. I was able to replicate the problem on IntelliJ Community as well.

Shortly after making the stated modifications, running sbt compile results in the following:

C:\Users\Ben Bistline\Code\sbt-frc-example>sbt compile
[info] welcome to sbt 1.5.5 (Eclipse Adoptium Java 11.0.13)
[info] loading settings for project sbt-frc-example-build-build-build from metals.sbt ...
[info] loading project definition from C:\Users\Ben Bistline\Code\sbt-frc-example\project\project\project
[info] loading settings for project sbt-frc-example-build-build from metals.sbt ...
[info] loading project definition from C:\Users\Ben Bistline\Code\sbt-frc-example\project\project
[success] Generated .bloop\sbt-frc-example-build-build.json
[success] Total time: 1 s, completed Nov 10, 2021, 1:00:50 PM
[info] loading settings for project sbt-frc-example-build from metals.sbt,plugins.sbt ...
[info] loading project definition from C:\Users\Ben Bistline\Code\sbt-frc-example\project
[error] insecure HTTP request is unsupported 'http://team846.github.io/repo'; switch to HTTPS or opt-in as ("Funky-Repo" at "http://team846.github.io/repo").withAllowInsecureProtocol(true), or by using allowInsecureProtocol in repositories file
[error] insecure HTTP request is unsupported 'http://team846.github.io/repo'; switch to HTTPS or opt-in as ("Funky-Repo" at "http://team846.github.io/repo").withAllowInsecureProtocol(true), or by using allowInsecureProtocol in repositories file
[error] java.lang.RuntimeException: insecure protocol is unsupported
[error]         at scala.sys.package$.error(package.scala:30)
[error]         at sbt.Classpaths$.errorInsecureProtocol(Defaults.scala:3312)
[error]         at sbt.Classpaths$.$anonfun$mkIvyConfiguration$1(Defaults.scala:3906)
[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:68)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]         at sbt.Execute.work(Execute.scala:291)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:829)
[error] java.lang.RuntimeException: insecure protocol is unsupported
[error]         at scala.sys.package$.error(package.scala:30)
[error]         at sbt.Classpaths$.errorInsecureProtocol(Defaults.scala:3312)
[error]         at sbt.coursierint.LMCoursier$.coursierConfiguration(LMCoursier.scala:169)
[error]         at sbt.coursierint.LMCoursier$.$anonfun$coursierConfigurationTask$1(LMCoursier.scala:224)
[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:68)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]         at sbt.Execute.work(Execute.scala:291)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:829)
[error] (ivyConfiguration) insecure protocol is unsupported
[error] (csrConfiguration) insecure protocol is unsupported
[error] Total time: 0 s, completed Nov 10, 2021, 1:00:53 PM

This security issue can be resolved by allowing access to HTTP. With the following change in plugins.sbt:

resolvers += ("Funky-Repo" at "http://team846.github.io/repo").withAllowInsecureProtocol(true)

However, there seem to be more issues than what appears on the surface. Running sbt compile on the same system after making the change described above results in this:

C:\Users\Ben Bistline\Code\sbt-frc-example>sbt compile
[info] welcome to sbt 1.5.5 (Eclipse Adoptium Java 11.0.13)
[info] loading settings for project sbt-frc-example-build-build-build from metals.sbt ...
[info] loading project definition from C:\Users\Ben Bistline\Code\sbt-frc-example\project\project\project
[info] loading settings for project sbt-frc-example-build-build from metals.sbt ...
[info] loading project definition from C:\Users\Ben Bistline\Code\sbt-frc-example\project\project
[success] Generated .bloop\sbt-frc-example-build-build.json
[success] Total time: 1 s, completed Nov 10, 2021, 1:02:59 PM
[info] loading settings for project sbt-frc-example-build from metals.sbt,plugins.sbt ...
[info] loading project definition from C:\Users\Ben Bistline\Code\sbt-frc-example\project
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          com.eed3si9n:sbt-assembly:0.13.0 (sbtVersion=1.0, scalaVersion=2.12)
[warn]          com.lynbrookrobotics:sbt-frc:0.3.0 (sbtVersion=1.0, scalaVersion=2.12)
[warn]
[warn]  Note: Unresolved dependencies path:
[error] sbt.librarymanagement.ResolveException: Error downloading com.eed3si9n:sbt-assembly;sbtVersion=1.0;scalaVersion=2.12:0.13.0
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.12_1.0/0.13.0/sbt-assembly-0.13.0.pom
[error]   not found: C:\Users\Ben Bistline\.ivy2\localcom.eed3si9n\sbt-assembly\scala_2.12\sbt_1.0\0.13.0\ivys\ivy.xml
[error]   not found: http://team846.github.io/repo/com/eed3si9n/sbt-assembly_2.12_1.0/0.13.0/sbt-assembly-0.13.0.pom
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.13.0/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.13.0/ivys/ivy.xml
[error] Error downloading com.lynbrookrobotics:sbt-frc;sbtVersion=1.0;scalaVersion=2.12:0.3.0
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/lynbrookrobotics/sbt-frc_2.12_1.0/0.3.0/sbt-frc-0.3.0.pom
[error]   not found: C:\Users\Ben Bistline\.ivy2\localcom.lynbrookrobotics\sbt-frc\scala_2.12\sbt_1.0\0.3.0\ivys\ivy.xml
[error]   not found: http://team846.github.io/repo/com/lynbrookrobotics/sbt-frc_2.12_1.0/0.3.0/sbt-frc-0.3.0.pom
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.lynbrookrobotics/sbt-frc/scala_2.12/sbt_1.0/0.3.0/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.lynbrookrobotics/sbt-frc/scala_2.12/sbt_1.0/0.3.0/ivys/ivy.xml
[error]         at lmcoursier.CoursierDependencyResolution.unresolvedWarningOrThrow(CoursierDependencyResolution.scala:258)
[error]         at lmcoursier.CoursierDependencyResolution.$anonfun$update$38(CoursierDependencyResolution.scala:227)
[error]         at scala.util.Either$LeftProjection.map(Either.scala:573)
[error]         at lmcoursier.CoursierDependencyResolution.update(CoursierDependencyResolution.scala:227)
[error]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:60)
[error]         at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:59)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:133)
[error]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:73)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$20(LibraryManagement.scala:146)
[error]         at scala.util.control.Exception$Catch.apply(Exception.scala:228)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:146)
[error]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:127)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:160)
[error]         at sbt.Classpaths$.$anonfun$updateTask0$1(Defaults.scala:3678)
[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:68)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]         at sbt.Execute.work(Execute.scala:291)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:829)
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.eed3si9n:sbt-assembly;sbtVersion=1.0;scalaVersion=2.12:0.13.0
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.12_1.0/0.13.0/sbt-assembly-0.13.0.pom
[error]   not found: C:\Users\Ben Bistline\.ivy2\localcom.eed3si9n\sbt-assembly\scala_2.12\sbt_1.0\0.13.0\ivys\ivy.xml
[error]   not found: http://team846.github.io/repo/com/eed3si9n/sbt-assembly_2.12_1.0/0.13.0/sbt-assembly-0.13.0.pom
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.13.0/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.13.0/ivys/ivy.xml
[error] Error downloading com.lynbrookrobotics:sbt-frc;sbtVersion=1.0;scalaVersion=2.12:0.3.0
[error]   Not found
[error]   Not found
[error]   not found: https://repo1.maven.org/maven2/com/lynbrookrobotics/sbt-frc_2.12_1.0/0.3.0/sbt-frc-0.3.0.pom
[error]   not found: C:\Users\Ben Bistline\.ivy2\localcom.lynbrookrobotics\sbt-frc\scala_2.12\sbt_1.0\0.3.0\ivys\ivy.xml
[error]   not found: http://team846.github.io/repo/com/lynbrookrobotics/sbt-frc_2.12_1.0/0.3.0/sbt-frc-0.3.0.pom
[error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.lynbrookrobotics/sbt-frc/scala_2.12/sbt_1.0/0.3.0/ivys/ivy.xml
[error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.lynbrookrobotics/sbt-frc/scala_2.12/sbt_1.0/0.3.0/ivys/ivy.xml
[error] Total time: 4 s, completed Nov 10, 2021, 1:03:03 PM

It seems as though it's all outdated. Am I missing something? What possible fixes exist?

Thanks,

Ben Bistline

shadaj commented 3 years ago

This example is a bit outdated, unfortunately, but version 0.4.0 should work with SBT 1.x. You can take a look at https://github.com/team846/code-2018 for a more up-to-date example of using sbt-frc. That project also uses Scala Native to compile ahead-of-time rather than running on the JVM, which we used during the 2018 season.