| 269 | reached.add(dependent) |
| 270 | stack.append(dependent) |
| 271 | return reached |
| 272 | |
| 273 | |
| 274 | def lock_affected_members(base, head, member_names): |
| 275 | """Attribute a Cargo.lock diff to the workspace members it can affect. |
| 276 | |
| 277 | A lock entry change (version bump, checksum change, dependency-edge |
| 278 | change, add/remove) affects exactly the workspace members that |
| 279 | transitively depend on the changed package -- the lock itself records |
| 280 | that graph, so no cargo invocation is needed. Returns the affected |
| 281 | member-name set, or None when attribution is unsafe (unreadable lock, |
| 282 | lockfile format-version change) and the caller should fall back to the |
| 283 | full workspace. |
| 284 | """ |
| 285 | mb = run(["git", "merge-base", base, head]) |