Skip to content

Add cross-spec substitution in @init: specs can reference earlier specs#255

Merged
ocots merged 1 commit intomainfrom
init-alias
Apr 16, 2026
Merged

Add cross-spec substitution in @init: specs can reference earlier specs#255
ocots merged 1 commit intomainfrom
init-alias

Conversation

@ocots
Copy link
Copy Markdown
Member

@ocots ocots commented Apr 16, 2026

  • Modify _collect_init_specs to store (pattern, rhs) for each spec
  • Apply substitution on RHS of subsequent specs using subs from utils.jl
  • Support all combinations: temporal→temporal, constant→temporal, constant→constant
  • Substitution on RHS only (post-matching) to avoid LHS corruption
  • Store already-substituted RHS for transitive dependency resolution
  • Add 7 testsets covering all combinations and edge cases
  • Update docstring to document cross-spec substitution behavior

Close #254.

- Modify _collect_init_specs to store (pattern, rhs) for each spec
- Apply substitution on RHS of subsequent specs using subs from utils.jl
- Support all combinations: temporal→temporal, constant→temporal, constant→constant
- Substitution on RHS only (post-matching) to avoid LHS corruption
- Store already-substituted RHS for transitive dependency resolution
- Add 7 testsets covering all combinations and edge cases
- Update docstring to document cross-spec substitution behavior
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

Breakage test results
Date: 2026-04-16 11:03:19

Name Latest Stable
OptimalControl compat: v0.8.13 compat: v0.8.13

@ocots ocots merged commit 0e175e4 into main Apr 16, 2026
11 checks passed
@ocots ocots deleted the init-alias branch April 16, 2026 12:07
@ocots ocots mentioned this pull request Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dev] Init macro - Alias

2 participants