                                                                message: "Extracting info for \(targets.count) rules")
 
     let semaphore = DispatchSemaphore(value: 0)
-    var extractedEntries = [BuildLabel: RuleEntry]()
+    var artifacts = [String]()
+    var processDebugInfo: String? = nil
     let process = bazelAspectProcessForTargets(targets.map({ $0.value }),
                                                aspect: "tulsi_sources_aspect",
                                                startupOptions: startupOptions,

                                               progressNotifier: progressNotifier) {
      (process: Process, generatedArtifacts: [String]?, debugInfo: String) -> Void in
        defer { semaphore.signal() }
        let artifacts = generatedArtifacts?.filter { $0.hasSuffix(".tulsiinfo") }

        if process.terminationStatus == 0,
          let artifacts = artifacts, !artifacts.isEmpty {
          extractedEntries = self.extractRuleEntriesFromArtifacts(artifacts,
                                                                  progressNotifier: progressNotifier)
        } else {
          self.queuedInfoMessages.append(debugInfo)
          self.localizedMessageLogger.error("BazelInfoExtractionFailed",
                                            comment: "Error message for when a Bazel extractor did not complete successfully. Details are logged separately.",
                                            details: BazelErrorExtractor.firstErrorLinesFromString(debugInfo))
        }
    }


      process.currentDirectoryPath = workspaceRootURL.path
      process.launch()
      _ = semaphore.wait(timeout: DispatchTime.distantFuture)

      guard process.terminationStatus == 0 else {
        let debugInfo = processDebugInfo ?? "<No Debug Info>"
        localizedMessageLogger.infoMessage(debugInfo)
        localizedMessageLogger.error("BazelInfoExtractionFailed",
                                     comment: "Error message for when a Bazel extractor did not complete successfully. Details are logged separately.",
                                     details: BazelErrorExtractor.firstErrorLinesFromString(debugInfo))
        throw ExtractorError.buildFailed
      }

