Hadrian: Suppress more output on failure
In my tree, I have a one-character error. When I ask Hadrian to build, I get this:
rae:14:37:38 ~/ghc/ghc> ~/ghc/ghc/hadrian/build -j5 --flavour=devel2+werror --freeze1 --skip-depends
Up to date
| Run Ghc CompileHs Stage1: compiler/GHC/Tc/Solver/Rewrite.hs => _build/stage1/compiler/build/GHC/Tc/Solver/Rewrite.o
compiler/GHC/Tc/Solver/Rewrite.hs:634:69: error:
• Variable not in scope: arg_tys :: [Type]
• Perhaps you meant ‘arg_ty’ (line 628)
|
634 | <- rewrite_vector (tcTypeKind fun_xi) arg_roles arg_tys
| ^^^^^^^
compiler/GHC/Tc/Solver/Rewrite.hs:650:68: error:
• Variable not in scope: arg_tys :: [Type]
• Perhaps you meant one of these:
‘arg_ty’ (line 628), ‘arg_cos’ (line 633), ‘arg_xis’ (line 633)
|
650 | ReprEq -> mkAppCos fun_co (map mkNomReflCo arg_tys)
| ^^^^^^^
compiler/GHC/Tc/Solver/Rewrite.hs:661:76: error:
• Variable not in scope: arg_tys :: [Type]
• Perhaps you meant ‘arg_ty’ (line 628)
|
661 | <- rewrite_vector (tcTypeKind fun_xi) (repeat Nominal) arg_tys
| ^^^^^^^
Error when running Shake build system:
at action, called at src/Rules.hs:39:19 in main:Rules
at need, called at src/Rules.hs:61:5 in main:Rules
* Depends on: _build/stage1/lib/package.conf.d/ghc-9.3.conf
* Depends on: _build/stage1/compiler/build/libHSghc-9.3.a
* Depends on: _build/stage1/compiler/build/GHC/Tc/Solver/Rewrite.o
* Depends on: _build/stage1/compiler/build/GHC/Tc/Solver/Rewrite.o _build/stage1/compiler/build/GHC/Tc/Solver/Rewrite.hi
at cmd', called at src/Builder.hs:330:23 in main:Builder
at cmd, called at src/Builder.hs:432:8 in main:Builder
* Raised the exception:
Development.Shake.cmd, system command failed
Command line: _build/stage0/bin/ghc -Wall -Wcompat -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage1/lib/package.conf.d' '-this-unit-id ghc-9.3' '-package-id array-0.5.4.0' '-package-id base-4.16.0.0' '-package-id binary-0.8.8.0' '-package-id bytestring-0.11.1.0' '-package-id containers-0.6.4.1' '-package-id deepseq-1.4.4.0' '-package-id directory-1.3.6.1' '-package-id exceptions-0.10.4' '-package-id filepath-1.4.2.1' '-package-id ghc-boot-9.3' '-package-id ghc-heap-9.3' '-package-id ghci-9.3' '-package-id hpc-0.6.1.0' '-package-id parsec-3.1.14.0' '-package-id process-1.6.13.1' '-package-id stm-2.5.0.0' '-package-id template-haskell-2.18.0.0' '-package-id terminfo-0.4.1.4' '-package-id time-1.11.1.1' '-package-id transformers-0.5.6.2' '-package-id unix-2.7.2.2' -i -i/Users/rae/ghc/ghc/_build/stage1/compiler/build -i/Users/rae/ghc/ghc/_build/stage1/compiler/build/autogen -i/Users/rae/ghc/ghc/compiler -Irts/include -I_build/stage1/lib -I_build/stage1/compiler/build -I_build/stage1/compiler/build/. -I_build/stage1/compiler/build/../rts/dist/build -Icompiler/. -Icompiler/../rts/dist/build -I/Users/rae/ghc/ghc/_build/stage1/lib/x86_64-osx-ghc-9.3.20210916/process-1.6.13.1/include -I/Users/rae/ghc/ghc/_build/stage1/lib/x86_64-osx-ghc-9.3.20210916/unix-2.7.2.2/include -I/Users/rae/ghc/ghc/_build/stage1/lib/x86_64-osx-ghc-9.3.20210916/time-1.11.1.1/include -I/Users/rae/ghc/ghc/_build/stage1/lib/x86_64-osx-ghc-9.3.20210916/bytestring-0.11.1.0/include -I/Users/rae/ghc/ghc/_build/stage1/lib/x86_64-osx-ghc-9.3.20210916/base-4.16.0.0/include -I/Users/rae/ghc/ghc/_build/stage1/lib/x86_64-osx-ghc-9.3.20210916/ghc-bignum-1.2/include -I/Users/rae/ghc/ghc/_build/stage1/lib/x86_64-osx-ghc-9.3.20210916/rts-1.0.2/include -I_build/stage1/lib -optc-I_build/stage1/lib -optP-include -optP_build/stage1/compiler/build/autogen/cabal_macros.h -optP-DHAVE_INTERNAL_INTERPRETER -optP-DCAN_LOAD_DLL -outputdir _build/stage1/compiler/build -Wnoncanonical-monad-instances -optc-Wno-unknown-pragmas -optP-Wno-nonportable-include-path -c compiler/GHC/Tc/Solver/Rewrite.hs -o _build/stage1/compiler/build/GHC/Tc/Solver/Rewrite.o -O -H64m -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -this-unit-id ghc -XHaskell2010 -XNoImplicitPrelude -XBangPatterns -XScopedTypeVariables -XMonoLocalBinds -no-global-package-db -package-db=/Users/rae/ghc/ghc/_build/stage1/lib/package.conf.d -ghcversion-file=/Users/rae/ghc/ghc/_build/stage1/lib/ghcversion.h -O0 -DDEBUG -Wno-deprecated-flags -Wcpp-undef -Werror
Exit code: 1
Stderr and Stdout:
compiler/GHC/Tc/Solver/Rewrite.hs:634:69: error:
• Variable not in scope: arg_tys :: [Type]
• Perhaps you meant ‘arg_ty’ (line 628)
|
634 | <- rewrite_vector (tcTypeKind fun_xi) arg_roles arg_tys
| ^^^^^^^
compiler/GHC/Tc/Solver/Rewrite.hs:650:68: error:
• Variable not in scope: arg_tys :: [Type]
• Perhaps you meant one of these:
‘arg_ty’ (line 628), ‘arg_cos’ (line 633), ‘arg_xis’ (line 633)
|
650 | ReprEq -> mkAppCos fun_co (map mkNomReflCo arg_tys)
| ^^^^^^^
compiler/GHC/Tc/Solver/Rewrite.hs:661:76: error:
• Variable not in scope: arg_tys :: [Type]
• Perhaps you meant ‘arg_ty’ (line 628)
|
661 | <- rewrite_vector (tcTypeKind fun_xi) (repeat Nominal) arg_tys
| ^^^^^^^
Most of this is unnecessary:
- I definitely don't want to know what lines in Hadrian's source code are implicated.
- I don't know how to interpret the "depends on" lines. It looks like it's telling me the path through the graph of dependencies Hadrian traversed to decide that it must compile my edited file. That's rarely (but not never) useful. I don't think I've ever wanted this info, but I could imagine wanting it sometime -- maybe it's printed when a flag is given to Hadrian.
- The name of the exception seems unuseful.
- The command line is more often useful, but something I'm happy to ask for when I need it. The vast majority of the time, it won't be necessary.
- A recapitulation of the stdout and stderr are quite annoying -- especially because the stderr appears above. Maybe the stdout doesn't? That might be useful then.
Can we clean this up, please? :)
Thanks!