mirror of https://github.com/sbt/sbt.git
scaladex cli api change & use scalaVersion from options
* Scaladex was updated to allow developers to specify cli artifact. It will only return projects and artifacts with cli enable
This commit is contained in:
parent
e8af9e7aba
commit
c332d4f46e
|
|
@ -191,7 +191,7 @@ class Helper(
|
|||
val res = Nondeterminism[Task].gather(scaladexRawDependencies.map { s =>
|
||||
val deps = scaladex.dependencies(
|
||||
s,
|
||||
"2.11",
|
||||
scalaVersion,
|
||||
if (verbosityLevel >= 2) Console.err.println(_) else _ => ()
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ case class Scaladex[F[_]](fetch: String => EitherT[F, String, String], F: Nondet
|
|||
|
||||
val s = fetch(
|
||||
// FIXME Escaping
|
||||
s"https://index.scala-lang.org/api/scastie/search?q=$name&target=$target&scalaVersion=$scalaVersion"
|
||||
s"https://index.scala-lang.org/api/search?q=$name&target=$target&scalaVersion=$scalaVersion&cli=true"
|
||||
)
|
||||
|
||||
s.flatMap(s => EitherT.fromDisjunction[F](s.decodeEither[List[Scaladex.SearchResult]].disjunction))
|
||||
|
|
@ -91,7 +91,7 @@ case class Scaladex[F[_]](fetch: String => EitherT[F, String, String], F: Nondet
|
|||
|
||||
val s = fetch(
|
||||
// FIXME Escaping
|
||||
s"https://index.scala-lang.org/api/scastie/project?organization=$organization&repository=$repository&artifact=$artifactName"
|
||||
s"https://index.scala-lang.org/api/project?organization=$organization&repository=$repository&artifact=$artifactName"
|
||||
)
|
||||
|
||||
s.flatMap(s => EitherT.fromDisjunction[F](s.decodeEither[Scaladex.ArtifactInfos].disjunction))
|
||||
|
|
@ -122,7 +122,6 @@ case class Scaladex[F[_]](fetch: String => EitherT[F, String, String], F: Nondet
|
|||
* Latest version only.
|
||||
*/
|
||||
def dependencies(name: String, scalaVersion: String, logger: String => Unit): EitherT[F, String, Seq[(Module, String)]] = {
|
||||
|
||||
val idx = name.indexOf('/')
|
||||
val orgNameOrError =
|
||||
if (idx >= 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue