You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ stack ls dependencies --resolver ltsInvalid option `--resolver'Usage: stack ls dependencies [COMMAND | [--[no-]license] [--separator SEP] [--filter ITEM] [--[no-]external] [--[no-]include-base] [--depth DEPTH] [--prune PACKAGES] [TARGET] [--flag PACKAGE:[-]FLAG] [--test] [--bench] [--global-hints]] View the packages versions used for a project. Use a command if the first target specified has the name of a command. Targets other than project packages are ignored.
So I guess "global" stack options have to come before the "env" command here.
What adds to the confusion is that for the "dot" command this restriction does not apply, e.g.
stack dot --resolver nightly
seem to work just fine.
Feel free to close as won't fix.
mpilgrem
changed the title
stack ls dependencies should accept --resolver
Use of --resolver with stack ls dependencies?
Mar 22, 2025
For convenience, most of the top-level commands have a 'hidden' (and undocumented) parser that parses the 'global' options 'a second time around'. That includes dot and, actually, ls. So you can command:
stack --snapshot nightly ls depencencies text
stack ls --snapshot nightly dependencies text
however, that UI 'trick' does not extend as far as the subcommands or the sub-subcommands. So you can't command:
stack ls dependencies --snapshot nightly text
stack ls dependencies text --snapshot nightly
stack ls dependencies
does not accept--resolver
, which I guess it should?!The text was updated successfully, but these errors were encountered: