Skip to content

Allow command to be optional if deps are present #572

Description

@leynos

Problem

An aggregate action that exists only to order or group dependencies must still
provide a no-op command today. For example, Catnap uses command: ":" solely
to make its sequential all action valid:

actions:
  - name: all
    description: Run comprehensive checks sequentially
    command: ":"
    deps:
      - check-fmt
      - lint
      - test
      - spelling
    dependency_order: serial

https://github.com/leynos/catnap/blob/de453cb63aa030844ef08e1c60d4981b6d25d949/Netsukefile#L3-L12

The : recipe is not part of the workflow’s intent: the dependencies are the
entire action. Requiring it adds implementation noise to otherwise declarative
manifests.

Requirement

Allow command to be omitted when an action or target has at least one
dependency. Netsuke should model it as a dependency-only node with no recipe
of its own.

Acceptance criteria

  • An action or target with non-empty deps may omit command.
  • A manifest entry with neither command nor deps remains invalid.
  • Dependency ordering, deduplication, and failure behaviour remain unchanged,
    including dependency_order: serial.
  • Generated Ninja output represents the dependency-only node without a
    synthetic shell no-op.
  • Add manifest, graph-generation, and CLI regression coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions