Closed longngn closed 3 years ago
I've ran into a similar scenario where it seems to be ignoring flags in my ghc-options
and adding a pragma for -fno-ignore-interface-pragmas
to the file has helped.
Something like {-# OPTIONS_GHC -fno-ignore-interface-pragmas #-}
in the file listed in your "attachments" section
/Users/nguyenlevulong/code/minswap/minswap-core/src/Minswap/PubKey,hs
Make sure you are testing the file directly by passing it like haskell-language-server /Users/nguyenlevulong/code/minswap/minswap-core/src/Minswap/PubKey,hs
I've ran into a similar scenario where it seems to be ignoring flags in my
ghc-options
and adding a pragma for-fno-ignore-interface-pragmas
to the file has helped.Something like
{-# OPTIONS_GHC -fno-ignore-interface-pragmas #-}
in the file listed in your "attachments" section/Users/nguyenlevulong/code/minswap/minswap-core/src/Minswap/PubKey,hs
Make sure you are testing the file directly by passing it like
haskell-language-server /Users/nguyenlevulong/code/minswap/minswap-core/src/Minswap/PubKey,hs
Fixed, turns out I have to add these 3 pragmas to every files in my Plutus project in order for HLS to work
{-# OPTIONS_GHC -fno-ignore-interface-pragmas #-}
{-# OPTIONS_GHC -fno-omit-interface-pragmas #-}
{-# OPTIONS_GHC -fobject-code #-}
Area
Summary
I run
haskell-language-server
innix-shell
and getProgram error: GHC Core to PLC plugin: Reference to a name which is not a local, a builtin, or an external INLINABLE function
However,cabal build
works fine. There are also many people in Plutus Pioneers Program getting similar errors:Steps to reproduce
Steps to reproduce the behavior:
plutus
repo with newest commit, runnix-shell
cd
to a smart contract project and runhaskell-language-server
Expected behavior
HLS should succeed like
cabal build
System info (please complete the following information):
Screenshots and attachments
Also see above Discord messages
Additional context
N/A