rig.stack.jsonc the members
go.work generated by `rig stack wire`
lib/ a library you forked → PR to its upstream
app/ your own app → `rig stack push`
app requires the library by module path, as anyone would:
require github.com/acme/pty-core v1.0.0
Being next to it changes nothing. Go resolves a module path through the
proxy however close the sources are, so without a go.work this fetches a
published copy and your edits are invisible:
cd app && GOPROXY=off go build ./...
# go: downloading github.com/acme/pty-core v1.0.0
# module lookup disabled by GOPROXY=offrig stack wire writes a go.work listing every module in the tree, and the
same build passes — which it can only do by reading the sources here.
One detail worth knowing if you write the file yourself: it must declare a go
version at least as high as any module it lists. A go.work without that line
is implicitly Go 1.18 and refuses to load anything newer, with an error a long
way from its cause.