Closed hasufell closed 6 years ago
Even after adding transformers-0.5.5.0
to extra-deps, it fails:
Configuring nvim-hs-1.0.0.1...
Building nvim-hs-1.0.0.1...
Preprocessing library nvim-hs-1.0.0.1...
[ 1 of 29] Compiling Neovim.Plugin.Startup ( library/Neovim/Plugin/Startup.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Plugin/Startup.o )
[ 2 of 29] Compiling Neovim.Log ( library/Neovim/Log.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Log.o )
[ 3 of 29] Compiling Neovim.Exceptions ( library/Neovim/Exceptions.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Exceptions.o )
[ 4 of 29] Compiling Neovim.Compat.Megaparsec ( library/Neovim/Compat/Megaparsec.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Compat/Megaparsec.o )
[ 5 of 29] Compiling Neovim.Classes ( library/Neovim/Classes.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Classes.o )
[ 6 of 29] Compiling Neovim.Plugin.Classes ( library/Neovim/Plugin/Classes.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Plugin/Classes.o )
[ 7 of 29] Compiling Neovim.Plugin.IPC.Classes ( library/Neovim/Plugin/IPC/Classes.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Plugin/IPC/Classes.o )
[ 8 of 29] Compiling Neovim.Plugin.IPC ( library/Neovim/Plugin/IPC.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Plugin/IPC.o )
[ 9 of 29] Compiling Neovim.Context.Internal ( library/Neovim/Context/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Context/Internal.o )
[10 of 29] Compiling Neovim.Context ( library/Neovim/Context.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Context.o )
[11 of 29] Compiling Neovim.Plugin.Internal ( library/Neovim/Plugin/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Plugin/Internal.o )
[12 of 29] Compiling Neovim.Config ( library/Neovim/Config.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Config.o )
[13 of 29] Compiling Neovim.RPC.Common ( library/Neovim/RPC/Common.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/RPC/Common.o )
[14 of 29] Compiling Neovim.Util ( library/Neovim/Util.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/Util.o )
[15 of 29] Compiling Neovim.RPC.Classes ( library/Neovim/RPC/Classes.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/RPC/Classes.o )
[16 of 29] Compiling Neovim.RPC.FunctionCall ( library/Neovim/RPC/FunctionCall.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/RPC/FunctionCall.o )
[17 of 29] Compiling Neovim.RPC.EventHandler ( library/Neovim/RPC/EventHandler.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/RPC/EventHandler.o )
[18 of 29] Compiling Neovim.RPC.SocketReader ( library/Neovim/RPC/SocketReader.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/RPC/SocketReader.o )
[19 of 29] Compiling Neovim.API.Parser ( library/Neovim/API/Parser.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/API/Parser.o )
[20 of 29] Compiling Neovim.API.TH ( library/Neovim/API/TH.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/API/TH.o )
[21 of 29] Compiling Neovim.API.String ( library/Neovim/API/String.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/Neovim/API/String.o )
/tmp/stack23185/nvim-hs-1.0.0.1/library/Neovim/API/String.hs:24:3: error:
Illegal variable name: ‘type’
When splicing a TH declaration:
nvim_set_client_info name_0 version_1 type_2 methods_3 attributes_4 = Neovim.RPC.FunctionCall.scall ((Neovim.Plugin.Classes.F GHC.Base.. Data.ByteString.UTF8.fromString) "nvim_set_client_info") [Neovim.Classes.toObject name_0,
Neovim.Classes.toObject version_1,
Neovim.Classes.toObject type_2,
Neovim.Classes.toObject methods_3,
Neovim.Classes.toObject attributes_4]
I had no trouble installing it. The output for for everything up until stack build
has been the same for me. stack build
simply worked. I tested on a debian stretch machine with a relatively fresh install of stack.
It is odd that you had to pin the transformers version to 0.5.5.0
because it is the version in the nightly snapshot (nightly-2018-06-18). The stack.yaml
looks like this for me (after removing comments):
resolver: nigthly-2018-06-18
packages:
- .
Can you try renaming your ~/.stack
directory and do a fresh stack setup
and stack build
?
Can you try renaming your ~/.stack directory and do a fresh stack setup and stack build?
That would kinda break everything else I've done on my system via stack, no? So rather not.
Hence "renaming", so you can go back in a few seconds.
same error.
Okay, the function nvim_set_client_info
seems to be very new and the neovim version I was testing with did not have it. I guess the API code generator should ignore variable names and just number them.
I may fix it tomorrow or at the weekend.
One probably has to replace the parameterlist here https://github.com/neovimhaskell/nvim-hs/blob/master/library/Neovim/API/TH.hs#L173 with a sufficiently large list of different variable names.
$ zipWith (\i _ -> "arg" ++ show i) [1..] (parameters nf)
If you cannot wait, feel free to test it and create a PR. ;-)
You'll have to use a version >= 1.0.0.2 of nvim-hs
. I'll make a relase in a few minutes.