Skip to content
Snippets Groups Projects
Commit 58fea28e authored by Matthew Pickering's avatar Matthew Pickering Committed by Marge Bot
Browse files

hadrian: Update documentation for new verbosity options

parent 66c85e2e
No related branches found
No related tags found
No related merge requests found
......@@ -117,8 +117,11 @@ four settings: `none`, `brief` (one line per build command; this is the default
setting), `normal` (typically a box per build command), and `unicorn` (when
`normal` just won't do).
* `--verbose`: run Hadrian in verbose mode. In particular this prints diagnostic
messages by Shake oracles.
* `-V`/`--verbose`: run Hadrian in verbose mode. This makes commands print their stdout
and produces slightly more output on a failure (including hadrian call stacks).
* `-VV`: run hadrian in diagnostics mode: In particular this prints diagnostic
messages by Shake oracles and full command lines for all commands.
* `--lint`: run [Shake Lint](https://shakebuild.com/manual#lint) during the
build to check that the build system is well formed. Note that the Lint check
......
......@@ -220,41 +220,6 @@ noDynamicFlavour = defaultFlavour
, libraryWays = remove [dynamic] defaultLibraryWays }
```
### Verbose command lines
By default Hadrian does not print full command lines during the build process
and instead prints short human readable digests for each executed command. You
can suppress this behaviour completely or partially using `verboseCommand` setting:
```haskell
-- | Set to 'True' to print full command lines during the build process. Note:
-- this is a 'Predicate', hence you can enable verbose output only for certain
-- targets, e.g.: @verboseCommand = package ghcPrim@.
verboseCommand :: Predicate
verboseCommand = do
verbosity <- expr getVerbosity
return $ verbosity >= Verbose
```
For example, to print the full command lines used to compile GHC executables,
set `verboseCommands` to:
```haskell
verboseCommand :: Predicate
verboseCommand = input "ghc/Main.hs"
```
Below are a few other examples:
```haskell
-- Print command lines for all Ghc Link invocations:
verboseCommand = builder (Ghc Link)
-- Print command lines when compiling files in package compiler using Gcc:
verboseCommand = builder (Gcc Compile) &&^ package compiler
-- Use patterns when matching files:
verboseCommand = output "**/rts/sm/*" &&^ way threaded
-- Print all commands:
verboseCommand = return True
```
### Documentation
`Flavour`'s `ghcDocs :: Action DocTargets` field lets you
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment