Skip to main content

Crate gen_gomod

Crate gen_gomod 

Source
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 borderbuild_spec (the v2 shape + the v1 coarse submod).
  • Lisp specspecs/go-package-build.lisp + specs/adapter.lisp.
  • Interpreterinterp (apply(env, ctx) -> BuildSpec), with every side effect behind the interp::GoBuildEnv trait.

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 canonical gen_types::Adapter trait.
build_spec
Go.build-spec.json — the canonical typed build manifest for the gomod ecosystem.
emit
Go.build-spec.json emission — the operator-facing write surface.
error
gen_delta
Go.gen.lock — the slim resolver-delta for the gomod ecosystem.
golist
go list -deps -json typed model + stream parser.
gomod
go.modModuleSpec parser.
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::QuirkRegistry via #[derive(QuirkRegistry)].
testkit
Test support — a deterministic, filesystem-free GoBuildEnv.