diff --git a/build.sbt b/build.sbt index 14867c049..5eba2298d 100644 --- a/build.sbt +++ b/build.sbt @@ -1491,7 +1491,6 @@ lazy val lmCoursier = project Mima.lmCoursierFilters, lmCoursierDependencies, Compile / sourceGenerators += Utils.dataclassGen(lmCoursierDefinitions).taskValue, - Compile / scalacOptions --= Seq("-Xfatal-warnings"), ) .dependsOn( // We depend on lmIvy rather than just lmCore to handle the ModuleDescriptor @@ -1508,7 +1507,6 @@ lazy val lmCoursierShaded = project Mima.lmCoursierFilters, Mima.lmCoursierShadedFilters, Compile / sources := (lmCoursier / Compile / sources).value, - Compile / scalacOptions --= Seq("-Xfatal-warnings"), lmCoursierDependencies, autoScalaLibrary := false, libraryDependencies ++= Seq( diff --git a/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala b/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala index 3d0d67b4f..7ee3d5184 100644 --- a/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala +++ b/lm-coursier/src/main/scala/lmcoursier/CoursierDependencyResolution.scala @@ -1,7 +1,7 @@ package lmcoursier import java.io.File -import java.net.{ URL, URLClassLoader } +import java.net.{ URI, URLClassLoader } import coursier.{ Organization, Resolution } import coursier.core.{ Classifier, Configuration } @@ -55,7 +55,7 @@ class CoursierDependencyResolution( val conf0 = protocolHandlerConfiguration.getOrElse(conf) def isUnknownProtocol(rawURL: String): Boolean = { - Try(new URL(rawURL)) match { + Try(new URI(rawURL).toURL) match { case Failure(ex) if ex.getMessage.startsWith("unknown protocol: ") => true case _ => false } diff --git a/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala b/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala index bec5a6710..83ce566eb 100644 --- a/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala +++ b/lm-coursier/src/main/scala/lmcoursier/syntax/package.scala @@ -101,8 +101,6 @@ package object syntax { followHttpToHttpsRedirections: Boolean ): CoursierConfiguration = value.withFollowHttpToHttpsRedirections(Some(followHttpToHttpsRedirections)) - def withFollowHttpToHttpsRedirections(): CoursierConfiguration = - value.withFollowHttpToHttpsRedirections(Some(true)) def withStrict(strict: Strict): CoursierConfiguration = value.withStrict(Some(strict)) def withTtl(ttl: Duration): CoursierConfiguration =