Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Don't log error if we can resolve stable PC #6248

Merged
merged 1 commit into from Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -83,6 +83,12 @@ object MtagsResolver {
private val states =
new ConcurrentHashMap[String, State]()

def hasStablePresentationCompiler(scalaVersion: String): Boolean =
SemVer.isCompatibleVersion(
firstScala3PCVersion,
scalaVersion,
)

def isSupportedInOlderVersion(version: String): Boolean =
removedScalaVersions.contains(version)

Expand Down Expand Up @@ -153,7 +159,8 @@ object MtagsResolver {
s"Resolved latest nightly mtags version: $scalaVersion"
}
scribe.debug(msg)
case _: State.Failure =>
case _: State.Failure
if !hasStablePresentationCompiler(scalaVersion) =>
val errorMsg = resolveType match {
case ResolveType.Regular =>
s"Failed to resolve mtags for $scalaVersion"
Expand All @@ -163,6 +170,7 @@ object MtagsResolver {
s"Failed to resolve latest nightly mtags version: $scalaVersion"
}
scribe.info(errorMsg)
case _ =>
}
state
}
Expand Down Expand Up @@ -208,10 +216,7 @@ object MtagsResolver {
// Fallback to Stable PC version
case _: State.Failure
if resolveType != ResolveType.StablePC &&
SemVer.isCompatibleVersion(
firstScala3PCVersion,
scalaVersion,
) =>
hasStablePresentationCompiler(scalaVersion) =>
resolve(
scalaVersion,
None,
Expand Down