IntersectMBO / plutus-apps

The Plutus application platform
Apache License 2.0
306 stars 214 forks source link

```nix-shell``` launched from this repository causes the haskell-language-srver VSCode extension not to work properly #487

Closed HarmonicPool closed 1 year ago

HarmonicPool commented 2 years ago

Summary

I can't get to work with the hls features while writing plutus as mentioned in the VSCode repository issue

Screenshot from 2022-05-29 16-02-40

Steps to reproduce the behavior

cd $PLUTUS_APPS_DIR
nix-shell

then in the generated environment:

code $myProject

Actual Result

the extension doesn't work

Expected Result

the generated environment allows me to work using the haskell-language-server features

Describe the approach you would take to fix this

see this issue

System info

lsb_release -a

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:    20.04
hasufell commented 2 years ago

Your logs from the vscode-haskell issue indicate that nix sets up HLS 1.5.1.0, which is outdated.

HarmonicPool commented 2 years ago

Well that's unfortunate since I should be using the last release

nix-shell-outdate-hls

Is there something I'm doing wrong, or that I can do inorder to get the haskel-language-server v1.7.0.0?

hasufell commented 2 years ago

Well, I have no investment in nix. I've never used plutus-apps with it. But I've developed smart contracts with just using cabal. That should work fine with the appropriate cabal.project. I usually follow https://github.com/input-output-hk/plutus-starter/blob/main/cabal.project

HarmonicPool commented 2 years ago

Well, I have no investment in nix. I've never used plutus-apps with it. But I've developed smart contracts with just using cabal. That should work fine with the appropriate cabal.project. I usually follow https://github.com/input-output-hk/plutus-starter/blob/main/cabal.project

setting up the project without ``nix``` solves the problem

zmrocze commented 2 years ago

hm, I don't have this issue with hls 1.5.1, nix and vscode. Did hls have the time to compile everything? there is progress status in the bottom stripe in vscode. Also maybe there is a compile issue earlier? As one can often get plutus-tx plugin errors (GHC Core to PLC plugin error).

HarmonicPool commented 2 years ago

yes I have lots of "GHC Core to PLC plugin error" and I have all the GHC-options specified in the plutus docs > troubleshooting > plugin errors

onestly I got used to them since when running cabal repl or cabal buld everything goes fine and any other error is showed with more priority in vscode

hls is compiled since I can use it by hand in the shell

ghost commented 1 year ago

We have switched to nix develop with newer versions of hls. Please re-open if there will be any problems with it.

Dr-Mazen-Khaddaj commented 1 year ago

@ak3n can you elaborate?