aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--runtime/plugin/python_setup.vim5
-rw-r--r--scripts/msgpack-gen.lua12
-rw-r--r--src/nvim/os/channel.c3
-rw-r--r--third-party/CMakeLists.txt25
5 files changed, 25 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1043914e8a..cb680da902 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -94,7 +94,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Find Lua interpreter
include(LuaHelpers)
-set(LUA_DEPENDENCIES lpeg cmsgpack bit)
+set(LUA_DEPENDENCIES lpeg MessagePack bit)
if(NOT LUA_PRG)
foreach(CURRENT_LUA_PRG luajit lua)
# If LUA_PRG is set find_program() will not search
diff --git a/runtime/plugin/python_setup.vim b/runtime/plugin/python_setup.vim
index 8f3cb08063..db8c6e3251 100644
--- a/runtime/plugin/python_setup.vim
+++ b/runtime/plugin/python_setup.vim
@@ -29,9 +29,8 @@ endif
" Execute python, import neovim and print a string. If import_result matches
" the printed string, we can probably start the host
-let s:import_result = substitute(system(
- \ s:python_interpreter .' -c "import neovim; print \"ok\""'),
- \ '^[\s\n]*\(ok\)[\s\n]*$', '\1', '')
+let s:import_result = system(s:python_interpreter .
+ \ ' -c "import neovim, sys; sys.stdout.write(\"ok\")"')
if s:import_result != 'ok'
finish
endif
diff --git a/scripts/msgpack-gen.lua b/scripts/msgpack-gen.lua
index 68faa18c31..916597afda 100644
--- a/scripts/msgpack-gen.lua
+++ b/scripts/msgpack-gen.lua
@@ -1,5 +1,5 @@
lpeg = require('lpeg')
-msgpack = require('cmsgpack')
+msgpack = require('MessagePack')
-- lpeg grammar for building api metadata from a set of header files. It
-- ignores comments and preprocessor commands and parses a very small subset
@@ -126,10 +126,12 @@ void msgpack_rpc_init_function_metadata(Dictionary *metadata)
{
msgpack_unpacked unpacked;
msgpack_unpacked_init(&unpacked);
- assert(msgpack_unpack_next(&unpacked,
- (const char *)msgpack_metadata,
- sizeof(msgpack_metadata),
- NULL) == MSGPACK_UNPACK_SUCCESS);
+ if (msgpack_unpack_next(&unpacked,
+ (const char *)msgpack_metadata,
+ sizeof(msgpack_metadata),
+ NULL) != MSGPACK_UNPACK_SUCCESS) {
+ abort();
+ }
Object functions;
msgpack_rpc_to_object(&unpacked.data, &functions);
msgpack_unpacked_destroy(&unpacked);
diff --git a/src/nvim/os/channel.c b/src/nvim/os/channel.c
index ad8f378dfc..1670424e4e 100644
--- a/src/nvim/os/channel.c
+++ b/src/nvim/os/channel.c
@@ -353,7 +353,8 @@ static void parse_msgpack(RStream *rstream, void *data, bool eof)
msgpack_unpack_return result;
// Deserialize everything we can.
- while ((result = msgpack_unpacker_next(channel->unpacker, &unpacked))) {
+ while ((result = msgpack_unpacker_next(channel->unpacker, &unpacked)) ==
+ MSGPACK_UNPACK_SUCCESS) {
if (kv_size(channel->call_stack) && is_rpc_response(&unpacked.data)) {
if (is_valid_rpc_response(&unpacked.data, channel)) {
call_stack_pop(&unpacked.data, channel);
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index 83a8a9c50a..66d43ff7ca 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -50,8 +50,8 @@ include(ExternalProject)
set(LIBUV_URL https://github.com/joyent/libuv/archive/v0.11.28.tar.gz)
set(LIBUV_MD5 1a849ba4fc571d531482ed74bc7aabc4)
-set(MSGPACK_URL https://github.com/msgpack/msgpack-c/archive/0335df55e1a408c0d56d43e46253c952fb8a7f04.tar.gz)
-set(MSGPACK_MD5 4c18a1625b586c0d69a0e955ce9a187f)
+set(MSGPACK_URL https://github.com/msgpack/msgpack-c/archive/ecf4b09acd29746829b6a02939db91dfdec635b4.tar.gz)
+set(MSGPACK_MD5 3599eaf904b8ba0c36cea7ed80973364)
set(LUAJIT_URL http://luajit.org/download/LuaJIT-2.0.3.tar.gz)
set(LUAJIT_MD5 f14e9104be513913810cd59c8c658dc0)
@@ -166,25 +166,26 @@ if(USE_BUNDLED_LUAROCKS)
add_custom_target(busted
DEPENDS ${DEPS_BIN_DIR}/busted)
- # lua-cmsgpack doesn't depend on busted, but luarocks is unhappy to have two
- # instances running in parallel. So we depend on busted to force it
- # to be serialized.
- add_custom_command(OUTPUT ${DEPS_LIB_DIR}/luarocks/rocks/lua-cmsgpack
+ # lua-messagepack doesn't depend on busted, but luarocks is unhappy to have
+ # two instances running in parallel. So we depend on busted to force it to
+ # be serialized.
+ add_custom_command(OUTPUT ${DEPS_LIB_DIR}/luarocks/rocks/lua-messagepack
COMMAND ${DEPS_BIN_DIR}/luarocks
- ARGS build lua-cmsgpack CC=${DEPS_C_COMPILER} LD=${DEPS_C_COMPILER}
+ ARGS build lua-messagepack CC=${DEPS_C_COMPILER} LD=${DEPS_C_COMPILER}
DEPENDS busted)
- add_custom_target(lua-cmsgpack
- DEPENDS ${DEPS_LIB_DIR}/luarocks/rocks/lua-cmsgpack)
+ add_custom_target(lua-messagepack
+ DEPENDS ${DEPS_LIB_DIR}/luarocks/rocks/lua-messagepack)
- # Like before, depend on cmsgpack to ensure serialization of install commands
+ # Like before, depend on lua-messagepack to ensure serialization of install
+ # commands
add_custom_command(OUTPUT ${DEPS_LIB_DIR}/luarocks/rocks/lpeg
COMMAND ${DEPS_BIN_DIR}/luarocks
ARGS build lpeg CC=${DEPS_C_COMPILER} LD=${DEPS_C_COMPILER}
- DEPENDS lua-cmsgpack)
+ DEPENDS lua-messagepack)
add_custom_target(lpeg
DEPENDS ${DEPS_LIB_DIR}/luarocks/rocks/lpeg)
- list(APPEND THIRD_PARTY_DEPS busted lua-cmsgpack lpeg)
+ list(APPEND THIRD_PARTY_DEPS busted lua-messagepack lpeg)
endif()
add_custom_target(third-party ALL