Skip to content

findExecutable in Wrapper.hs execute prebuilt's hls rather than 'cabal build''s output #4711

@ZichaoNickFox

Description

@ZichaoNickFox

Is your enhancement request related to a problem? Please describe.

  1. According https://haskell-language-server.readthedocs.io/en/stable/contributing/contributing.html#building-with-nix. Using nix-shell to execute wrapper.
  2. Executing cabal run haskell-language-server-wrapper lsp
  3. Code run to
    mexes <- liftIO $ traverse findExecutable candidates
  4. The mexe found by findExecutable turns out as following. Rather than exe from dist-newstyle which contains cabal build's output.
mexes =
  [ Just "/nix/store/x4njcm292dm8wgqjhxyp4jxcx77sz3x2-haskell-language-server-2.10.0.0/bin/haskell-language-server-9.8.4"
  , Just "/nix/store/x4njcm292dm8wgqjhxyp4jxcx77sz3x2-haskell-language-server-2.10.0.0/bin/haskell-language-server"
  ]
  1. The exes on nix store is added in here. Rather than cabal build's output
    hpkgs.haskell-language-server

Describe the solution you'd like

  1. Maybe upgrade the documentation https://haskell-language-server.readthedocs.io/en/stable/contributing/contributing.html#building-with-nix. Using nix to compile and startup Wrapper?
  2. Maybe change findExecutable way to find the cabal build's exe?
  3. Maybe precompile tools chains than import?
    hpkgs.haskell-language-server

Describe alternatives you've considered

Or I need help, Maybe my execution method has issue.

Additional context

None.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions