File tree Expand file tree Collapse file tree 5 files changed +12
-10
lines changed
cli/src/main/scala/scala/cli/commands/new
options/src/main/scala/scala/build Expand file tree Collapse file tree 5 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ object New extends ScalaCommand[NewOptions] {
14
14
15
15
override def scalaSpecificationLevel = SpecificationLevel .EXPERIMENTAL
16
16
17
- val giter8Dependency =
17
+ private def giter8Dependency =
18
18
Seq (dep " ${Constants .giter8Organization}:: ${Constants .giter8Name}: ${Constants .giter8Version}" )
19
19
20
20
override def runCommand (options : NewOptions , remainingArgs : RemainingArgs , logger : Logger ): Unit =
Original file line number Diff line number Diff line change @@ -168,7 +168,9 @@ object Artifacts {
168
168
scalaArtifactsParams.compilerPlugins
169
169
.map { posDep =>
170
170
val posDep0 =
171
- posDep.map(dep => dep.copy(userParams = dep.userParams + (" intransitive" -> None )))
171
+ posDep.map(dep =>
172
+ dep.copy(userParams = dep.userParams ++ Seq (" intransitive" -> None ))
173
+ )
172
174
artifacts(
173
175
Seq (posDep0),
174
176
allExtraRepositories,
@@ -529,7 +531,7 @@ object Artifacts {
529
531
.map(positionedDepTupleSeq =>
530
532
positionedDepTupleSeq.map {
531
533
case Positioned (positions, (dep, csDep)) =>
532
- val maybeUrl = dep.userParams.get( " url" ).flatten. map(new URL (_))
534
+ val maybeUrl = dep.userParams.find(_._1 == " url" ).flatMap(_._2. map(new URL (_) ))
533
535
val fallback = maybeUrl.map(url => (csDep.module -> csDep.version) -> (url -> true ))
534
536
Positioned (positions, (csDep, fallback))
535
537
}
Original file line number Diff line number Diff line change @@ -39,10 +39,10 @@ case object ActionableDependencyHandler
39
39
if Version (latestVersion) > Version (currentVersion) &&
40
40
! isLatestSyntaxVersion(currentVersion)
41
41
// filtering out toolkit-test to prevent double-update-diagnostic
42
- if ! (dependency.userParams.contains( Constants .toolkitName) &&
42
+ if ! (dependency.userParams.exists(_._1 == Constants .toolkitName) &&
43
43
dependency.module.name == Constants .toolkitTestName)
44
44
} yield
45
- if dependency.userParams.contains( Constants .toolkitName)
45
+ if dependency.userParams.exists(_._1 == Constants .toolkitName)
46
46
then
47
47
val toolkitSuggestion =
48
48
if dependency.module.organization == Constants .toolkitOrganization then latestVersion
Original file line number Diff line number Diff line change @@ -71,13 +71,13 @@ object Util {
71
71
(coursier.Organization (mod.organization), coursier.ModuleName (mod.name))
72
72
}
73
73
}
74
- for (clOpt <- dep.userParams.get( " classifier" ); cl <- clOpt)
74
+ for (clOpt <- dep.userParams.find(_._1 == " classifier" ).map(_._2 ); cl <- clOpt)
75
75
dep0 = dep0.withPublication(dep0.publication.withClassifier(coursier.core.Classifier (cl)))
76
- for (tpeOpt <- dep.userParams.get( " type" ); tpe <- tpeOpt)
76
+ for (tpeOpt <- dep.userParams.find(_._1 == " type" ).map(_._2 ); tpe <- tpeOpt)
77
77
dep0 = dep0.withPublication(dep0.publication.withType(coursier.core.Type (tpe)))
78
- for (extOpt <- dep.userParams.get( " ext" ); ext <- extOpt)
78
+ for (extOpt <- dep.userParams.find(_._1 == " ext" ).map(_._2 ); ext <- extOpt)
79
79
dep0 = dep0.withPublication(dep0.publication.withExt(coursier.core.Extension (ext)))
80
- for (_ <- dep.userParams.get( " intransitive" ))
80
+ for (_ <- dep.userParams.find(_._1 == " intransitive" ))
81
81
dep0 = dep0.withTransitive(false )
82
82
dep0
83
83
}
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ object Deps {
160
160
def coursierPublish = ivy " io.get-coursier.publish:publish_2.13:0.1.6 "
161
161
.exclude((" org.scala-lang.modules" , " scala-collection-compat_2.13" ))
162
162
.exclude((" com.github.plokhotnyuk.jsoniter-scala" , " jsoniter-scala-core_2.13" ))
163
- def dependency = ivy " io.get-coursier::dependency:0.2.5 "
163
+ def dependency = ivy " io.get-coursier::dependency:0.3.1 "
164
164
def dockerClient = ivy " com.spotify:docker-client:8.16.0 "
165
165
// TODO bump once 0.15.5 is out
166
166
def expecty = ivy " com.eed3si9n.expecty::expecty:0.17.0 "
You can’t perform that action at this time.
0 commit comments