Skip to content

Commit 4693baa

Browse files
committed
Fill the module cache in go.work vex fixtures
vex reads which version a go.work workspace selects from its module graph in the module cache, and since its go.work replaces are checked from the workspace root, the go.work flavor of the lockfile fixtures left them out with go_version_not_selected. The fixture now puts the patched module's go.mod in its private cache, as `go mod download` would. Assisted-by: Claude Code:claude-opus-5-5
1 parent ff7a6aa commit 4693baa

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • crates/socket-patch-cli/tests/e2e_vex_lockfile

‎crates/socket-patch-cli/tests/e2e_vex_lockfile/golang.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ fn write_go_replace(fx: &Fx, file: GoFile, rhs: &str, sum: Option<&str>) {
497497
}
498498
GoFile::GoWork => {
499499
fx.put("go.mod", go_mod(GO_VERSION, None, false));
500+
fx.cache_go_mod(GO_MODULE, GO_VERSION);
500501
fx.put(
501502
"go.work",
502503
format!("go 1.21\n\nuse .\n\nreplace {GO_MODULE} {GO_VERSION} => {rhs}\n"),

0 commit comments

Comments
 (0)