Merge pull request #7961 from Friendseeker/remove-workaround

[2.x] Remove workaround from #7783
This commit is contained in:
eugene yokota 2024-12-20 00:07:48 -05:00 committed by GitHub
commit 40f5cd1b45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 6 deletions

View File

@ -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(

View File

@ -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
}

View File

@ -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 =