Skip to main content

Crate panproto_project

Crate panproto_project 

Source
Expand description

§panproto-project

Multi-file project assembly via schema coproduct for panproto.

Orchestrates parsing all files in a project directory into a unified project-level schema. The project schema is the coproduct (disjoint union) of per-file schemas, with cross-file edges for imports and type references.

§Two-pass approach

  1. Parse pass: For each file, detect language, parse via ParserRegistry, prefix vertex IDs with the file path.
  2. Resolve pass: Walk import vertices, match against exports in other file schemas, emit imports edges connecting them.

§Coproduct construction

The schema-level coproduct prefixes each file’s vertex names with the file path. Edges within a file retain their local structure. The result is a single Schema spanning the entire project.

The coproduct is universal: any morphism out of the project schema restricts to per-file morphisms. This means per-file diffs compose into project-level diffs automatically.

Re-exports§

pub use config::ProjectConfig;
pub use detect::DetectedPackage;
pub use error::ProjectError;

Modules§

cache
Incremental parsing cache for project assembly. Incremental parsing cache for project assembly.
config
Project manifest (panproto.toml) loading and generation. Project manifest (panproto.toml) loading, generation, and serialization.
detect
Language detection by file extension and package detection. Language detection by file extension, shebang, and configuration.
error
Error types for project assembly. Error types for project assembly operations.
resolve
Cross-file import resolution. Cross-file import resolution.

Structs§

ProjectBuilder
Builder for assembling a multi-file project into a unified schema.
ProjectSchema
A parsed project containing a unified schema and per-file metadata.
ProjectSchemaTree
A project schema stored as a Merkle tree of per-file schemas.

Functions§

build_project_tree
Build a project schema tree and store it in store.