Skip to content

Commit

Permalink
Don't drop forks
Browse files Browse the repository at this point in the history
  • Loading branch information
finestructure committed Jan 3, 2024
1 parent 1954f94 commit 39b212b
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions Sources/ValidatorCore/Commands/CheckDependencies2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public struct CheckDependencies2: AsyncParsableCommand {
defer { try? client.syncShutdown() }

var newPackages = UniqueCanonicalPackageURLs()
var notAddedBecauseFork = 0
for (idx, dep) in missing
.sorted(by: { $0.packageURL.absoluteString < $1.packageURL.absoluteString })
.enumerated() {
Expand All @@ -77,18 +76,6 @@ public struct CheckDependencies2: AsyncParsableCommand {
print(" ... ⛔ already indexed")
continue
}
do { // drop forks
let repo = try await Current.fetchRepositoryAsync(client, resolved)
guard !repo.fork else {
print(" ... ⛔ fork")
notAddedBecauseFork += 1
continue
}
} catch {
print(" ... ⛔ \(error)")
continue
}
// TODO: drop no products?
if newPackages.insert(resolved.appendingGitExtension().canonicalPackageURL).inserted {
print("✅ ADD (\(newPackages.count)):", resolved.appendingGitExtension())
}
Expand All @@ -104,7 +91,6 @@ public struct CheckDependencies2: AsyncParsableCommand {
.enumerated() {
print(" ✅ ADD", idx, p.packageURL)
}
print("Not added because they are forks:", notAddedBecauseFork)

// merge with existing and sort result
let input = allPackages.map { $0.packageURL }
Expand Down

0 comments on commit 39b212b

Please sign in to comment.