Remove dead lockfile.refresh_lockfile; fix module docstring (#99) - #124
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
💤 Files with no reviewable changes (2)
Removed the dead Updated
Also clarified the rationale for the two Cargo strategies, noting that Documentation was brought in line with the implementation in WalkthroughThis PR removes the unused ChangesLockfile regeneration removal
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 20✅ Passed checks (20 passed)
📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Reviewer's GuideRemoves the unused lockfile regeneration helper and its exception type in favor of the existing bump-side regeneration path, and updates documentation and exception references to describe the real publish/bump lockfile flows and cargo strategies. Flow diagram for updated publish vs bump lockfile handlingflowchart LR
subgraph Publish_flow
P[lading_publish]
D[discover_tracked_lockfiles]
V[validate_lockfile_freshness]
C1[cargo metadata --locked]
P --> D
D --> V
V --> C1
end
subgraph Bump_flow
B[lading_bump]
R[regenerate_lockfiles]
C2[cargo update --workspace]
B --> R
R --> C2
end
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
refresh_lockfile ran cargo generate-lockfile but was called only by its own unit tests: the bump path regenerates lockfiles via bump_lockfiles.regenerate_lockfiles (cargo update --workspace). The lockfile.py module docstring also described a call graph that does not exist, claiming lading bump calls discover_tracked_lockfiles followed by refresh_lockfile. Delete refresh_lockfile, its LockfileRefreshError class, and their tests. Correct the module docstring to describe the real call graph and explain why the two cargo strategies differ: bump refreshes pinned versions in place after manifest rewrites, while publish only probes freshness read-only under --locked. Update the developers' guide and the exceptions catalogue to match. Closes #99
b15004a to
a6022c5
Compare
Summary
Closes #99
refresh_lockfile(rancargo generate-lockfile, called only by its own unit tests) and itsLockfileRefreshErrorclass — the bump path regenerates lockfiles viabump_lockfiles.regenerate_lockfiles(cargo update --workspace).lockfile.pymodule docstring, which described a call graph that does not exist (claimed bump callsdiscover_tracked_lockfiles+refresh_lockfile). It now documents the real call graph: publish usesdiscover_tracked_lockfiles+validate_lockfile_freshness; bump usesbump_lockfiles.regenerate_lockfiles.--locked.docs/developers-guide.mdand the exceptions catalogue updated to match.Rebase onto
mainSince this branch was opened,
maingrew a metrics surface around the (still dead)refresh_lockfilevia issue #91 / #134. Completing the deletion on top of currentmaintherefore also removes that now-orphaned surface:lockfile.refresh/lockfile.refresh.durationmetric constants and the unusedwith_detailimport fromlockfile.py;lockfile.discoveredandlockfile.validate(and their durations) remain.refresh_lockfilemetrics tests and thetest_lockfile_refresh_failure_messagesnapshot test (plus its.ambrentry), and delete the twolockfile.refresh*rows from the developers-guide metrics table.docs/developers-guide.md.Testing
refresh_lockfiletests are removed with the function.make check-fmt,make lint,make typecheck, andmake test(676 passed, 60 snapshots) all green after rebasing onto currentmain;make markdownlintandmake nixiealso green.🤖 Generated with Claude Code
Summary by Sourcery
Remove unused lockfile regeneration helper and align documentation with the current lockfile management workflow.
Enhancements:
Documentation:
Tests:
References