Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.41 KB

File metadata and controls

39 lines (27 loc) · 1.41 KB

no-throw-dependson

Reproduction for nrwl/nx#32779 — tasks complete successfully when a dependsOn entry cannot be resolved.

Nx silently drops the unresolved dependency: the dependent task never runs, nothing is logged at any verbosity, and the process exits 0.

Setup

npm ci

Cases

Script dependsOn Resolves? Observed
npm run control dependency yes Runs the dependency, prints Hello World!, exits 0
npm run example dependencyy (typo'd target) no No dependency run, no warning, exits 0
npm run missing-project missing-project:dependency (nonexistent project) no No dependency run, no warning, exits 0

control is the baseline showing what a resolved dependsOn looks like. The other two are the bug: same "Successfully ran target" output, no Hello World!.

Note that the header line differs — the control run announces and 1 task it depends on, the failing runs announce nothing. That is the only signal, and it is easy to miss in CI logs.

Expected

A dependsOn entry that matches no target should fail the task, or at minimum log a warning. Today a typo in a target name silently skips work that was meant to be a prerequisite.

Verbosity

--verbose --skip-nx-cache does not surface the unresolved dependency either; the plugin-worker chatter is the only extra output.