Neovim QT was originally bundled on Windows as a response to the then
lackluster terminal options. The situation has dramatically changed,
with viable options such as Windows terminal, Alacritty and Wezterm to
name a few. The Windows build no longer needs this special treatment for
neovim to be usable.
Pros:
- Release builds will be smaller.
- Less maintenance burden.
- Clearer separation of responsibility (neovim issues go to the neovim
repo and neovim-qt issues to the neovim-qt repo).
- More consistent treatment between platforms.
Cons:
- Users who've come to expect neovim-qt to be bundled with nvim will
need to adjust and download neovim-qt from
https://github.com/equalsraf/neovim-qt instead.
- Similarly, build scripts will need to be adjusted to reflect this
change.
Closes https://github.com/neovim/neovim/issues/21209.
libvterm v0.3 supports reflow of terminal buffer when Nvim is resized
Since v0.3 is now a required dependency, enable it by default to find
(and fix) possible issues.
Note: Neovim's scrollback buffer does not support reflow (yet), so lines
vanishing into the buffer due to a too small window will be restored
without reflow.
Uncrustify is sensitive to version changes, which causes friction for
contributors that doesn't have that exact version. It's also simpler to
download and install the correct version than to have bespoke version
checking.
- Simplify error checking when using execute_process.
- Set BUILD_SHARED_LIBS to OFF when building dependencies.
This is normally not needed, but msgpack interprets an unset
BUILD_SHARED_LIBS to build a shared library, which is the opposite of
the cmake behavior.
- Move function check_lua_module to Util.cmake.
- Remove unnecessary code.
- Make variable naming more consistent
Cmake won't rebuild with the new URL when bumping dependency version.
This is because the old URL is still cached, and won't be removed
automatically. The workaround for using non-cached variables, but also
let users specify an alternative URL is to only set the defined
variables in deps.txt if the corresponding variable hasn't already been
set by the user from the command line.
Also apply the CMAKE_CONFIFGURE_DEPENDS property to deps.txt, as we want
cmake to rebuild when changing this file.
The previous logic made it possible to install bundled luarocks, but
also use external rocks, making the luarocks installation unnecessary.
Instead, let's assume that if the user wants to use the bundled
luarocks, then they also want to use it to install necessary rocks.
Problem: Lpeg requires Lua headers. Currently the include directories
for Lpeg are set only to the bundled deps folder, so if the user wants
to use system Lua/Luajit, Lpeg will not find the system headers and will
fail to build.
Solution: Add system Lua/Luajit include directories when USE_BUNDLED_LUA
and USE_BUNDLED_LUAJIT are turned off.
Fixes#23469
The cmake.deps build will read this file and set the left part of the
text as the variable name and the right part as the variable value. The
benefit of doing this is that it becomes much easier to parse which
dependencies are required, as well as to bump dependencies with
scripts/bump_deps.lua.
Adjust bump_deps.lua script to work with this new format.
The shipped versions of xdiff already does everything diff does, so this
duplication of tools isn't necessary. Furthermore, this setup is more
consistent overall, as the 'diffopt=external' option should be for
external programs rather than programs we bundle neovim with.
Install diffutils for oldtests in CI to avoid needing to modify tests.
- Remove unused function argument from GetBinaryDeps
- Remove unused variable LUA_LOAD_PACKAGE_MODULE_SOURCE
- Add LUA_FS_MODULE_SOURCE as a dependency of VIM_MODULE_FILE
The function keeps track of the previously installed rock, meaning we no
longer need to manually keep track of the dependency chain. This will
make adding or removing rocks much easier.
Currently, the release build picks up headers in
`/Library/Frameworks/Mono.framework/Headers`. You can verify this by
downloading the latest nightly build and checking the output of `nvim
--version`.
These headers are likely to be from a different version of `libintl` than the
one we link to. Let's avoid usage of them by setting `CMAKE_FIND_FRAMEWORK` to
`NEVER`.
Follow-up to eb1da498d6. The workaround in
that case only works if md5sum is in users path. We work around this by
adding the directory with the md5sum shipped with luarocks to PATH.
Co-authored-by: erw7 <erw7.github@gmail.com>
Problem: tree-sitter-viml parser was not maintained and missing a
release, making it difficult for distros to package Neovim.
Solution: fork the parser under the neovim org, merge some outstanding
PRs, perform general cleanup, make a release, and use this for the
build.
Problem: www.leonerd.org.uk is sometimes unreachable
Solution: switch to Launchpad URLs for libvterm (official page) and
libtermkey (source mirror for Ubuntu package)
The wintools executables are stored in a zip file, making it
inconvenient to bump these during releases. Instead, unpack the
executables in the deps repository and download each executable
separately.
Older gcc versions (4.x) require passing --std=c99 compiler flag to
prevent warnings from being emitted. Instead of setting it for each
dependency, it's easier to just pass the CMAKE_C_STANDARD flag to all
dependencies. This also prevents the scenario of us forgetting to set it
if we add new dependencies.
Neovim and the generated headers needs to use the same include
directories to build correctly. However, we need to generate headers
before all target dependencies has been resolved, meaning that we cannot
rely on any target to determine the final list of include directories.
This may lead to a problems when bundling some, but not all or none,
dependencies as the dependency include directory won't be included.
Also remove the dependency path options as this assumes a specific
structure on the dependency build directory.
Problem:
When building with gcc 4.9.2, tree-sitter throws warning: "for loop initial
declarations are only allowed in C99 or C11 mode"
Solution:
set CMAKE_C_STANDARD option to 99
Since 0007aa50bd the build unsets all URL
variable immediately when USE_EXISTING_SRC_DIR is TRUE, which is
correct. However, this causes the function BuildTSParser to break down
as cmake functions aren't traditionally equipped to deal with empty
variables. Using cmake_parse_arguments fixes this issue.
We provide options such as "DEPS_BIN_DIR" for the user to set, but only
sometimes use them. This makes binaries and other files to be spread out
if the user defines a custom DEPS_BIN_DIR location.
* Remove C++ requirement if test is disabled
* Change CMake package name of C library to msgpack-c
* Unified all C package, library, cmake, tarball name become msgpack-c.
This will reduce required boilerplate, but more importantly it will
automatically unset variables ending on URL. This will help people
needing to avoid to unset the URL variable each time a new dependency is
added.
It is possible that this may remove a non-download variable ending on
"URL" in the future, however, the risk of this is likely much lower than
the risk of someone forgetting to unset the variable.
- Remove unused code
- Use consistent casing. Variable names such as LibLuV_LIBRARIES is
needlessly jarring, even if the name might be technically correct.
- Use title casing for packages. find_package(unibilium) requires the
find_module to be named "Findunibilium.cmake", which makes it harder
to spot when scanning the files. Instead, use "Unibilium".
Previously, all targets were connected in one main target called
third-party in order to remove any potentially conflicting shared
library. We can make each dependency target independent of each other by
only removing shared libraries from luajit and msgpack in their own
targets, as only these has unwanted shared libraries.
Eliminates lua-client and non-static libluv as test time dependencies
Note: the API for a public lua-client is not yet finished.
The interface needs to be adjusted to work in the embedded loop
of a nvim instance (to use it to talk between instances)
This makes it easier to see that -D is referring to the entire
"<variable>=<value>", rather than only <variable>. It also help syntax
highlighters highlight built-in variables.
Also remove Libvterm-tbl2inc_c.cmake as it's not required. It's used to
generate files that are already provided by the Libvterm project by
default. It's also not really something we need to concern ourselves
with as it's more of an authoring tool for the Libvterm creator as
mentioned in
https://github.com/neovim/neovim/pull/21986#issuecomment-1403733054.
There are a number of cmake variables and cache variables that need to
be passed to all dependencies. This is not only cumbersome, but also
fragile as it's easy to miss adding or removing a flag from a dependency
by accident. Introducing a global variable that controls all builds
makes it much easier to handle our dependencies.
Also fixes the currently broken release workflow as we need to pass the
CMAKE_OSX_ARCHITECTURES variable to all dependencies built with cmake.
It's simpler to let cmake figure out what flags to add to each platforms
to create position independent code rather than handling it ourselves.
Also remove code that sets POSITION_INDEPENDENT_CODE property on SHARED
and MODULE libraries, as it's already on by default.