Commit 6d685a4
refactor(cargo): patch crates in place; drop the [patch]-redirect backend + build guard (#107)
* refactor(cargo): patch crates in place; drop the [patch]-redirect backend + build guard
Simplify the cargo apply path to patch crates in place (vendored or
registry cache) like npm/pypi/gem, removing the project-local
`[patch]`-redirect backend and the build-time `socket-patch-guard`
setup wiring. Cargo now rolls back in place from before-blobs rather
than dropping a redirect.
Removed:
- core: `cargo_setup` (discover/update), `patch/cargo_config`,
`patch/cargo_redirect`, and `go_setup` (the build-time Go guard
package + templates).
- cli: cargo/go redirect dispatch in `apply`/`rollback`, cargo + Go
guard wiring in `setup`, and the now-dead setup/redirect tests.
Kept:
- Go `replace`-redirect (`go_redirect`/`go_mod_edit`/`copy_tree`): the
module cache is checksum-verified, so in-place patching fails
`go.sum` at build time — Go still needs the project-local copy.
- The `socket-patch-guard` crate and its build-integration test.
`copy_tree` is now gated on `golang` only. Docs (README, CLI_CONTRACT,
module headers) updated to drop the removed backends.
Builds clean across feature combos (default / none / all / cargo-only)
and the full suite passes (--no-fail-fast).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci: drop removed cargo-coexist suite + go-guard-template lint step
The simplification deleted `tests/e2e_cargo_coexist.rs` and the
`go_setup/templates/*.tmpl` files, but ci.yml still referenced them:
the e2e matrix listed `e2e_cargo_coexist` (no such target → fail) and
the lint-ecosystems job `cp`'d the now-absent Go guard templates for
gofmt/vet (cp → fail). Remove both; keep `guard_build_integration`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: remove the now-orphaned socket-patch-guard crate + stale references
With cargo patching in place (no `[patch]`-redirect) and `setup` no
longer wiring a build-time guard, the `socket-patch-guard` crate had no
consumer: nothing in cli/core references it, `setup` never writes it,
and its `.socket/cargo-patches/` + `SOCKET_PATCH_ROOT` machinery no
longer exists. Remove it and every dangling reference.
- Delete `crates/socket-patch-guard/` (crate, build.rs, README,
SAME_TICK_HEAL_RND.md, same_tick_heal_experiment.rs) and drop it from
the workspace members + Cargo.lock.
- Delete `guard_build_integration.rs`; drop the `guard_build_integration`
e2e matrix entry and the guard-template gofmt/vet step from ci.yml;
drop the `cargo publish -p socket-patch-guard` step from release.yml.
- CHANGELOG: rewrite the `[Unreleased]` cargo/guard entries to describe
what actually ships — cargo in-place patching (default feature) and
the Go `replace`-redirect backend — and drop the now-false
"cargo apply now redirects" Changed bullet.
- Drop the dead `SOCKET_PATCH_ROOT`/`SOCKET_PATCH_GUARD` env vars from
test scrub lists (no longer read in src; `SOCKET_PATCH_BIN` kept — the
gem Bundler plugin still uses it); repoint stale `setup_matrix_cargo`
doc-comments to surviving sibling suites; refresh CLI_CONTRACT prose.
Builds clean across feature combos; full suite passes (--no-fail-fast).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4d5ba3d commit 6d685a4
49 files changed
Lines changed: 312 additions & 8966 deletions
File tree
- .github/workflows
- crates
- socket-patch-cli
- src/commands
- tests
- socket-patch-core/src
- cargo_setup
- gem_setup
- go_setup
- templates
- patch
- socket-patch-guard
- src
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
| 43 | + | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 65 | | |
80 | 66 | | |
81 | 67 | | |
| |||
456 | 442 | | |
457 | 443 | | |
458 | 444 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | 445 | | |
470 | 446 | | |
471 | 447 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | 250 | | |
262 | 251 | | |
263 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
62 | 37 | | |
63 | 38 | | |
64 | 39 | | |
| |||
71 | 46 | | |
72 | 47 | | |
73 | 48 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 49 | | |
85 | 50 | | |
86 | 51 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | | - | |
413 | 411 | | |
414 | 412 | | |
| 413 | + | |
415 | 414 | | |
416 | 415 | | |
417 | 416 | | |
| |||
425 | 424 | | |
426 | 425 | | |
427 | 426 | | |
428 | | - | |
| 427 | + | |
429 | 428 | | |
430 | 429 | | |
431 | 430 | | |
| |||
0 commit comments