Skip to content

Commit

Permalink
Merge pull request #1372 from scalacenter/update/scalafmt-core-3.8.1
Browse files Browse the repository at this point in the history
Update scalafmt-core to 3.8.1
  • Loading branch information
adpi2 authored Apr 1, 2024
2 parents 9d03ff7 + 2a72639 commit ab52e49
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.8.1
5e582217ef0137a17afedde0fa7bd9236932ecad
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.8.0"
version = "3.8.1"
runner.dialect = scala213source3
maxColumn = 120
align.preset = some
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ case class NonStandardLib(
sealed trait BinaryVersionLookup

object BinaryVersionLookup {

/**
* The version is encoded in the pom file
* dependency on org.scala-lang:scala-library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ class ArtifactConverter(paths: DataPaths) extends LazyLogging {
*/
private def extractMeta(pom: ArtifactModel): Option[ArtifactMeta] = {
val nonStandardLookup =
nonStandardLibs.find(lib =>
lib.groupId == pom.groupId && lib.artifactId == pom.artifactId
)
nonStandardLibs
.find(lib => lib.groupId == pom.groupId && lib.artifactId == pom.artifactId)
.map(_.lookup)

val artifactMetaOption = nonStandardLookup match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SonatypeService(
result <- nonStandardLibs.mapSync { lib =>
val groupId = Artifact.GroupId(lib.groupId)
// get should not throw: it is a fixed set of artifactIds
val artifactId = Artifact.ArtifactId.parse(lib.artifactId).get
val artifactId = Artifact.ArtifactId.parse(lib.artifactId).get
findAndIndexMissingArtifacts(groupId, artifactId, mavenReferenceFromDatabase.toSet)
}
} yield s"Inserted ${result.sum} missing poms"
Expand All @@ -47,7 +47,11 @@ class SonatypeService(
result <- findAndIndexMissingArtifacts(groupId, artifactNameOpt, mavenReferenceFromDatabase.toSet)
} yield s"Inserted ${result} poms"

private def findAndIndexMissingArtifacts(groupId: GroupId, artifactNameOpt: Option[Artifact.Name], knownRefs: Set[MavenReference]): Future[Int] =
private def findAndIndexMissingArtifacts(
groupId: GroupId,
artifactNameOpt: Option[Artifact.Name],
knownRefs: Set[MavenReference]
): Future[Int] =
for {
artifactIds <- sonatypeService.getAllArtifactIds(groupId)
scalaArtifactIds = artifactIds.filter(artifact =>
Expand Down

0 comments on commit ab52e49

Please sign in to comment.