Skip to content

Build Package Configuration System #6

Description

@Kinflou

Build Package Configuration System

Updated 2026-08-30 to match what shipped. The config system was rebuilt on
the rust-sitter parser (#11): the package manifest is config.idp (the
congregation format, an .idp file), parsed and interpreted into frozen
units and wired into CAS (#4). comline.toml is no longer the manifest —
that name is now the consumer-side code-generation config, a separate concern
with its own design doc
(docs/.../planning/code-generation/output-configuration.md). The remaining
open scope of this issue is cross-package dependency resolution.

Priority

P1 (High) - Enables multi-schema projects

Labels

  • core
  • package
  • configuration
  • P1

Description

Implement the package configuration system that allows multi-schema projects with
dependencies. This covers the config.idp (congregation) manifest — metadata,
code_generation capability declaration, publish_registries, and a
dependencies block — and resolving schema imports across packages.

Current State

Location: core/src/package/config/

  • ✅ Manifest format: config.idp / congregation (rust-sitter grammar in
    package/config/idl/, interpreter in package/config/ir/).
  • ✅ Parsed → Vec<FrozenUnit> (Namespace, SpecificationVersion,
    Dependency, CodeGeneration, PublishRegistry).
  • ✅ Build pipeline: compile_package() (validate only) and build() (freeze
    into CAS, Implement Content Addressable Storage (CAS) System #4); auto-versioning via the diff engine (Implement Schema Diffing & Auto-Versioning #7).
  • ❌ Dependencies: a dependencies = { name = { version, uri, hash } } block
    parses, but nothing is fetched, pinned, resolved or stored. The frozen
    Dependency struct currently keeps only author / project / version
    (drops uri / hash). No dependency graph, no circular-dependency detection.
  • ❌ The frozen config is not written into a CAS commit (only frozen schemas
    are) — a reproducibility gap noted in the codegen output-config doc.

Acceptance Criteria

  • Manifest format (config.idp / congregation) defined
  • Manifest parser implemented (rust-sitter)
  • Package build pipeline functional (compile_package / build)
  • Integration with CAS system (Implement Content Addressable Storage (CAS) System #4)
  • Manifest format documented
  • Schema dependency resolution working
  • Circular dependency detection
  • Frozen config committed into CAS (reproducibility)
  • Example multi-package project works end-to-end

Tasks

  • Decide dependency source(s) — local path, registry uri, git — and the
    integrity model (the hash = "blake3:…" field is already in the grammar).
  • Keep uri / hash on the frozen Dependency unit.
  • Create package resolution algorithm (topological sort) + dependency graph
    builder.
  • Circular dependency detection.
  • Fetch + cache dependency packages; load their frozen schemas via CAS.
  • Commit the frozen config into each version's CAS tree.
  • Multi-package test cases.
  • Document the config.idp manifest.

Example config.idp

congregation my_api
specification_version = 1

code_generation = {
    languages = {
        rust#1.70.0 = { package_versions = [all] }
    }
}

publish_registries = {
    mainstream = std::publish::MAINSTREAM_REGISTRY
}

dependencies = {
    stdlib = { version = "1.0.0", uri = "comline://registry.comline.io/stdlib", hash = "blake3:…" }
}

Consumer-side codegen output (comline.toml [generate]) is not part of the
manifest — see the code-generation output-configuration doc.

Dependencies

Blocks

None.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Priority 1 - HighconfigurationConfigurationpackagePackage system

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions