PS On a hunch I tried adding `-r` to the hadrian command line.  That did work; the funny @ file doesn't get deleted.  I suppose I can always add -r.  But in a full build I assume it'll make thousands of these funny files, and now they stay around forever right?

And indeed my root directory is now full of funny files. See below.  

I suppose I can delete them all every now and again, but it's all work

Simon


simonpj@PF55P26D:~/code/HEAD-31$ ls
CODEOWNERS driver       hadrian-rsp115834-23  hadrian-rsp115834-46
HACKING.md foo       hadrian-rsp115834-24  hadrian-rsp115834-5
INSTALL.md foo-patch       hadrian-rsp115834-25  hadrian-rsp115834-6
LICENSE foo.~1~       hadrian-rsp115834-26  hadrian-rsp115834-7
README.md ghc       hadrian-rsp115834-27  hadrian-rsp115834-8
VERSION ghc-interp.js       hadrian-rsp115834-28  hadrian-rsp115834-9
_build hadrian       hadrian-rsp115834-29  hie.yaml
aclocal.m4 hadrian-rsp115369-0   hadrian-rsp115834-3   install-sh
autom4te.cache hadrian-rsp115532-0   hadrian-rsp115834-30  libraries
bindisttest hadrian-rsp115834-0   hadrian-rsp115834-31  linters
boot hadrian-rsp115834-1   hadrian-rsp115834-32  llvm-passes
cabal.project-reinstall  hadrian-rsp115834-10  hadrian-rsp115834-33  llvm-targets
changelog.d hadrian-rsp115834-11  hadrian-rsp115834-34  m4
closure-patch hadrian-rsp115834-12  hadrian-rsp115834-35  mk
compile_flags.txt hadrian-rsp115834-13  hadrian-rsp115834-36  nofib
compiler hadrian-rsp115834-14  hadrian-rsp115834-37  packages
config.guess hadrian-rsp115834-15  hadrian-rsp115834-38  rts
config.log hadrian-rsp115834-16  hadrian-rsp115834-39  sync-hi
config.status hadrian-rsp115834-17  hadrian-rsp115834-4   testsuite
config.sub hadrian-rsp115834-18  hadrian-rsp115834-40  testsuite_summary.txt
configure hadrian-rsp115834-19  hadrian-rsp115834-41  utils
configure.ac hadrian-rsp115834-2   hadrian-rsp115834-42  validate
configure~ hadrian-rsp115834-20  hadrian-rsp115834-43
distrib hadrian-rsp115834-21  hadrian-rsp115834-44
docs hadrian-rsp115834-22  hadrian-rsp115834-45
simonpj@PF55P26D:~/code/HEAD-31$ 

On Fri, 1 May 2026 at 23:35, Simon Peyton Jones <simon.peytonjones@gmail.com> wrote:
Friends

Something extremely tiresome has happened to Hadrian.

When I'm compiling GHC, and I get a type error, Hadrian helpfully tells me the command line that broke.  I often copy/paste that command line to re-run it, for two reasons:
  • It is much much faster than running Hadrian from scratch, as I repeatedly try to compile the same source file.
  • More important, when building libraries or the stage2 compiler, I often want to add lots of debug or tracing flags to the command line, so I can find what is wrong with the stage1 compiler.  This is utterly essential.  
  • Indeed I often make a deliberate syntax error in (say) a library module, run Hadrian, watch it fall over with that syntax error, so I get the command line.  Then I fix the deliberate error and repeatedly compile that one file with lots of tracing.
