Go modules build and test without a struo.toml
Struo now recognizes a Go module from its go.mod and asks the Go command for
its packages, tests, and dependencies. struo build and struo test work on
an existing Go repository with no configuration, including repositories with
several modules, local replace directives, vendored dependencies, and cgo.
Native go.work selection includes every workspace member's requirements and
workspace-level replacements. Imported member sources and local manifests
that affect version selection are build inputs. Workspace vendor trees build
offline after go work vendor.
Builds read dependencies from the vendor directory, a local replacement, or a
cacheable module download verified by native Go against go.sum. A package
waits only for the external modules it imports; compilation itself stays
offline. Experimental graph-owned resolution acquires module manifests and
runs minimal version selection before evaluating packages against the settled
versions. An unrelated source download does not block a ready package.
Generated module targets are directly selectable. Read-only graph queries require
a complete, current catalog; targetless struo test discovers the tests first,
while incomplete graphs fail explicitly rather than omitting tests.
Builds preserve native dependency files. Experimental requirement/checksum
proposals support modules and workspaces, authenticate missing sums with native
exact-version requests, and apply only through an explicit guarded source edit.
These proposals conservatively retain requirements instead of running native
tidy, get, or work sync. All Go actions share one Go build cache, so the standard
library compiles once per workspace. A changed file selects only the tests of the packages that build
it, embed it, read it from their package directory or testdata, or name it.
A changed cgo header rebuilds the packages that include it.