Skip to content

Add --list-targets[=PATTERN] to list the available targets - #862

Open
sjakobi wants to merge 1 commit into
ndmitchell:masterfrom
sjakobi:list-targets
Open

sjakobi wants to merge 1 commit into
ndmitchell:masterfrom
sjakobi:list-targets

Conversation

@sjakobi

@sjakobi sjakobi commented Oct 11, 2026

Copy link
Copy Markdown

Closes #784.

Sample output:

$ ./build --list-targets
all - Build everything
clean - Remove _build
test - Run the test suite
_build/app
_build/docs/*.html
$ ./build --list-targets='_build/**'
_build/app
_build/docs/*.html

I went with the more explicit --list-targets name instead of the originally proposed --targets. If you'd prefer something else (@bgamari proposed --help-targets in https://gitlab.haskell.org/ghc/ghc/-/work_items/18015), I'd be happy to switch to a different name.

@sjakobi

sjakobi commented Oct 11, 2026

Copy link
Copy Markdown
Author

@ndmitchell Would you accept a follow-up change to remove the target list from --help output? IMHO the status quo is pretty noisy and distracts from the flag info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: --targets flag to show all available targets

1 participant