From 39d484dfc1cd67eaa4b7d99fec649906de780871 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Wed, 22 May 2024 23:33:25 +0100 Subject: [PATCH] Re #6591 Improve online documentation of targets --- doc/ls_command.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/ls_command.md b/doc/ls_command.md index b46dcf7def..744feb3926 100644 --- a/doc/ls_command.md +++ b/doc/ls_command.md @@ -40,10 +40,20 @@ stack ls dependencies [--separator SEP] [--[no-]license] [--filter ITEM] ~~~ `stack ls dependencies` lists all of the packages and versions used for a -project. All project packages are considered by default, but a target can be -specified as an argument. For further information, see the +project. All project packages are considered by default, but one or more targets +can be specified as an argument. For further information, see the [target syntax](build_command.md#target-syntax) documentation. +!!! note + + If the first target is one of `cabal`, `json`, `text` and `tree`, then a + subcommand must be specified. + +!!! info + + If a specified target is not a project package, then it will not contribute + packages to the command's output. + Subcommands specify the format of the output, as follows: * `cabal` lists the packages in the format of exact Cabal constraints.