Repository navigation
Expand file tree
/
Copy pathgo.work
More file actions
31 lines (29 loc) · 1.8 KB
/
Copy pathgo.work
File metadata and controls
31 lines (29 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Local development only. This file is what makes `gateway/kube` compile against the gateway core in
// YOUR checkout, without a `replace` directive.
//
// The distinction is the whole point, and it cost us a blocker: a `replace` in gateway/kube/go.mod
// applies ONLY to the main module. Inside this repo it works, and every test passes — but a consumer
// running `go get github.com/ConfigButler/krm-stream/gateway/kube` IGNORES it, resolves the core
// module at the literal version in the require line, and fails:
//
// reading github.com/ConfigButler/krm-stream/gateway/go.mod
// at revision gateway/v0.0.0: unknown revision gateway/v0.0.0
//
// Nothing inside this repository could catch that, because the replace hid it from every test we
// have. So the require line now names a REAL, resolvable version of the core module, and this
// go.work — which consumers never see — is what points it back at the working tree for us.
//
// The check that this stays true lives in CI (`a stranger can go get this`), and it deliberately runs
// from a clean module OUTSIDE this workspace, because that is the only place the bug is visible.
go 1.27.1
use (
./gateway
./gateway/kube
)
// The adapter requires the core at the release it ships with, and a release PR names a version whose
// tag does not exist until it merges. Workspace mode still reads the required version's go.mod, so
// without this every build of the adapter in a release PR fails ("unknown revision gateway/vX.Y.Z").
// This points that exact version at the working tree. Go refuses an unversioned replace of a
// workspace module, so the version is spelled out, and Release Please moves it together with
// gateway/kube/go.mod; CI fails if the two disagree.
replace github.com/ConfigButler/krm-stream/gateway v0.10.0 => ./gateway // x-release-please-version