aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-07-02 13:47:04 +0200
committerbfredl <bjorn.linse@gmail.com>2024-08-05 12:22:12 +0200
commit1247684ae14e83c5b742be390de8dee00fd4e241 (patch)
treeea3f7e027f9568ad09a22f575d3cf07635e94e78
parentf926cc32c9262b6254e2843276b951cef9da1afe (diff)
downloadrneovim-1247684ae14e83c5b742be390de8dee00fd4e241.tar.gz
rneovim-1247684ae14e83c5b742be390de8dee00fd4e241.tar.bz2
rneovim-1247684ae14e83c5b742be390de8dee00fd4e241.zip
build(deps): remove msgpack-c dependency
-rw-r--r--.github/workflows/test.yml1
-rw-r--r--BUILD.md6
-rw-r--r--cmake.deps/CMakeLists.txt5
-rw-r--r--cmake.deps/cmake/BuildMsgpack.cmake7
-rw-r--r--cmake.deps/deps.txt3
-rw-r--r--cmake/FindMsgpack.cmake24
-rw-r--r--contrib/local.mk.example1
-rw-r--r--src/nvim/CMakeLists.txt2
-rw-r--r--src/nvim/eval/decode.c4
-rw-r--r--src/nvim/msgpack_rpc/unpacker.c8
-rw-r--r--src/nvim/shada.c8
11 files changed, 13 insertions, 56 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b6767e71b1..4759426bb4 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -241,7 +241,6 @@ jobs:
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get install -y \
libluajit-5.1-dev \
- libmsgpack-dev \
libtermkey-dev \
libunibilium-dev \
libuv1-dev \
diff --git a/BUILD.md b/BUILD.md
index 8ae13b295e..895aec5fd1 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -84,7 +84,7 @@ make deps
- Right-click _CMakeLists.txt → Delete Cache_.
- Right-click _CMakeLists.txt → Generate Cache_.
- If you see an "access violation" from `ntdll`, you can ignore it and continue.
-4. If you see an error like `msgpackc.dll not found`, try the `nvim.exe (Install)` target. Then switch back to `nvim.exe (bin\nvim.exe)`.
+4. If you see an error like `uv.dll not found`, try the `nvim.exe (Install)` target. Then switch back to `nvim.exe (bin\nvim.exe)`.
### Windows / MSVC PowerShell
@@ -240,7 +240,7 @@ cmake --build build
### How to build without "bundled" dependencies
1. Manually install the dependencies:
- - libuv libluv libutf8proc libvterm luajit lua-lpeg lua-mpack msgpack-c tree-sitter tree-sitter-c tree-sitter-lua tree-sitter-markdown tree-sitter-query tree-sitter-vim tree-sitter-vimdoc unibilium
+ - libuv libluv libutf8proc libvterm luajit lua-lpeg tree-sitter tree-sitter-c tree-sitter-lua tree-sitter-markdown tree-sitter-query tree-sitter-vim tree-sitter-vimdoc unibilium
2. Run CMake:
```sh
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
@@ -260,7 +260,7 @@ cmake --build build
#### Debian 10 (Buster) example:
```sh
-sudo apt install luajit libluajit-5.1-dev lua-mpack lua-lpeg libunibilium-dev libmsgpack-dev
+sudo apt install luajit libluajit-5.1-dev lua-lpeg libunibilium-dev
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBUV=ON -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_LIBVTERM=ON -DUSE_BUNDLED_TS=ON -DUSE_BUNDLED_UTF8PROC=ON
cmake --build .deps
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
diff --git a/cmake.deps/CMakeLists.txt b/cmake.deps/CMakeLists.txt
index 3c4a28f9ce..05db090765 100644
--- a/cmake.deps/CMakeLists.txt
+++ b/cmake.deps/CMakeLists.txt
@@ -33,7 +33,6 @@ option(USE_BUNDLED_LPEG "Use the bundled lpeg." ${USE_BUNDLED})
option(USE_BUNDLED_LUA "Use the bundled version of lua." OFF)
option(USE_BUNDLED_LUAJIT "Use the bundled version of luajit." ${USE_BUNDLED})
option(USE_BUNDLED_LUV "Use the bundled version of luv." ${USE_BUNDLED})
-option(USE_BUNDLED_MSGPACK "Use the bundled msgpack." ${USE_BUNDLED})
option(USE_BUNDLED_TS "Use the bundled treesitter runtime." ${USE_BUNDLED})
option(USE_BUNDLED_TS_PARSERS "Use the bundled treesitter parsers." ${USE_BUNDLED})
option(USE_BUNDLED_UNIBILIUM "Use the bundled unibilium." ${USE_BUNDLED})
@@ -105,10 +104,6 @@ if(USE_BUNDLED_LIBUV)
include(BuildLibuv)
endif()
-if(USE_BUNDLED_MSGPACK)
- include(BuildMsgpack)
-endif()
-
if(USE_BUNDLED_LUAJIT)
include(BuildLuajit)
endif()
diff --git a/cmake.deps/cmake/BuildMsgpack.cmake b/cmake.deps/cmake/BuildMsgpack.cmake
deleted file mode 100644
index 8f82dab140..0000000000
--- a/cmake.deps/cmake/BuildMsgpack.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-get_externalproject_options(msgpack ${DEPS_IGNORE_SHA})
-ExternalProject_Add(msgpack
- DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/msgpack
- CMAKE_ARGS ${DEPS_CMAKE_ARGS}
- -D MSGPACK_BUILD_TESTS=OFF
- -D MSGPACK_BUILD_EXAMPLES=OFF
- ${EXTERNALPROJECT_OPTIONS})
diff --git a/cmake.deps/deps.txt b/cmake.deps/deps.txt
index 9e3585472f..63ec369f76 100644
--- a/cmake.deps/deps.txt
+++ b/cmake.deps/deps.txt
@@ -1,9 +1,6 @@
LIBUV_URL https://github.com/libuv/libuv/archive/v1.48.0.tar.gz
LIBUV_SHA256 8c253adb0f800926a6cbd1c6576abae0bc8eb86a4f891049b72f9e5b7dc58f33
-MSGPACK_URL https://github.com/msgpack/msgpack-c/archive/c-6.0.1.tar.gz
-MSGPACK_SHA256 58d5fe49d0ee2b374d60a61aabf8028b2c92004e6f11bff04e74b639fc8ad541
-
LUAJIT_URL https://github.com/LuaJIT/LuaJIT/archive/04dca7911ea255f37be799c18d74c305b921c1a6.tar.gz
LUAJIT_SHA256 346b028d9ba85e04b7e23a43cc51ec076574d2efc0d271d4355141b0145cd6e0
diff --git a/cmake/FindMsgpack.cmake b/cmake/FindMsgpack.cmake
deleted file mode 100644
index 9ef18122ab..0000000000
--- a/cmake/FindMsgpack.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-find_path2(MSGPACK_INCLUDE_DIR msgpack/version_master.h)
-
-if(MSGPACK_INCLUDE_DIR)
- file(READ ${MSGPACK_INCLUDE_DIR}/msgpack/version_master.h msgpack_version_h)
- string(REGEX REPLACE ".*MSGPACK_VERSION_MAJOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MAJOR "${msgpack_version_h}")
- string(REGEX REPLACE ".*MSGPACK_VERSION_MINOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MINOR "${msgpack_version_h}")
- string(REGEX REPLACE ".*MSGPACK_VERSION_REVISION +([0-9]+).*" "\\1" MSGPACK_VERSION_REVISION "${msgpack_version_h}")
- set(MSGPACK_VERSION_STRING "${MSGPACK_VERSION_MAJOR}.${MSGPACK_VERSION_MINOR}.${MSGPACK_VERSION_REVISION}")
-else()
- set(MSGPACK_VERSION_STRING)
-endif()
-
-find_library2(MSGPACK_LIBRARY NAMES msgpackc msgpack msgpackc_import msgpack-c
- NAMES_PER_DIR)
-
-mark_as_advanced(MSGPACK_INCLUDE_DIR MSGPACK_LIBRARY)
-
-find_package_handle_standard_args(Msgpack
- REQUIRED_VARS MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR
- VERSION_VAR MSGPACK_VERSION_STRING)
-
-add_library(msgpack INTERFACE)
-target_include_directories(msgpack SYSTEM BEFORE INTERFACE ${MSGPACK_INCLUDE_DIR})
-target_link_libraries(msgpack INTERFACE ${MSGPACK_LIBRARY})
diff --git a/contrib/local.mk.example b/contrib/local.mk.example
index 58474a3750..61fc0b95b8 100644
--- a/contrib/local.mk.example
+++ b/contrib/local.mk.example
@@ -48,7 +48,6 @@
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LIBVTERM=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUAJIT=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_LUV=OFF
-# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_MSGPACK=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_TS=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_TS_PARSERS=OFF
# DEPS_CMAKE_FLAGS += -DUSE_BUNDLED_UNIBILIUM=OFF
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index eeb7e76616..0fe159f594 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -32,7 +32,6 @@ find_package(Iconv REQUIRED)
find_package(Libuv 1.28.0 REQUIRED)
find_package(Libvterm 0.3.3 REQUIRED)
find_package(Lpeg REQUIRED)
-find_package(Msgpack 1.0.0 REQUIRED)
find_package(Treesitter 0.22.6 REQUIRED)
find_package(Unibilium 2.0 REQUIRED)
find_package(UTF8proc REQUIRED)
@@ -41,7 +40,6 @@ target_link_libraries(main_lib INTERFACE
iconv
libvterm
lpeg
- msgpack
treesitter
unibilium
utf8proc)
diff --git a/src/nvim/eval/decode.c b/src/nvim/eval/decode.c
index 1ff8716763..afc2efddf6 100644
--- a/src/nvim/eval/decode.c
+++ b/src/nvim/eval/decode.c
@@ -1010,7 +1010,7 @@ static void typval_parse_enter(mpack_parser_t *parser, mpack_node_t *node)
}
}
-/// free node which was entered but never exited, due to a nested error
+/// Free node which was entered but never exited, due to a nested error
///
/// Don't bother with typvals as these will be GC:d eventually
void typval_parser_error_free(mpack_parser_t *parser)
@@ -1109,7 +1109,7 @@ msgpack_to_vim_generic_map: {}
}
default:
- // other kinds are handled completely in typval_parse_enter,
+ // other kinds are handled completely in typval_parse_enter
break;
}
}
diff --git a/src/nvim/msgpack_rpc/unpacker.c b/src/nvim/msgpack_rpc/unpacker.c
index 9372754b01..efd9a1a11f 100644
--- a/src/nvim/msgpack_rpc/unpacker.c
+++ b/src/nvim/msgpack_rpc/unpacker.c
@@ -525,12 +525,12 @@ bool unpacker_parse_redraw(Unpacker *p)
}
}
-/// require complete string. safe to use e.g. in shada as we have loaded a complete shada item into
-/// a linear buffer.
+/// Requires a complete string. safe to use e.g. in shada as we have loaded a
+/// complete shada item into a linear buffer.
///
-/// data and size are preserved in cause of failure
+/// Data and size are preserved in cause of failure.
///
-/// @return "data" is NULL exact when failure (non-null data and size=0 for
+/// @return "data" is NULL only when failure (non-null data and size=0 for
/// valid empty string)
String unpack_string(const char **data, size_t *size)
{
diff --git a/src/nvim/shada.c b/src/nvim/shada.c
index e5479a7d40..672ad79579 100644
--- a/src/nvim/shada.c
+++ b/src/nvim/shada.c
@@ -1313,9 +1313,9 @@ static char *shada_filename(const char *file)
return xstrdup(file);
}
-#define PACK_KEY(s) mpack_str(STATIC_CSTR_AS_STRING(KEY_NAME(s)), &sbuf);
-#define KEY_NAME(s) #s
-#define KEY_NAME2(s) KEY_NAME(s)
+#define KEY_NAME_(s) #s
+#define PACK_KEY(s) mpack_str(STATIC_CSTR_AS_STRING(KEY_NAME_(s)), &sbuf);
+#define KEY_NAME(s) KEY_NAME_(s)
#define SHADA_MPACK_FREE_SPACE (4 * MPACK_ITEM_SIZE)
@@ -3301,7 +3301,7 @@ shada_read_next_item_start:
}
if (it.rc.size == 0) {
semsg(_(READERR("register",
- "has " KEY_NAME2(REG_KEY_CONTENTS) " key with missing or empty array")),
+ "has " KEY_NAME(REG_KEY_CONTENTS) " key with missing or empty array")),
initial_fpos);
goto shada_read_next_item_error;
}