Skip to main content

PackageSpec

Struct PackageSpec 

Source
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: String

Full import path, e.g. akeyless.io/akeyless-main-repo/go/src/microservices/auth.

§kind: PackageKind

Std | Module | Main (Cgo/Tool are deferred to M-cgo).

§source: PackageSource

Vendored { relative_path } | Std.

§tree: BuildTree

The 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.

§build_tags: Vec<String>

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: String

BLAKE3 over (sorted go_filesembed.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

Source§

fn clone(&self) -> PackageSpec

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PackageSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PackageSpec

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PackageSpec

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.