Skip to content

HLS doesn't see files, hence doesn't work #4117

@max-grek

Description

@max-grek

Your environment

OS: Gentoo
GHC: 9.6.4
cabal: 3.10.1.0
HLS: 2.6.0.0

Which OS do you use?
Gentoo
Which version of GHC do you use and how did you install it?
9.6.4 from haskell overlay
Which LSP client (editor/plugin) do you use?
emacs+eglot
Which version of HLS do you use and how did you install it?
2.6.0.0 from Haskell overlay
Have you configured HLS in any way (especially: a hie.yaml file)?
no

What's wrong?

About month ago I updated ghc to 9.6.4 and all related packages, such as HLS, cabal and so on.

And now HLS behaves strange in tandem with emacs' eglot. HSL with eglot started scanning files in bizarre way. It shows me that there are no errors in files where I've made mistakes. In order to understand I ran haskell-language-server itself and it doesn't work properly.

For example: I've created test project, made a mistake in a file and ran HSL in the directory where I did mistake. And that's what it shows:

Debug information

`2024-03-04T16:42:10.248584Z | Info | updateFileDiagnostics published different from new diagnostics - file diagnostics: File: /home/samurai/dev/playground/auth/src/Config/Http.hs
Hidden: no
Range: 1:1-2:1
Source: cradle
Severity: DiagnosticSeverity_Error
Message:
Failed to run ["cabal","v2-repl","/home/samurai/dev/playground/auth/src/Config/Http.hs"] in
directory "/home/samurai/dev/playground/auth". Consult the logs for full command and error.
Failed command: cabal
--builddir=/tmp/samurai/.cache/hie-bios/dist-auth-c1823c164923004c1d81f3680fac69fa v2-repl
--with-compiler /tmp/samurai/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36
--with-hc-pkg /tmp/samurai/.cache/hie-bios/ghc-pkg-169376af3ad802e2b9c00ab9f8cee503
/home/samurai/dev/playground/auth/src/Config/Http.hs
Build profile: -w ghc-9.6.4 -O1
In order, the following will be built (use -v for more details):

  • auth-0.1.0.0 (lib) (first run)
    Preprocessing library for auth-0.1.0.0..

Error: cabal: can't find source for Config in src,
/tmp/samurai/.cache/hie-bios/dist-auth-c1823c164923004c1d81f3680fac69fa/build/x86_64-linux/ghc-9.6.4/auth-0.1.0.0/build/autogen,
/tmp/samurai/.cache/hie-bios/dist-auth-c1823c164923004c1d81f3680fac69fa/build/x86_64-linux/ghc-9.6.4/auth-0.1.0.0/build/global-autogen

Error: cabal: repl failed for auth-0.1.0.0.

Process Environment:
HIE_BIOS_GHC: /usr/lib64/ghc-9.6.4/bin/ghc-9.6.4
HIE_BIOS_GHC_ARGS: -B/usr/lib64/ghc-9.6.4/lib`

Additional info

Maybe it will help, my accept_keywords are:
`/::haskell

=dev-lang/ghc-9.6.4 **
=dev-haskell/hadrian-9.6.4 **
=dev-haskell/cabal-3.10.1.0 **
=dev-haskell/cabal-syntax-3.10.1.0 **
=dev-haskell/cabal-install-3.10.1.0 **
=dev-haskell/cabal-install-solver-3.10.1.0 **
=dev-haskell/parsec-3.1.16.1 **
=dev-haskell/text-2.0.2 **
=dev-haskell/mtl-2.3.1 **
=dev-haskell/transformers-0.6.1.0 **
=dev-haskell/stm-2.5.1.0 **
=dev-haskell/ghc-exactprint-1.7.0.1 **
=dev-haskell/haddock-api-2.29.1 **
=dev-haskell/haddock-library-1.11.0* **
=dev-haskell/haddock-2.29.1 **
app-admin/haskell-updater **`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions