GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: check kept_artifact in run_vendor_gc to prevent orphan sweep · SocketDev/socket-patch@dfde23a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • crates/socket-patch-cli/src/commands
    • vendor.rs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎crates/socket-patch-cli/src/commands/vendor.rs‎

Copy file name to clipboardExpand all lines: crates/socket-patch-cli/src/commands/vendor.rs
+14-8Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,10 +1568,13 @@ pub(crate) async fn run_vendor_gc(
15681568
continue;
15691569
}
15701570
let entry = state.entries.get(&purl).cloned().expect("listed above");
1571-
if dispatch_revert_one(&entry, &common.cwd, false)
1572-
.await
1573-
.success
1574-
{
1571+
let outcome = dispatch_revert_one(&entry, &common.cwd, false).await;
1572+
if outcome.success {
1573+
if outcome.kept_artifact {
1574+
// Drift-skip keep: backend kept the uuid dir, so the ledger
1575+
// entry must survive too (same contract as reconcile_dropped).
1576+
continue;
1577+
}
15751578
state.entries.remove(&purl);
15761579
out.dropped_reverted.push(purl);
15771580
} else {
@@ -1601,13 +1604,16 @@ pub(crate) async fn run_vendor_gc(
16011604
out.unused_reverted.push(purl);
16021605
continue;
16031606
}
1604-
if !dispatch_revert_one(&entry, &common.cwd, false)
1605-
.await
1606-
.success
1607-
{
1607+
let outcome = dispatch_revert_one(&entry, &common.cwd, false).await;
1608+
if !outcome.success {
16081609
out.failed.push(purl);
16091610
continue;
16101611
}
1612+
if outcome.kept_artifact {
1613+
// Drift-skip keep: backend kept the uuid dir, so the ledger
1614+
// entry must survive too (same contract as reconcile_dropped).
1615+
continue;
1616+
}
16111617
state.entries.remove(&purl);
16121618
if let Some(m) = manifest.as_mut() {
16131619
let base = strip_purl_qualifiers(&entry.base_purl).to_string();

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.