go_module_metadata
Resolver-owned metadata for one exact Go module version or local replacement.
go_module_resolution and
go_workspace generate these targets;
declare those entry points rather than constructing metadata targets manually.
Each target produces module.mod. A remote request also produces the native
module.json response. Native Go acquires the explicitly named version and
checks supplied go.sum records, using the configured module proxy and sumdb
policy when authentication requires them. A local replacement copies its
go.mod without network acquisition. Starlark reads the resulting manifest
to continue graph-owned selection.
Attributes#
| Attribute | Type | Default | Description |
|---|---|---|---|
module_path | string | required | Bare acquisition module path, without an @ selector. It may differ from the logical path after replacement. |
version | string | "" | Canonical exact version matching the module path, including exact pseudoversions and explicit +incompatible versions; empty for a local replacement. Branch names, version ranges, and queries such as latest are rejected before acquisition. |
local | string | "" | Workspace-relative local replacement directory |
checksums | list<string> | [] | Native checksum records for the requested version and its manifest |
source_checksum | bool | false | Acquire the source as well as its manifest to obtain authenticated source/checksum metadata for a proposal |
go | string | discovered Go command | Command used for exact-version acquisition |
_go_toolchain | map<string,string> | {} | Resolver-owned selected SDK identity |
_go_download_policy | map<string,string> | {} | Resolver-owned nonsecret acquisition and verification policy |
Provider and capability#
The target emits go_metadata, including the generated manifest path, and
exposes build with the default output group. Metadata requests are independent
graph actions, so unrelated manifest acquisitions can run concurrently.
Compile targets are published only after their version choices settle.
This target does not update source manifests or checksum files. It is not a general version-query API, and it does not provide execution-time private credential materialization. See Go acquisition limits.