Expand description
gen-gomod — gomod adapter for the gen ecosystem.
Parses go.mod + a vendored tree (via go list -deps -json) into a
typed per-package build_spec::BuildSpec (v2 incremental) and emits
it as Go.build-spec.json. See theory/ECOSYSTEM-INTAKE.md for the
seven-artifact contract and the M1 build doc for the per-package
(rustc-per-crate-in-Go) delta.
The TYPED-SPEC + INTERPRETER TRIPLET:
- Rust border —
build_spec(the v2 shape + the v1coarsesubmod). - Lisp spec —
specs/go-package-build.lisp+specs/adapter.lisp. - Interpreter —
interp(apply(env, ctx) -> BuildSpec), with every side effect behind theinterp::GoBuildEnvtrait.
Re-exports§
pub use adapter::GomodAdapter;pub use build_spec::BuildSpec;pub use build_spec::PackageKind;pub use build_spec::PackageSpec;pub use build_spec::SCHEMA_VERSION;pub use emit::generate_and_write;pub use emit::generate_for_target_and_write;pub use emit::SPEC_FILENAME;pub use error::GomodError;pub use error::Result;pub use interp::apply;pub use interp::EncodeCtx;pub use interp::GoBuildEnv;pub use interp::RealGoBuildEnv;
Modules§
- adapter
GomodAdapter— gen-gomod’s implementation of the canonicalgen_types::Adaptertrait.- build_
spec Go.build-spec.json— the canonical typed build manifest for the gomod ecosystem.- emit
Go.build-spec.jsonemission — the operator-facing write surface.- error
- gen_
delta Go.gen.lock— the slim resolver-delta for the gomod ecosystem.- golist
go list -deps -jsontyped model + stream parser.- gomod
go.mod→ModuleSpecparser.- interp
- The triplet interpreter (item 3) —
apply(env, ctx) -> BuildSpec. - invariants
- Algorithmic invariants over the gomod v2
BuildSpec. - quirks
- Typed quirk registry for gomod. Implements
gen_types::QuirkRegistryvia#[derive(QuirkRegistry)]. - testkit
- Test support — a deterministic, filesystem-free
GoBuildEnv.