pub struct PackageSpec {Show 13 fields
pub import_path: String,
pub kind: PackageKind,
pub source: PackageSource,
pub tree: BuildTree,
pub go_files: Vec<String>,
pub build_tags: Vec<String>,
pub embed: EmbedSpec,
pub imports: Vec<String>,
pub import_map: BTreeMap<String, String>,
pub module: Option<PackageModuleRef>,
pub source_hash: String,
pub args: GoPackageArgs,
pub quirks: Vec<GomodQuirk>,
}Expand description
ONE build-graph node = one Go package compiled for one target tuple.
Fields§
§import_path: StringFull import path, e.g.
akeyless.io/akeyless-main-repo/go/src/microservices/auth.
kind: PackageKindStd | Module | Main (Cgo/Tool are deferred to M-cgo).
source: PackageSourceVendored { relative_path } | Std.
tree: BuildTreeThe build-tree placement of THIS node (Go-I2 seam). Workload +
std nodes are Target; build-tool / cgo-host nodes are Host
(deferred kinds). M1 emits Target for every node — the seam
exists so M-cgo is a classifier-arm swap, not a rewrite.
go_files: Vec<String>The resolved file list — build constraints already applied by
the encoder for this tuple (Go-I6). Relative to the node’s
source root. Excludes _test.go.
The tuple’s build tags in effect (already applied to go_files;
kept for the compile invocation + audit provenance).
embed: EmbedSpec//go:embed — patterns + resolved files (drives -embedcfg).
imports: Vec<String>Import edges → other node keys in packages. The per-package
DAG; the interpreter builds importcfg from these (Go-I1).
import_map: BTreeMap<String, String>Vendor import rewrite map (go list ImportMap) — source import
path → actual package path, when they differ (vendored deps).
Carried so the interpreter can emit importmap lines.
module: Option<PackageModuleRef>Provenance — the owning module (own module vs a vendored dep).
source_hash: StringBLAKE3 over (sorted go_files ⧺ embed.files) content — the
incremental cache key + determinism/drift tie. (Nix’s derivation
hash is the actual store boundary; this is the encoder-side
content address for the delta path + gen check-spec drift.)
args: GoPackageArgs§quirks: Vec<GomodQuirk>Trait Implementations§
Source§impl Clone for PackageSpec
impl Clone for PackageSpec
Source§fn clone(&self) -> PackageSpec
fn clone(&self) -> PackageSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more