Skip to content

Commit 65970f5

Browse files
committed
docs: Document dependency-tree goal in quick-start and multi-module guides
quick-start-guide.adoc: - Add dependency-tree to the Multi-Module Projects basic usage examples - Add a full 'dependency-tree' section to the Available Goals reference, covering both multi-module and single-module usage with sample output and a list of typical use cases multi-module-tutorial.adoc: - Replace the 'Verbose Dependency Graph Display' subsection with a dedicated 'Dependency Tree' subsection documenting the new goal, including filtered (-m) usage and representative output samples - Retain a short note on the compile -v flag for in-build verbose output - Add an 'Inspect Dependencies Before Building' step before the 'Build Specific Module' section to introduce dependency-tree early in the workflow narrative
1 parent 72a287a commit 65970f5

File tree

2 files changed

+122
-20
lines changed

2 files changed

+122
-20
lines changed

docs/multi-module-tutorial.adoc

Lines changed: 61 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,17 @@ Output shows build progress:
183183
[INFO] Reactor build complete: 3/3 modules built
184184
----
185185

186+
=== Inspect Dependencies Before Building
187+
188+
Before building, use `dependency-tree` to verify module relationships without
189+
invoking the compiler:
190+
191+
[source,bash]
192+
----
193+
pasbuild dependency-tree # Show all modules and their dependencies
194+
pasbuild dependency-tree -m demo # Show only demo's dependencies
195+
----
196+
186197
=== Build Specific Module
187198

188199
Build only a specific module (and its dependencies):
@@ -340,39 +351,70 @@ pasbuild test -m demo # Test demo module
340351
pasbuild package -m ui # Package UI library
341352
----
342353

343-
=== Verbose Dependency Graph Display
354+
=== Dependency Tree
344355

345-
Display the module dependency graph with the `-v` (verbose) flag:
356+
Display the full dependency graph without compiling anything:
346357

347358
[source,bash]
348359
----
349-
pasbuild compile -v
360+
pasbuild dependency-tree
350361
----
351362

352-
Output shows each module and its dependencies:
363+
Output lists every module in topological order (dependencies first), with each
364+
dependency labelled by kind:
353365

354366
[source]
355367
----
356-
[INFO] Building 3 modules in dependency order
357-
[INFO] Dependency Graph:
368+
[INFO] ------------------------------------------------------------------------
369+
[INFO] Dependency Tree
370+
[INFO] ------------------------------------------------------------------------
358371
[INFO]
359-
[INFO] core (no dependencies)
360-
[INFO] ui (depends on: core)
361-
[INFO] └─ core
362-
[INFO] demo (depends on: ui)
363-
[INFO] └─ ui
372+
[INFO] core 1.0.0 [library]
373+
[INFO] (no dependencies)
364374
[INFO]
365-
[INFO] Building module 1/3: core
366-
[INFO] Building module 2/3: ui
367-
[INFO] Building module 3/3: demo
375+
[INFO] ui 1.0.0 [library]
376+
[INFO] └─ core [module]
377+
[INFO]
378+
[INFO] demo 1.0.0 [application]
379+
[INFO] ├─ ui [module]
380+
[INFO] └─ some-ext:2.0.0 [external]
368381
----
369382

370-
The verbose flag helps you:
383+
Restrict the output to a single named module with `-m`:
384+
385+
[source,bash]
386+
----
387+
pasbuild dependency-tree -m demo
388+
----
389+
390+
[source]
391+
----
392+
[INFO] ------------------------------------------------------------------------
393+
[INFO] Dependency Tree for module: demo
394+
[INFO] ------------------------------------------------------------------------
395+
[INFO]
396+
[INFO] demo 1.0.0 [application]
397+
[INFO] ├─ ui [module]
398+
[INFO] └─ some-ext:2.0.0 [external]
399+
----
400+
401+
`dependency-tree` is particularly useful for large multi-module projects where
402+
running `compile -v` buries the dependency graph under screens of compiler
403+
output. The goal exits immediately after printing the tree — no compilation
404+
occurs.
405+
406+
=== Verbose Dependency Graph During Build
407+
408+
The `-v` (verbose) flag still shows a compact dependency summary at the start
409+
of a `compile` run, but the output is interleaved with FPC compiler lines:
410+
411+
[source,bash]
412+
----
413+
pasbuild compile -v
414+
----
371415

