Skip to content

Commit

Permalink
Warn that package targets display libs and exes
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Jan 2, 2025
1 parent 2870c9a commit 2b0b5a6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cabal-install/src/Distribution/Client/CmdTarget.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ targetCommand =
vcat
[ intro
, vcat $ punctuate (text "\n") [targetForms, ctypes, Pretty.empty]
, caution
]
, commandNotes = Just $ \pname -> render $ examples pname
, commandDefaultFlags = defaultNixStyleFlags ()
Expand Down Expand Up @@ -102,6 +103,13 @@ targetCommand =
]
]

caution =
text . wrapText $
"For a package, all, module or filepath target, cabal target [TARGETS] \
\ will *only* show 'libs' and 'exes' of the [TARGETS]. To also show \
\ tests and benchmarks, enable them with '--enable-tests' and \
\ '--enable-benchmarks'."

examples pname =
vcat
[ text "Examples" Pretty.<> colon
Expand Down

0 comments on commit 2b0b5a6

Please sign in to comment.