But now something has broken.  If I re-run the command I get 
simonpj@PF55P26D:~/code/HEAD-31$ /home/simonpj/.ghcup/bin/ghc -Wall -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage0/inplace/package.conf.d' '-this-unit-id ghc-10.1-inplace' '-this-package-name ghc' '-package-id array-0.5.8.0-9044' '-package-id base-4.21.0.0-ae91' '-package-id binary-0.8.9.3-25e5' '-package-id bytestring-0.12.2.0-7dd0' '-package-id containers-0.7-5a8f' '-package-id deepseq-1.5.1.0-6837' '-package-id directory-1.3.10.1-inplace' '-package-id exceptions-0.10.9-4d2e' '-package-id filepath-1.5.4.0-inplace' '-package-id ghc-boot-10.1-inplace' '-package-id ghc-boot-th-next-10.1-inplace' '-package-id ghc-heap-9.12.2-4363' '-package-id ghc-toolchain-0.1.0.0-inplace' '-package-id ghci-10.1-inplace' '-package-id hpc-0.7.0.2-inplace' '-package-id os-string-2.0.8-inplace' '-package-id process-1.6.26.1-inplace' '-package-id rts-1.0.2' '-package-id semaphore-compat-1.0.0-inplace' '-package-id stm-2.5.3.1-d35b' '-package-id text-2.1.2-ecdb' '-package-id time-1.15-inplace' '-package-id transformers-0.6.1.2-38b1' '-package-id unix-2.8.8.0-inplace' -i -i/home/simonpj/code/HEAD-31/_build/stage0/compiler/build -i/home/simonpj/code/HEAD-31/_build/stage0/compiler/build/autogen -i/home/simonpj/code/HEAD-31/compiler/ -I_build/stage0/compiler/build -I_build/stage0/compiler/build/. -Icompiler/. -I/home/simonpj/code/HEAD-31/libraries/process/include -I/home/simonpj/code/HEAD-31/_build/stage0/libraries/process/build/include -I/home/simonpj/code/HEAD-31/libraries/directory -I/home/simonpj/code/HEAD-31/_build/stage0/libraries/directory/build -I/home/simonpj/code/HEAD-31/libraries/unix/include -I/home/simonpj/code/HEAD-31/_build/stage0/libraries/unix/build/include -I/home/simonpj/code/HEAD-31/libraries/time/lib/include -I/home/simonpj/code/HEAD-31/_build/stage0/libraries/time/build/lib/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/bytestring-0.12.2.0-7dd0/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/ghc-internal-9.1202.0-1465/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/ghc-bignum-1.3-6db4/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/rts-1.0.2/include -optP-include -optP_build/stage0/compiler/build/autogen/cabal_macros.h -optP-DCAN_LOAD_DLL -outputdir _build/stage0/compiler/build -fdiagnostics-color=always -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -XGHC2024 -XNoImplicitPrelude -optc-Wno-error=inline -c -o _build/stage0/compiler/build/GHC/Core.o -DDEBUG -haddock -fno-warn-deprecated-flags -O +RTS -O64M -RTS -O2 @/tmp/extra-file-9558430904709-115211-0
ghc-9.12.2: panic! (the 'impossible' happened)
  GHC version 9.12.2:
processArgs: no arg yet

It's that pesky "@" thing.   And of course GHC has deleted that tmp file.

Super frustrating.  What can I do?  Do we have to use the pesky @ thing?  It's just complicating things!   

ALSO, all the error messages come out twice, which is disconcerting and tiresome.  See below.

Thanks

Simon


simonpj@PF55P26D:~/code/HEAD-31$ hadrian/build -j6 --flavour=perf+assertions_stage1+no_profiled_libs+ticky_ghc+lint
Warning: Specifying an absolute path to the project file is deprecated. Use
--project-dir to set the project's directory.
Configuration is affected by cabal.project at
'/home/simonpj/code/HEAD-31/hadrian'.
Up to date
Warning: Specifying an absolute path to the project file is deprecated. Use
--project-dir to set the project's directory.
Configuration is affected by cabal.project at
'/home/simonpj/code/HEAD-31/hadrian'.
]0;Starting...(/home/simonpj/code/HEAD-31) | Run Ghc CompileHs (Stage0 InTreeLibs): compiler/GHC/Core.hs => _build/stage0/compiler/build/GHC/Core.o
]0;Running for 5s [9912/37741], predicted 4m26s (1%)(/home/simonpj/code/HEAD-31) compiler/GHC/Core.hs:1680:41: error: [GHC-88464]
    Variable not in scope:
      mkTick :: CoreTickish -> CoreExpr -> CoreExpr
    Suggested fix: Perhaps use data constructor ‘Tick’ (line 270)
     |
1680 | wrapFloat (FloatTick t)          body = mkTick t body
     |                                         ^^^^^^

compiler/GHC/Core.hs:1682:41: error: [GHC-88464]
    Variable not in scope:
      mkSingleAltCase
        :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr
     |
