Closed haroldcarr closed 2 years ago
Could be the hie.yaml
file that is too simplistic and hls is only working for the first project declared in the cabal.project
. We probably need to bring in something like implicit-hie
or rewrite hie.yaml
to be:
cradle:
cabal:
- path: "cooked-validators/src"
component: "lib:cooked-validators"
- path: "examples/src"
component: "lib:examples"
I tried it using an hie.yaml
file generated by gen-hie
but it fails the same way.
With no changes, does HLS work for you in examples
?
Here is what gen-hie
generates:
cradle:
cabal:
- path: "cooked-validators/src"
component: "lib:cooked-validators"
- path: "cooked-validators/tests/"
component: "cooked-validators:test:spec"
- path: "examples/src"
component: "lib:examples"
- path: "examples/tests"
component: "examples:test:spec"
For me, HLS works in src/PMultiSigStateful/DatumHijacking.hs
, src/Forge.hs
, src/PMultiSigStateful.hs
, src/Split.hs
and tests/UseCaseCrowdfundingSpec.hs
exclusively (so roughly one third of the files of the examples
folder).
I heard recently that it is a known issue that the Plutus GHC plugin interacts badly with HLS. I assumed that it is the reason why some files of this folder does not support HLS, but I did not investigate it at all.
We've made multiple updates to the HLS and I've seen it working on the examples, closing this until we can repro it again!
Note: I named the directory
plutus-libs-tweag
(instead ofplutus-libs
).In emacs, navigate to any haskell file in
cooked-validators/src/*
. HLS works correctly. Note: HLS works incooked-validators/tests/*
too. For success, the emacs buffer*lsp-haskell:stderr*
contains:In emacs, navigate to any haskell file in
examples/src/*
. HLS fails.The emacs
*Messages*
buffers contains:The emacs
*lsp-haskell:stderr*
buffer contains:Environment