Designs#44
Open
TimWhiting wants to merge 6 commits intoproj/rust-rewritefrom
Open
Conversation
08864e0 to
2c7b06b
Compare
pixilcode
approved these changes
May 5, 2026
Collaborator
pixilcode
left a comment
There was a problem hiding this comment.
I went through commit by commit to review, I think everything looks good. I added a couple small changes, although they don't change the functionality at all. Feel free to use them or discard them.
2c7b06b to
bf08274
Compare
- Add two-pass instance graph ADR - Add architecture guide for design overlays - Add designs-and-imports spec - Update grammar spec - Update README - Update vscode syntax highlighting for new keywords Co-authored-by: Cursor <cursoragent@cursor.com>
- Add DesignOverlay, DesignApplication, and DesignProvenance to oneil_ir - Add EvalInstanceKey and RelativePath to oneil_shared - Extend oneil_ir expressions with Variable classification (Parameter/Builtin/External) - Extend oneil_ir model, model_import, parameter, and unit for instance graph - Extend oneil_ast declarations for submodel/reference/alias/design syntax - Add instance_path.rs and extend paths.rs in oneil_shared Co-authored-by: Cursor <cursoragent@cursor.com>
- Parse .one design files with design target and overlay declarations - Parse submodel, reference, and alias import declarations (replacing old use/ref) - Parse extraction lists ([a as b, ...]) in submodel declarations - Update keywords: submodel, reference, alias, design - Improve parser error messages for new syntax Co-authored-by: Cursor <cursoragent@cursor.com>
…ation - Replace oneil_resolver with oneil_frontend: resolver + instance graph crates merged - Implement two-pass compilation: per-unit resolution then design composition - Build InstanceGraph with tree-structured InstancedModel nodes - Apply design overlays via apply_chain with copy-on-write submodel instances - Implement post-build validation: undefined parameters/references, parameter cycles - Fold variable classification (classify_variables) into validation pass - Unify error handling: InstanceValidationError and ContributionDiagnostic on InstanceGraph - Surface generic "submodel has errors" diagnostics at import sites - Make submodels/references/aliases maps explicitly disjoint on InstancedModel - Remove design_target_declared dead-code guard (parser enforces the invariant) Co-authored-by: Cursor <cursoragent@cursor.com>
- Rewrite eval to operate over InstanceGraph: seed subtree, evaluate per-instance - Replace IrCache/TemplateCache with UnitGraphCache and EvalCache (keyed by EvalInstanceKey) - Remove ExternalEvaluationContext::build_graph shim; runtime builds graphs directly - Fold classify_variables into validate_instance_graph (pre-validation classification pass) - Surface instance graph validation errors and contribution diagnostics via RuntimeError - Update LSP to publish static diagnostics from instance graph validation - Update CLI print_model_result to use unified ModelReference::references child map - Minimize EvalCache diff: keep existing ModelCache helpers, add only genuinely new methods Co-authored-by: Cursor <cursoragent@cursor.com>
- Add fixture files for design overlays, augmented refs, sibling designs, chain apply, with-clause extraction, overlay propagation, and error cases - Add snapshot tests covering: design application, parameter augmentation, reference params, local parameters, nested params, anchor scope, two instances, unit mismatch, wrong target, compilation cycles, and more - Remove old basic fixture files replaced by the new fixtures/ subdirectories - Add fixtures/README.md documenting fixture conventions Co-authored-by: Cursor <cursoragent@cursor.com>
bf08274 to
603ced1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've split the PR into commits that cover logically related changes (docs / frontend / eval / etc). The individual commits do not compile by themselves.
I'm targetting the docs branch for my docs for designs and the related changes to submodel / reference naming. That PR will come shortly.