1682 | wrapFloat (FloatCase e b con bs) body = mkSingleAltCase e b con bs body
     |                                         ^^^^^^^^^^^^^^^

]0;Finished in 5.74s(/home/simonpj/code/HEAD-31) Development.Shake.cmd, system command failed
Command line: /home/simonpj/.ghcup/bin/ghc -Wall -hisuf hi -osuf o -hcsuf hc -static -hide-all-packages -no-user-package-db '-package-env -' '-package-db _build/stage0/inplace/package.conf.d' '-this-unit-id ghc-10.1-inplace' '-this-package-name ghc' '-package-id array-0.5.8.0-9044' '-package-id base-4.21.0.0-ae91' '-package-id binary-0.8.9.3-25e5' '-package-id bytestring-0.12.2.0-7dd0' '-package-id containers-0.7-5a8f' '-package-id deepseq-1.5.1.0-6837' '-package-id directory-1.3.10.1-inplace' '-package-id exceptions-0.10.9-4d2e' '-package-id filepath-1.5.4.0-inplace' '-package-id ghc-boot-10.1-inplace' '-package-id ghc-boot-th-next-10.1-inplace' '-package-id ghc-heap-9.12.2-4363' '-package-id ghc-toolchain-0.1.0.0-inplace' '-package-id ghci-10.1-inplace' '-package-id hpc-0.7.0.2-inplace' '-package-id os-string-2.0.8-inplace' '-package-id process-1.6.26.1-inplace' '-package-id rts-1.0.2' '-package-id semaphore-compat-1.0.0-inplace' '-package-id stm-2.5.3.1-d35b' '-package-id text-2.1.2-ecdb' '-package-id time-1.15-inplace' '-package-id transformers-0.6.1.2-38b1' '-package-id unix-2.8.8.0-inplace' -i -i/home/simonpj/code/HEAD-31/_build/stage0/compiler/build -i/home/simonpj/code/HEAD-31/_build/stage0/compiler/build/autogen -i/home/simonpj/code/HEAD-31/compiler/ -I_build/stage0/compiler/build -I_build/stage0/compiler/build/. -Icompiler/. -I/home/simonpj/code/HEAD-31/libraries/process/include -I/home/simonpj/code/HEAD-31/_build/stage0/libraries/process/build/include -I/home/simonpj/code/HEAD-31/libraries/directory -I/home/simonpj/code/HEAD-31/_build/stage0/libraries/directory/build -I/home/simonpj/code/HEAD-31/libraries/unix/include -I/home/simonpj/code/HEAD-31/_build/stage0/libraries/unix/build/include -I/home/simonpj/code/HEAD-31/libraries/time/lib/include -I/home/simonpj/code/HEAD-31/_build/stage0/libraries/time/build/lib/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/bytestring-0.12.2.0-7dd0/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/ghc-internal-9.1202.0-1465/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/ghc-bignum-1.3-6db4/include -I/home/simonpj/.ghcup/ghc/9.12.2/lib/ghc-9.12.2/lib/x86_64-linux-ghc-9.12.2-a828/rts-1.0.2/include -optP-include -optP_build/stage0/compiler/build/autogen/cabal_macros.h -optP-DCAN_LOAD_DLL -outputdir _build/stage0/compiler/build -fdiagnostics-color=always -Wall -Wno-name-shadowing -Wnoncanonical-monad-instances -Wnoncanonical-monoid-instances -XGHC2024 -XNoImplicitPrelude -optc-Wno-error=inline -c -o _build/stage0/compiler/build/GHC/Core.o -DDEBUG -haddock -fno-warn-deprecated-flags -O +RTS -O64M -RTS -O2 @/tmp/extra-file-80099975488219-115449-0
Exit code: 1
Stderr:
compiler/GHC/Core.hs:1680:41: error: [GHC-88464]
    Variable not in scope:
      mkTick :: CoreTickish -> CoreExpr -> CoreExpr
    Suggested fix: Perhaps use data constructor ‘Tick’ (line 270)
     |
1680 | wrapFloat (FloatTick t)          body = mkTick t body
     |                                         ^^^^^^

compiler/GHC/Core.hs:1682:41: error: [GHC-88464]
    Variable not in scope:
      mkSingleAltCase
        :: CoreExpr -> Id -> AltCon -> [Var] -> CoreExpr -> CoreExpr
     |
1682 | wrapFloat (FloatCase e b con bs) body = mkSingleAltCase e b con bs body
     |                                         ^^^^^^^^^^^^^^^


Build failed.