Right now I’m participating in Plutus Pioneer Program and enjoying it so far!
To make exercises and follow the lectures, I want to setup my editor for haskell/plutus development, which includes setting up the haskell-language-server. And I’m having troubles with it
haskell-language-serverprovided from nix-shell.
If I setup nix-shell from
plutusrepo I get
haskell-language-serverthere. But it doesn’t work on macOS due to problems with dynamic linking. Since HLS binary provided in nix-shell is compiled without dynamic linking, it just crashes when I try to use it for writing Plutus contracts.
- Being unable to use HLS from nix-shell, I deviced to build it from source with dynamic linking support. For this I haven’t used anything from nix-shell, I just installed latest version of ghc system-wide and used it. HLS started to work but it reports different errors of kind
Error: Reference to a name which is not a local, a builtin, or an external INLINABLE function. It doesn’t prevent from using HLS but it is very annoying.
Considering all the above I have several questions:
- For writing Plutus smart contracts, do we need to use
plutusrepo and GHC of specific version provided there?
- If answer for the first question is YES, how can I build hls of right version with right version GHC?
- If answer for the first question is NO, how can I resolve the type of errors mentioned above? Steps described here don’t work for me.
Please help a pioneer to start adopting this amazing tech
Thanks in advance!