dune icon indicating copy to clipboard operation
dune copied to clipboard

Named targets feature

Open create2000 opened this issue 10 months ago • 1 comments

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.named type 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:

  1. Target variable resolution (%{target:name})
  2. Duplicate name prevention
  3. Full integration with action expansion

Test Plan:

  • [x] Verify existing tests pass
  • [x] Added syntax parsing tests

create2000 avatar Apr 24 '25 22:04 create2000

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).

gridbugs avatar Apr 28 '25 01:04 gridbugs