diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2023-02-02 19:02:58 +0000 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2023-02-02 19:02:58 +0000 |
| commit | b255fa570d8b041e4c81e3454d51e06100c2fa4f (patch) | |
| tree | d3b246b467500ca48067ed4a45d2fa53966cd9f1 | |
| parent | eeccad2ff1ae8892fe9e06d733a7b07a166eecb0 (diff) | |
| parent | 0bd07bea095a8000cffa4f379c1fa53e009c1143 (diff) | |
| download | rneovim-20230125_mix.tar.gz rneovim-20230125_mix.tar.bz2 rneovim-20230125_mix.zip | |
Merge branch 'aucmd_textputpost' into 20230125_mix20230125_mix
110 files changed, 2006 insertions, 1646 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b158d966e1..83ee4f0358 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -128,7 +128,7 @@ jobs: - uses: actions/checkout@v3 - name: Setup common environment variables - run: ./.github/workflows/env.sh lint + run: ./.github/workflows/env.sh lintc - name: Install apt packages run: | @@ -141,14 +141,17 @@ jobs: libtree-sitter-dev \ libunibilium-dev \ libuv1-dev \ - libvterm-dev \ lua-busted \ lua-filesystem \ lua-inspect \ lua-lpeg \ - lua-luv-dev \ lua-nvim \ luajit + # libvterm-dev \ + # lua-luv-dev + + # Remove comments from packages once we start using these external + # dependencies. See env.sh for more context. - uses: ./.github/actions/cache @@ -156,7 +159,7 @@ jobs: run: ./ci/before_script.sh - name: Build nvim - run: ./ci/run_tests.sh build_nvim + run: make - if: "!cancelled()" name: Determine if run should be aborted diff --git a/.github/workflows/env.sh b/.github/workflows/env.sh index d93552fed3..42a355da44 100755 --- a/.github/workflows/env.sh +++ b/.github/workflows/env.sh @@ -26,7 +26,6 @@ BUILD_FLAGS="CMAKE_FLAGS=-DCI_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_ case "$FLAVOR" in asan) - BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON" cat <<EOF >> "$GITHUB_ENV" CLANG_SANITIZER=ASAN_UBSAN ASAN_OPTIONS=detect_leaks=1:check_initialization_order=1:log_path=$GITHUB_WORKSPACE/build/log/asan:intercept_tls_get_addr=0 @@ -44,13 +43,15 @@ EOF BUILD_UCHAR=1 EOF ;; - lint) + lintc) # Re-enable once system deps are available # BUILD_FLAGS="$BUILD_FLAGS -DLIBLUV_LIBRARY:FILEPATH=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/lua/5.1/luv.so -DLIBLUV_INCLUDE_DIR:PATH=/usr/include/lua5.1" - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUV=ON" - cat <<EOF >> "$GITHUB_ENV" -USE_BUNDLED=OFF -EOF + + # Ideally all dependencies should external for this job, but some + # dependencies don't have the required version available. We use the + # bundled versions for these with the hopes of being able to remove them + # later on. + DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUV=ON -DUSE_BUNDLED_LIBVTERM=ON" ;; functionaltest-lua) BUILD_FLAGS="$BUILD_FLAGS -DPREFER_LUA=ON" diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml index 46ac0ec02d..11807e9b42 100644 --- a/.github/workflows/news.yml +++ b/.github/workflows/news.yml @@ -22,9 +22,10 @@ jobs: { echo " Pull request includes a new feature or a breaking change, but - news.txt hasn't been updated yet. news.txt is our primary way of - communicating changes to users so it's important to keep it up to - date." + news.txt hasn't been updated yet. This is just a reminder + that news.txt may need to be updated. You can ignore this CI + failure if you think the change won't be of interest to + users." exit 1 } fi diff --git a/CMakeLists.txt b/CMakeLists.txt index 493c212996..9c0d999ab8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,11 @@ set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches) set_property(GLOBAL PROPERTY USE_FOLDERS ON) +find_program(CCACHE_PRG ccache) +if(CCACHE_PRG) + set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env CCACHE_SLOPPINESS=pch_defines,time_macros ${CCACHE_PRG}) +endif() + # Prefer our bundled versions of dependencies. if(DEFINED ENV{DEPS_BUILD_DIR}) if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") @@ -112,11 +117,6 @@ endif() message(STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") set_default_buildtype() -if(CMAKE_BUILD_TYPE MATCHES Debug) - set(DEBUG 1) -else() - set(DEBUG 0) -endif() # If not in a git repo (e.g., a tarball) these tokens define the complete # version string, else they are combined with the result of `git describe`. @@ -370,7 +370,7 @@ endif() if(BUSTED_PRG) get_target_property(TEST_INCLUDE_DIRS main_lib INTERFACE_INCLUDE_DIRECTORIES) - set(UNITTEST_PREREQS nvim-test) + set(UNITTEST_PREREQS nvim) set(FUNCTIONALTEST_PREREQS nvim printenv-test printargs-test shell-test pwsh-test streams-test tty-test ${GENERATED_HELP_TAGS}) set(BENCHMARK_PREREQS nvim tty-test) @@ -380,6 +380,7 @@ if(BUSTED_PRG) COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_PRG} -DLUA_PRG=${LUA_PRG} + -DNVIM_PRG=$<TARGET_FILE:nvim> -DWORKING_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBUSTED_OUTPUT_TYPE=${BUSTED_OUTPUT_TYPE} -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test @@ -394,17 +395,9 @@ if(BUSTED_PRG) message(WARNING "disabling unit tests: no Luajit FFI in ${LUA_PRG}") endif() - if(LUA_HAS_FFI) - set(TEST_LIBNVIM_PATH $<TARGET_FILE:nvim-test>) - else() - set(TEST_LIBNVIM_PATH "") - endif() configure_file( ${CMAKE_SOURCE_DIR}/test/cmakeconfig/paths.lua.in - ${CMAKE_BINARY_DIR}/test/cmakeconfig/paths.lua.gen) - file(GENERATE - OUTPUT ${CMAKE_BINARY_DIR}/test/cmakeconfig/paths.lua - INPUT ${CMAKE_BINARY_DIR}/test/cmakeconfig/paths.lua.gen) + ${CMAKE_BINARY_DIR}/test/cmakeconfig/paths.lua) add_custom_target(functionaltest COMMAND ${CMAKE_COMMAND} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ce0f2ace05..f1c7ca1cb3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,6 +42,11 @@ Developer guidelines make distclean make # Nvim build system uses ninja automatically, if available. ``` +- Install `ccache` for faster rebuilds of Nvim. Nvim will use it automatically + if it's found. To disable caching use: + ``` + CCACHE_DISABLE=true make + ``` Pull requests (PRs) --------------------- @@ -132,7 +132,7 @@ functionaltest-lua: | nvim FORMAT=formatc formatlua format LINT=lintlua lintsh lintc check-single-includes lintcommit lint TEST=functionaltest unittest -generated-sources benchmark $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake +generated-sources benchmark uninstall $(FORMAT) $(LINT) $(TEST): | build/.ran-cmake $(CMAKE_PRG) --build build --target $@ test: $(TEST) @@ -173,4 +173,4 @@ $(DEPS_BUILD_DIR)/%: phony_force $(BUILD_TOOL) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@) endif -.PHONY: test clean distclean nvim libnvim cmake deps install appimage checkprefix benchmark $(FORMAT) $(LINT) $(TEST) +.PHONY: test clean distclean nvim libnvim cmake deps install appimage checkprefix benchmark uninstall $(FORMAT) $(LINT) $(TEST) diff --git a/ci/common/build.sh b/ci/common/build.sh index e30d0337b5..95972aab13 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -16,8 +16,7 @@ build_make() { } build_deps() { - if test "${FUNCTIONALTEST}" = "functionaltest-lua" \ - || test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then + if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON" fi @@ -66,13 +65,6 @@ build_nvim() { if ! top_make libnvim ; then exit 1 fi - - if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then - echo "Building nvim-test." - if ! top_make nvim-test ; then - exit 1 - fi - fi fi # Invoke nvim to trigger *San early. diff --git a/cmake.config/config.h.in b/cmake.config/config.h.in index c8377bf45c..4669e42c0f 100644 --- a/cmake.config/config.h.in +++ b/cmake.config/config.h.in @@ -1,8 +1,6 @@ #ifndef AUTO_CONFIG_H #define AUTO_CONFIG_H -#cmakedefine DEBUG - #cmakedefine SIZEOF_INT @SIZEOF_INT@ #cmakedefine SIZEOF_INTMAX_T @SIZEOF_INTMAX_T@ #cmakedefine SIZEOF_INT32_T @SIZEOF_INT32_T@ diff --git a/cmake.deps/CMakeLists.txt b/cmake.deps/CMakeLists.txt index a7e71ffc92..90ae91463d 100644 --- a/cmake.deps/CMakeLists.txt +++ b/cmake.deps/CMakeLists.txt @@ -153,8 +153,8 @@ set(LUA_SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333) set(LUAROCKS_URL https://github.com/luarocks/luarocks/archive/v3.8.0.tar.gz) set(LUAROCKS_SHA256 ab6612ca9ab87c6984871d2712d05525775e8b50172701a0a1cabddf76de2be7) -set(UNIBILIUM_URL https://github.com/neovim/unibilium/archive/92d929f.tar.gz) -set(UNIBILIUM_SHA256 29815283c654277ef77a3adcc8840db79ddbb20a0f0b0c8f648bd8cd49a02e4b) +set(UNIBILIUM_URL https://github.com/neovim/unibilium/archive/d72c3598e7ac5d1ebf86ee268b8b4ed95c0fa628.tar.gz) +set(UNIBILIUM_SHA256 9c4747c862ab5e3076dcf8fa8f0ea7a6b50f20ec5905618b9536655596797487) set(LIBTERMKEY_URL https://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz) set(LIBTERMKEY_SHA256 6945bd3c4aaa83da83d80a045c5563da4edd7d0374c62c0d35aec09eb3014600) @@ -194,8 +194,8 @@ set(TREESITTER_LUA_SHA256 930d0370dc15b66389869355c8e14305b9ba7aafd36edbfdb468c8 set(TREESITTER_VIM_URL https://github.com/vigoux/tree-sitter-viml/archive/55ff1b080c09edeced9b748cf4c16d0b49d17fb9.tar.gz) set(TREESITTER_VIM_SHA256 1b1cd39e33c8fb02fa7fe3977e844883c2a8508a7edd621f2d21e39a9aee |