372-
- Visualize module relationships
373-
- Verify correct dependency setup
374-
- Understand the build order
375-
- Debug complex dependency chains
416+
Use `dependency-tree` when you want to inspect dependencies in isolation;
417+
use `-v` when you want extra detail alongside the full build output.
376418

377419
=== Combined with Other Flags
378420

docs/quick-start-guide.adoc

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,8 @@ my-framework/ # Aggregator (packaging=pom)
652652
cd my-framework
653653
pasbuild compile # Build all modules in dependency order
654654
pasbuild compile -m demo # Build only demo (and its dependencies)
655-
pasbuild compile -v # Show dependency graph
655+
pasbuild dependency-tree # Show dependency graph without compiling
656+
pasbuild dependency-tree -m demo # Show only demo's dependencies
656657
----
657658

658659
**For detailed multi-module documentation**, see link:multi-module-tutorial.adoc[Multi-Module Tutorial].
@@ -1267,6 +1268,65 @@ pasbuild install
12671268

12681269
**Note:** For multi-module aggregator projects, `install` runs on each non-aggregator module in dependency order.
12691270

1271+
=== dependency-tree
1272+
1273+
Displays the dependency graph of a project without invoking the compiler.
1274+
1275+
[source,shell]
1276+
----
1277+
pasbuild dependency-tree # All modules (or external deps for single-module)
1278+
pasbuild dependency-tree -m demo # Dependencies for the named module only
1279+
----
1280+
1281+
**What it does:**
1282+
1283+
For multi-module (aggregator) projects, modules are listed in topological order — dependencies before dependents. Each module entry shows:
1284+
1285+
* Local module dependencies (`[module]`)
1286+
* External repository dependencies (`[external]`)
1287+
* The module's packaging type (`[library]`, `[application]`, `[aggregator]`)
1288+
1289+
For single-module projects, only the declared `<dependencies>` (external) are shown.
1290+
1291+
**Example output — multi-module project:**
1292+
1293+
[source]
1294+
----
1295+
[INFO] ------------------------------------------------------------------------
1296+
[INFO] Dependency Tree
1297+
[INFO] ------------------------------------------------------------------------
1298+
[INFO]
1299+
[INFO] math-core 1.0.0 [library]
1300+
[INFO] (no dependencies)
1301+
[INFO]
1302+
[INFO] math-utils 1.0.0 [library]
1303+
[INFO] └─ math-core [module]
1304+
[INFO]
1305+
[INFO] calculator 1.0.0 [application]
1306+
[INFO] ├─ math-utils [module]
1307+
[INFO] └─ some-lib:2.0.0 [external]
1308+
----
1309+
1310+
**Example output — single-module project with external dependencies:**
1311+
1312+
[source]
1313+
----
1314+
[INFO] ------------------------------------------------------------------------
1315+
[INFO] Dependency Tree
1316+
[INFO] ------------------------------------------------------------------------
1317+
[INFO]
1318+
[INFO] my-app 1.0.0
1319+
[INFO] ├─ lib-alpha:1.0.0 [external]
1320+
[INFO] └─ lib-beta:3.2.1 [external]
1321+
----
1322+
1323+
**Use cases:**
1324+
1325+
* Inspect the dependency graph before a build, without compiler output interfering
1326+
* Verify that module dependency declarations are correct
1327+
* Quickly audit which external libraries a module relies on
1328+
* Diagnose unexpected transitive dependency relationships
1329+
12701330
=== init
12711331

12721332
Bootstraps a new project.

0 commit comments

Comments
 (0)