dune
dune copied to clipboard
Named targets feature
This is the first of two commits implementing named targets support, as discussed in #3309
Changes in this PR:
- Adds support for
(targets (:name file) ...)syntax - Defines
Static.namedtype in Targets_spec - Parses bindings without changing evaluation logic
- Verifies syntax with parse tests
Coming Next: The second commit will implement the actual variable expansion and validation:
- Target variable resolution (
%{target:name}) - Duplicate name prevention
- Full integration with action expansion
Test Plan:
- [x] Verify existing tests pass
- [x] Added syntax parsing tests
Just clarifying that we won't be able to merge this PR until it contains both the parser for the new named targets syntax and the ability to resolve named targets. I like the idea of keeping these two stages separate for ease of implementation/review, so keeping them as separate commits in the same PR makes sense (I can review them commit-by-commit rather than reviewing the entire PR at once).