haskell / haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Apache License 2.0
2.65k stars 354 forks source link

Is ghcide-bench supposed to be built and installed by default? #4359

Open juhp opened 1 month ago

juhp commented 1 month ago

Your environment

Which OS do you use? Fedora Linux

Which version of GHC do you use and how did you install it? ghc-9.4.5 from Fedora How is your project built (alternative: link to the project)? https://github.com/fedora-haskell/haskell-language-server

Which version of HLS do you use and how did you install it? 2.9.0

What's wrong?

bindir/ghcide-bench gets installed. Is it intended for end users?

Debug information

https://download.copr.fedorainfracloud.org/results/petersen/haskell-language-server/fedora-rawhide-aarch64/07729207-haskell-language-server/builder-live.log.gz

juhp commented 1 month ago

Perhaps I can just delete it? I should probably just have asked in matrix first, but since I searched here I thought I would post the question...

wz1000 commented 1 month ago

No, it is an internal tool not needed by users.

juhp commented 1 month ago

So why is it built or rather how can I stop it?

juhp commented 1 month ago

I guess this is a bug report then :-)

wz1000 commented 1 month ago

The only executables you need are haskell-language-server and haskell-language-server-wrapper. I guess you just want to instruct your build system to build those explicitly.

juhp commented 1 month ago

I would still prefer if I could just cabal install and get the needed executables. Couldn't the ghcide-bench executable be put behind a flag? That feels the right thing to do?

michaelpj commented 1 month ago

I don't see any particular reason why we should insist on cabal install <package> doing what you want rather than cabal install <package>:<executable>?

fendor commented 1 month ago

So, installing from hackage can (only?) be done via cabal install haskell-language-server which does build and install ghcide-bench executable.

In particular, you definitely can't run cabal install exe:haskell-language-server or cabal install haskell-language-server:exe:haskell-language-server.

That's indeed more annoying than necessary, imo.

I think it should be possible to disable ghcide-bench by default, but to allow cabal install exe:ghcide-bench without further configuration using an automatic cabal flag that's false by default. Doesn't seem to quite work as we want it to.