Closed Kleidukos closed 1 month ago
Hi, thank you for the bug report!
I think this is a hadrian bug, not a bug of HLS. In particular, I have seen these kinds of errors with hadrian test
as well. Perhaps you need to re-configure your GHC branch?
By this you mean "run ./boot && ./configure"?
Yes. But before that, did you try deleting ./.hie-bios/
?
I had in fact no idea that this directory existed, I was removing ~/.cache/hie-bios/
instead :')
Yes this is the correct directory for cabal
cradles, but hadrian is a bios
cradle and decides on its own where to put its compilation artifacts :)
Alright, I've got a new error now (beware, here be dragons):
Looks like you are trying to open a target from the base
lib. The default bios
cradle in ghc only works for compiler/
or lib:ghc
iirc.
Aaaah, okay. I'll tweak the bios then!
Cheers!
I get
when I open hls in the GHC repository. Several clean-ups don't change the output.
Your environment
Tools
Fedora 40
Tool versions found on the $PATH
all from GHCup
Have you configured HLS in any way (especially: a
hie.yaml
file)?Yes:
which itself contains:
Full error message
``` ❯ haskell-language-server-wrapper Found "/home/hecate/Contrib/GHC/ghc/hie.yaml" for "/home/hecate/Contrib/GHC/ghc/a" Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.8.0.0 x86_64 ghc-9.2.8 Current directory: /home/hecate/Contrib/GHC/ghc Operating system: linux Arguments: [] Cradle directory: /home/hecate/Contrib/GHC/ghc Cradle type: Bios Tool versions found on the $PATH cabal: 3.13.0.0 stack: 2.15.5 ghc: 9.6.5 Consulting the cradle to get project GHC version... 2024-05-22T15:54:32.533819Z | Debug | ghc --numeric-version Project GHC version: 9.6.5 haskell-language-server exe candidates: ["haskell-language-server-9.6.5","haskell-language-server"] Launching haskell-language-server exe at:/home/hecate/.ghcup/bin/haskell-language-server-9.6.5 2024-05-22T15:54:32.635321Z | Debug | ghc -v0 -package-env=- -ignore-dot-ghci -e Control.Monad.join (Control.Monad.fmap System.IO.putStr System.Environment.getExecutablePath) 2024-05-22T15:54:32.664039Z | Debug | ghc --print-libdir 2024-05-22T15:54:33.644105Z | Info | haskell-language-server version: 2.8.0.0 (GHC: 9.6.5) (PATH: /home/hecate/.ghcup/hls/2.8.0.0/lib/haskell-language-server-2.8.0.0/bin/haskell-language-server-9.6.5) 2024-05-22T15:54:33.644734Z | Info | Directory: /home/hecate/Contrib/GHC/ghc 2024-05-22T15:54:33.644891Z | Info | Logging heap statistics every 60.00s ghcide setup tester in /home/hecate/Contrib/GHC/ghc. Report bugs at https://github.com/haskell/haskell-language-server/issues Step 1/4: Finding files to test in /home/hecate/Contrib/GHC/ghc Found 16096 files Step 2/4: Looking for hie.yaml files that control setup Found 5 cradles (/home/hecate/Contrib/GHC/ghc/hie.yaml, /home/hecate/Contrib/GHC/ghc/hadrian/hie.yaml, /home/hecate/Contrib/GHC/ghc/libraries/ghc-heap/hie.yaml, /home/hecate/Contrib/GHC/ghc/utils/deriveConstants/hie.yaml, /home/hecate/Contrib/GHC/ghc/utils/genapply/hie.yaml) Step 3/4: Initializing the IDE Step 4/4: Type checking the files 2024-05-22T15:54:38.544251Z | Info | Cradle path: utils/testremove/wouldrm.hs 2024-05-22T15:54:38.544648Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:38.544915Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/testremove/wouldrm.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-0 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-1 2024-05-22T15:54:38.778186Z | Info | Cradle path: utils/hsc2hs/Setup.hs 2024-05-22T15:54:38.778401Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:38.778624Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/hsc2hs/Setup.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-2 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-3 2024-05-22T15:54:38.997285Z | Info | Cradle path: utils/hsc2hs/src/ATTParser.hs 2024-05-22T15:54:38.997463Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:38.997670Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/hsc2hs/src/ATTParser.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-4 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-5 2024-05-22T15:54:39.210549Z | Info | Cradle path: utils/hsc2hs/src/CrossCodegen.hs 2024-05-22T15:54:39.210743Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:39.211010Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/hsc2hs/src/CrossCodegen.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-6 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-7 2024-05-22T15:54:39.526596Z | Info | Cradle path: utils/hsc2hs/src/DirectCodegen.hs 2024-05-22T15:54:39.526800Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:39.527034Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/hsc2hs/src/DirectCodegen.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-8 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-9 2024-05-22T15:54:39.744838Z | Info | Cradle path: utils/hsc2hs/src/Main.hs 2024-05-22T15:54:39.745048Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:39.745395Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/hsc2hs/src/Main.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-10 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-11 2024-05-22T15:54:40.026346Z | Info | Cradle path: utils/hsc2hs/src/UtilsCodegen.hs 2024-05-22T15:54:40.026564Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:40.026837Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/hsc2hs/src/UtilsCodegen.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-12 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-13 2024-05-22T15:54:40.439988Z | Info | Cradle path: utils/iserv/src/Main.hs 2024-05-22T15:54:40.440227Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:40.440545Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/iserv/src/Main.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-14 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-15 2024-05-22T15:54:40.673730Z | Info | Cradle path: utils/hsc2hs/src/Compat/TempFile.hs 2024-05-22T15:54:40.673933Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:40.674240Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/hsc2hs/src/Compat/TempFile.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-16 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-17 2024-05-22T15:54:40.912052Z | Info | Cradle path: utils/remote-iserv/Setup.hs 2024-05-22T15:54:40.912232Z | Info | invoking build tool to determine build flags (this may take some time depending on the cache) 2024-05-22T15:54:40.912455Z | Info | /home/hecate/Contrib/GHC/ghc/hadrian/hie-bios /home/hecate/Contrib/GHC/ghc/utils/remote-iserv/Setup.hs Environment Variables HIE_BIOS_OUTPUT: /tmp/HIE_BIOS_OUTPUT413373-18 HIE_BIOS_DEPS: /tmp/HIE_BIOS_DEPS413373-19 2024-05-22T15:54:41.030357Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /home/hecate/Contrib/GHC/ghc/utils/iserv/src/Main.hs Hidden: no Range: 1:1-2:1 Source: cradle Severity: DiagnosticSeverity_Error Message: Warning: this is a debug build of cabal-install with assertions enabled. Warning: this is a debug build of cabal-install with assertions enabled. Error parsing a toolchain `.target` file from its binary representation in hadrian. This is likely caused by a stale hadrian/shake cache which has saved an old `.target` file that can't be parsed into a more recent `Toolchain.Target`. It is recommended to reset by running `./hadrian/build clean`. Build failed. ```Unwanted advice: It would probably be better to version the format so that a link can better be established between what's expected and what's actually found.