Remove enableConsistentCompileAnalysis & enableBinaryCompileAnalysis

This commit is contained in:
friendseeker 2024-11-16 13:36:15 -08:00
parent 312f1a0782
commit 1ec08180f7
No known key found for this signature in database
GPG Key ID: 7DD5039728A27160
5 changed files with 6 additions and 18 deletions

View File

@ -867,14 +867,6 @@ object Defaults extends BuildCommon {
} }
} }
def defaultCompileSettings: Seq[Setting[?]] =
globalDefaults(
Seq(
enableBinaryCompileAnalysis :== true,
enableConsistentCompileAnalysis :== SysProp.analysis2024,
)
)
lazy val configTasks: Seq[Setting[?]] = docTaskSettings(doc) ++ lazy val configTasks: Seq[Setting[?]] = docTaskSettings(doc) ++
inTask(compile)(compileInputsSettings) ++ inTask(compile)(compileInputsSettings) ++
inTask(compileJava)( inTask(compileJava)(
@ -893,7 +885,7 @@ object Defaults extends BuildCommon {
} }
) )
) ++ ) ++
configGlobal ++ defaultCompileSettings ++ compileAnalysisSettings ++ Seq( configGlobal ++ compileAnalysisSettings ++ Seq(
compileOutputs := { compileOutputs := {
import scala.jdk.CollectionConverters.* import scala.jdk.CollectionConverters.*
val c = fileConverter.value val c = fileConverter.value
@ -2530,8 +2522,8 @@ object Defaults extends BuildCommon {
private inline def analysisStore(inline analysisFile: TaskKey[File]): AnalysisStore = private inline def analysisStore(inline analysisFile: TaskKey[File]): AnalysisStore =
MixedAnalyzingCompiler.staticCachedStore( MixedAnalyzingCompiler.staticCachedStore(
analysisFile.value.toPath, analysisFile = analysisFile.value.toPath,
!enableBinaryCompileAnalysis.value useTextAnalysis = false,
) )
def printWarningsTask: Initialize[Task[Unit]] = def printWarningsTask: Initialize[Task[Unit]] =

View File

@ -237,8 +237,6 @@ object Keys {
val scalaCompilerBridgeSource = settingKey[ModuleID]("Configures the module ID of the sources of the compiler bridge when scalaCompilerBridgeBinaryJar is None").withRank(CSetting) val scalaCompilerBridgeSource = settingKey[ModuleID]("Configures the module ID of the sources of the compiler bridge when scalaCompilerBridgeBinaryJar is None").withRank(CSetting)
val scalaCompilerBridgeScope = taskKey[Unit]("The compiler bridge scope.").withRank(DTask) val scalaCompilerBridgeScope = taskKey[Unit]("The compiler bridge scope.").withRank(DTask)
val scalaArtifacts = settingKey[Seq[String]]("Configures the list of artifacts which should match the Scala binary version").withRank(CSetting) val scalaArtifacts = settingKey[Seq[String]]("Configures the list of artifacts which should match the Scala binary version").withRank(CSetting)
val enableBinaryCompileAnalysis = settingKey[Boolean]("Writes the analysis file in binary format").withRank(DSetting)
val enableConsistentCompileAnalysis = settingKey[Boolean]("Writes the analysis file in consistent binary format").withRank(DSetting)
val crossJavaVersions = settingKey[Seq[String]]("The java versions used during JDK cross testing").withRank(BPlusSetting) val crossJavaVersions = settingKey[Seq[String]]("The java versions used during JDK cross testing").withRank(BPlusSetting)
val semanticdbEnabled = settingKey[Boolean]("Enables SemanticDB Scalac plugin").withRank(CSetting) val semanticdbEnabled = settingKey[Boolean]("Enables SemanticDB Scalac plugin").withRank(CSetting)
val semanticdbCompilerPlugin = settingKey[ModuleID]("SemanticDB Scalac plugin").withRank(CSetting) val semanticdbCompilerPlugin = settingKey[ModuleID]("SemanticDB Scalac plugin").withRank(CSetting)

View File

@ -31,7 +31,7 @@ private[sbt] object AnalysisUtil {
MixedAnalyzingCompiler.staticCachedStore( MixedAnalyzingCompiler.staticCachedStore(
analysisFile = analysisFile, analysisFile = analysisFile,
useTextAnalysis = useTextAnalysis, useTextAnalysis = useTextAnalysis,
useConsistent = false, useConsistent = useConsistent,
mappers = ReadWriteMappers.getEmptyMappers(), mappers = ReadWriteMappers.getEmptyMappers(),
sort = true, sort = true,
ec = ExecutionContext.global, ec = ExecutionContext.global,

View File

@ -155,8 +155,6 @@ object SysProp {
def useLog4J: Boolean = getOrFalse("sbt.log.uselog4j") def useLog4J: Boolean = getOrFalse("sbt.log.uselog4j")
def turbo: Boolean = getOrFalse("sbt.turbo") def turbo: Boolean = getOrFalse("sbt.turbo")
def pipelining: Boolean = getOrFalse("sbt.pipelining") def pipelining: Boolean = getOrFalse("sbt.pipelining")
// opt-in or out of Zinc's consistent Analysis format.
def analysis2024: Boolean = getOrTrue("sbt.analysis2024")
def taskTimings: Boolean = getOrFalse("sbt.task.timings") def taskTimings: Boolean = getOrFalse("sbt.task.timings")
def taskTimingsOnShutdown: Boolean = getOrFalse("sbt.task.timings.on.shutdown") def taskTimingsOnShutdown: Boolean = getOrFalse("sbt.task.timings.on.shutdown")

View File

@ -213,8 +213,8 @@ private[sbt] object Definition {
s.log.debug(s"analysis location ${cacheFile}") s.log.debug(s"analysis location ${cacheFile}")
updateCache(AnalysesAccess.cache)( updateCache(AnalysesAccess.cache)(
cacheFile = cacheFile, cacheFile = cacheFile,
useBinary = enableBinaryCompileAnalysis.value, useBinary = true,
useConsistent = enableConsistentCompileAnalysis.value, useConsistent = true,
) )
} }