Skip to content

Commit

Permalink
Treat failed publish due to NoSuchElementException as skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur committed Jul 26, 2024
1 parent 600b539 commit 94d3e3e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions project-builder/shared/CommunityBuildCore.scala
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,14 @@ object Scala3CommunityBuild {
}
object PublishResult {
def apply(evalResult: TaskEvaluator.EvalResult[Unit]): PublishResult = {
val failureContext = evalResult.toBuildError
val status = failureContext match {
case Some(FailureContext.BuildError(reasons)) if reasons.exists(_.contains("java.util.NoSuchElementException")) => Status.Skipped
case _ => evalResult.toStatus
}
PublishResult(
evalResult.toStatus,
failureContext = evalResult.toBuildError,
status,
failureContext = failureContext,
tookMs = evalResult.evalTime
)
}
Expand Down Expand Up @@ -463,7 +468,7 @@ object Scala3CommunityBuild {
case segments =>
logOnce(s"Invalid dependency format, segments=${segments.toList}")
None
}.map{ dep =>
}.toList.map{ dep =>
logOnce(s"Would include extra dependency: $dep")
dep
}
Expand Down

0 comments on commit 94d3e3e

Please sign in to comment.