@@ -181,7 +181,7 @@ package final class BuildDescriptionManager: Sendable {
181181 var rootPathsPerTarget = [ ConfiguredTarget: [ Path] ] ( )
182182 var moduleCachePathsPerTarget = [ ConfiguredTarget: [ Path] ] ( )
183183
184- var casValidationInfos : Set < BuildDescription . CASValidationInfo > = [ ]
184+ var casValidationInfos : OrderedSet < BuildDescription . CASValidationInfo > = [ ]
185185 let buildGraph = planRequest. buildGraph
186186 let shouldValidateCAS = Settings . supportsCompilationCaching ( plan. workspaceContext. core) && UserDefaults . enableCASValidation
187187
@@ -208,7 +208,7 @@ package final class BuildDescriptionManager: Sendable {
208208 if let casOpts = try ? CASOptions . create ( settings. globalScope, purpose) {
209209 let execName = settings. globalScope. evaluate ( BuiltinMacros . VALIDATE_CAS_EXEC) . nilIfEmpty ?? " llvm-cas "
210210 if let execPath = settings. executableSearchPaths. lookup ( Path ( execName) ) {
211- casValidationInfos. insert ( . init( options: casOpts, llvmCasExec: execPath) )
211+ casValidationInfos. append ( . init( options: casOpts, llvmCasExec: execPath) )
212212 }
213213 }
214214 }
@@ -246,7 +246,7 @@ package final class BuildDescriptionManager: Sendable {
246246 }
247247
248248 // Create the build description.
249- return try await BuildDescription . construct ( workspace: buildGraph. workspaceContext. workspace, tasks: plan. tasks, path: path, signature: signature, buildCommand: planRequest. buildRequest. buildCommand, diagnostics: planningDiagnostics, indexingInfo: [ ] , fs: fs, bypassActualTasks: bypassActualTasks, targetsBuildInParallel: buildGraph. targetsBuildInParallel, emitFrontendCommandLines: plan. emitFrontendCommandLines, moduleSessionFilePath: planRequest. workspaceContext. getModuleSessionFilePath ( planRequest. buildRequest. parameters) , invalidationPaths: plan. invalidationPaths, recursiveSearchPathResults: plan. recursiveSearchPathResults, copiedPathMap: plan. copiedPathMap, rootPathsPerTarget: rootPathsPerTarget, moduleCachePathsPerTarget: moduleCachePathsPerTarget, casValidationInfos: casValidationInfos. sorted ( by: \. options. casPath) , staleFileRemovalIdentifierPerTarget: staleFileRemovalIdentifierPerTarget, settingsPerTarget: settingsPerTarget, delegate: delegate, targetDependencies: buildGraph. targetDependenciesByGuid, definingTargetsByModuleName: definingTargetsByModuleName, capturedBuildInfo: capturedBuildInfo, userPreferences: buildGraph. workspaceContext. userPreferences)
249+ return try await BuildDescription . construct ( workspace: buildGraph. workspaceContext. workspace, tasks: plan. tasks, path: path, signature: signature, buildCommand: planRequest. buildRequest. buildCommand, diagnostics: planningDiagnostics, indexingInfo: [ ] , fs: fs, bypassActualTasks: bypassActualTasks, targetsBuildInParallel: buildGraph. targetsBuildInParallel, emitFrontendCommandLines: plan. emitFrontendCommandLines, moduleSessionFilePath: planRequest. workspaceContext. getModuleSessionFilePath ( planRequest. buildRequest. parameters) , invalidationPaths: plan. invalidationPaths, recursiveSearchPathResults: plan. recursiveSearchPathResults, copiedPathMap: plan. copiedPathMap, rootPathsPerTarget: rootPathsPerTarget, moduleCachePathsPerTarget: moduleCachePathsPerTarget, casValidationInfos: casValidationInfos. elements, staleFileRemovalIdentifierPerTarget: staleFileRemovalIdentifierPerTarget, settingsPerTarget: settingsPerTarget, delegate: delegate, targetDependencies: buildGraph. targetDependenciesByGuid, definingTargetsByModuleName: definingTargetsByModuleName, capturedBuildInfo: capturedBuildInfo, userPreferences: buildGraph. workspaceContext. userPreferences)
250250 }
251251
252252 /// Encapsulates the two ways `getNewOrCachedBuildDescription` can be called, whether we want to retrieve or create a build description based on a plan or whether we have an explicit build description ID that we want to retrieve and we don't need to create a new one.
0 commit comments