Use a set when collecting tulsiinfo artifacts

On certain projects, artifact paths will
be outputted multiple times when building.

Previously this would lead to duplicated
RuleEntries when parsing, which was okay
when overriden by the same file.

--
PiperOrigin-RevId: 171536054
MOS_MIGRATED_REVID=171536054
diff --git a/src/TulsiGenerator/BazelAspectInfoExtractor.swift b/src/TulsiGenerator/BazelAspectInfoExtractor.swift
index 596d635..56db82c 100644
--- a/src/TulsiGenerator/BazelAspectInfoExtractor.swift
+++ b/src/TulsiGenerator/BazelAspectInfoExtractor.swift
@@ -87,7 +87,7 @@
                                                                message: "Extracting info for \(targets.count) rules")
 
     let semaphore = DispatchSemaphore(value: 0)
-    var artifacts = [String]()
+    var artifacts = Set<String>()
     var processDebugInfo: String? = nil
     let process = bazelAspectProcessForTargets(targets.map({ $0.value }),
                                                aspect: "tulsi_sources_aspect",
@@ -99,7 +99,7 @@
         defer { semaphore.signal() }
         processDebugInfo = debugInfo
         if let generatedArtifacts = generatedArtifacts {
-          artifacts = generatedArtifacts.filter { $0.hasSuffix(".tulsiinfo") }
+          artifacts = Set(generatedArtifacts.filter { $0.hasSuffix(".tulsiinfo") })
         }
     }
 
@@ -167,7 +167,7 @@
                                           localizedMessageLogger: localizedMessageLogger)
       do {
         let events = try reader.readAllEvents()
-        let artifacts = events.flatMap { $0.files.lazy.filter { $0.hasSuffix(".tulsiinfo") } }
+        let artifacts = Set(events.flatMap { $0.files.lazy.filter { $0.hasSuffix(".tulsiinfo") } })
 
         if !artifacts.isEmpty {
           extractedEntries = self.extractRuleEntriesFromArtifacts(artifacts,
@@ -305,7 +305,7 @@
   }
 
   /// Builds a list of RuleEntry instances using the data in the given set of .tulsiinfo files.
-  private func extractRuleEntriesFromArtifacts(_ files: [String],
+  private func extractRuleEntriesFromArtifacts(_ files: Set<String>,
                                                progressNotifier: ProgressNotifier? = nil) -> [BuildLabel: RuleEntry] {
     let fileManager = FileManager.default