Commit Graph

301 Commits

Author SHA1 Message Date
Christian Clason
ee4bbc3af2 build(deps): bump treesitter-vimdoc to v2.2.0
adds support for `{arg}?` optional arguments #27644
2024-03-02 10:24:01 +01:00
zhaozg
72e3d8c3f9 fix(deps): bump luv to 1.48.0-2
close #27678

Return a userdata wrapper around the uv_req_t to allow it to be garbage collected before the program exits.
Previously, the returned userdata held a reference to itself in the Lua registry, meaning it would never be able to be garbage collected until the process ended.

This reverts commit 0e4a895, which attempted a workaround for the same underlying problem, but introduced a use-after-free.

```
Application Specific Information:
abort() called

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x18cde20dc __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x18ce19cc0 pthread_kill + 288
2   libsystem_c.dylib             	       0x18cd25a40 abort + 180
3   libsystem_malloc.dylib        	       0x18cc3cb08 malloc_vreport + 908
4   libsystem_malloc.dylib        	       0x18cc403f4 malloc_report + 64
5   libsystem_malloc.dylib        	       0x18cc54ebc find_zone_and_free + 308
6   nvim                          	       0x100eb13b8 uv__fs_scandir_cleanup + 84
7   nvim                          	       0x100eb7e68 uv_fs_req_cleanup + 120
8   nvim                          	       0x100e03634 luv_fs_gc + 132
9   nvim                          	       0x100e42aec lj_BC_FUNCC + 44
10  nvim                          	       0x100e44cc8 gc_call_finalizer + 148 (lj_gc.c:521)
11  nvim                          	       0x100b7fdb4 nlua_push_Object + 320 (converter.c:781)
12  nvim                          	       0x100b7fc48 nlua_push_Dictionary + 332 (converter.c:722)
13  nvim                          	       0x100992228 nlua_api_nvim_get_mode + 160 (lua_api_c_bindings.generated.c:6379)
14  nvim                          	       0x100e42aec lj_BC_FUNCC + 44
15  nvim                          	       0x100e590b4 lua_pcall + 228 (lj_api.c:1150)
```
2024-03-02 09:38:34 +01:00
Christian Clason
c6c19c3b2d build(deps): bump luv to 1.48.0-1 2024-02-27 10:31:02 +01:00
dundargoc
71384129f7 build: download libiconv and gettext from deps repository
Downloading it from https://ftp.gnu.org/pub/gnu/ has started to become
unreliable and we can therefore no longer rely on it.
2024-02-24 17:45:52 +01:00
Christian Clason
63c9e0c4ae build(deps): bump lua-compat-5.3 to v0.13
* Convert lua_pushlstring from a macro to a function
* strerror_r is not available on mingw
* Support getting io.popen results on file:close() on PUC-Rio Lua 5.1
* Fix missing closing parenthesis in preprocessor macro
* fix detection of LUA_USE_WINDOWS define

Also switch to new org
2024-02-24 15:04:20 +01:00
Christian Clason
42f8ada59d build(deps): bump luv to v1.48.0-0
* fix: Use os_uname() to check for Linux by @cryptomilk in #686
    * docs: typo in a table field name by @Bilal2453 in #689
    * docs: most new_handle methods won't return fail by @Bilal2453 in #683
    * test-tty: Don't depend on stdin/stdout handle type by @squeek502 in #688
    * Bump/libuv by @zhaozg in #690
    * Annotate .gitmodules with branch and tag by @creationix in #693
2024-02-22 10:07:04 +01:00
Christian Clason
d9e6a442f2 build(deps): bump tree-sitter to v0.21.0 2024-02-21 23:10:25 +01:00
Gregory Anders
a75ef40f4c
build: set deps default build type to Release (#27495)
Debugging dependencies is rare so a Debug build type is usually not
needed. In cases where it _is_ needed it is easy to rebuild in Debug
mode. But since Release builds are more common, it makes more sense as a
default.

For Neovim itself we stick with a Debug build as a default, since
rebuilding and debugging is done _much_ more frequently than with
dependencies (which we _mostly_ expect to "just work").

Also remove the CMAKE_BUILD_TYPE variable in the Makefile, since this is
set by default in CMake.
2024-02-16 11:56:52 -06:00
Christian Clason
d60eeacae4 build(deps): bump tree-sitter-c to v0.20.8
* fix: allow function definitions to contain preproc attributes

Also update URLs for parsers transferred to tree-sitter-grammars
2024-02-15 17:21:42 +01:00
Christian Clason
71429c90ee build(deps): bump tree-sitter-bash to v0.20.5 2024-02-10 14:49:09 +01:00
dundargoc
4788abf2da build: stop installing parser.h from treesitter 2024-02-09 12:08:25 +01:00
Christian Clason
02cc84b4d9 build(deps): bump libuv to v1.48.0 2024-02-08 10:19:50 +01:00
Christian Clason
1ed6b9cd2c build(deps): bump luajit to HEAD - 0d313b243 2024-02-04 20:58:14 +01:00
Christian Clason
20f97af417 build(deps): bump luajit to HEAD - 9cc2e42b1 2024-02-01 09:31:36 +01:00
Christian Clason
35a147fa77 build(deps): bump tree-sitter to v0.20.9 2024-01-25 23:39:25 +01:00
Christian Clason
e8aec1ecc5 build(deps): bump tree-sitter-bash to v0.20.4 2024-01-25 17:58:36 +01:00
Christian Clason
a9653a02aa build(deps): bump luajit to HEAD - 343ce0eda 2024-01-25 16:59:02 +01:00
dundargoc
ae3eed53d6 build: various build improvements
- remove "ran-" prefix from touch files as it's redundant since the
  they're already in the directory named `touches`.
- Include `contrib` when formatting with `make formatlua`.
- Use TARGET_FILE generator expression instead of assuming the
  executable location.
- reuse logic that determines whether to use lua or luajit.
- add translations to the `nvim` target.

Makefile improvements:
- rename variable `CMAKE_PRG` to `CMAKE` to make it more consistent with
  the builtin `MAKE` variable.
- stop propagating flags to generator. Users should use cmake for
  non-standard use cases.
- remove `+` prefix from targets. If the user for whatever reason wants
  to dry-run a target then they should be able to.
2024-01-24 12:41:09 +01:00
Christian Clason
932c7eb019 build(deps): bump luajit to HEAD - f2336c48f 2024-01-23 22:38:18 +01:00
Christian Clason
a7eb1e6004 build(deps): bump luajit to HEAD - 3ca0a8071 2024-01-22 23:47:46 +01:00
Christian Clason
012cfced9b build(deps): bump tree-sitter-c to v0.2.7 2024-01-22 17:58:33 +01:00
Justin M. Keyes
95cbedaa17
docs: various #25289
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com>
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
2024-01-18 00:14:48 -08:00
Christian Clason
4615d46f93 build(deps): bump tree-sitter-vimdoc to v2.1.0
Add support for `(note)`.
2024-01-17 13:07:55 +01:00
Christian Clason
91ba9d0bf4 build(deps): bump tree-sitter to HEAD - 660481dbf 2024-01-16 09:58:02 +01:00
Christian Clason
2eb74bff0e build(deps): bump luv to 1.47.0-0 2024-01-06 12:02:27 +01:00
Christian Clason
84f6216130 build(deps): bump luajit to HEAD - c525bcb90 2023-12-24 09:51:10 +01:00
dundargoc
404fdb0f36 build: cmake fixes
- add EXTERNALPROJECT_OPTIONS variable to main build
- use `REQUIRED` keyword for IWYU.
- remove check_c_compiler_flag checks when `ENABLE_COMPILER_SUGGESTIONS`
  is `ON`. If we explicitly enable it then we probably want it to give
  an error if it doesn't exist, rather than silently skip it.
- Move dependency interface libraries to their find module and use them
  as a pseudo-imported target.
- Remove BUSTED_OUTPUT_TYPE. It's not used and we can reintroduce it
  again if something similar is needed.
- Use LINK_OPTIONS intead of LINK_FLAGS when generating the `--version`
  output.
2023-12-16 21:06:28 +01:00
dundargoc
7840760776 build: bump minimum cmake version to 3.13
The benefits are primarily being able to use FetchContent, which allows
for a more flexible dependency handling. Other various quality-of-life
features such as `-B` and `-S` flags are also included.

This also removes broken `--version` generation as it does not work for
version 3.10 and 3.11 due to the `JOIN` generator expression.

Reference: https://github.com/neovim/neovim/issues/24004
2023-12-16 17:17:24 +01:00
dundargoc
896b400bff build: fix universal mac builds
Cmake 3.28+ will fail if two projects download the same file to prevent
scheduling problems. This can be circumvented by downloading luajit to a
unique location for each target. This is theoretically non-optimal since
we need to download the same file three times for universal builds, but
universal builds are rare and the convenience of this method outweighs
setting up the dependencies optimally. This fixes the currently broken
release workflow for mac.

Closes https://github.com/neovim/neovim/issues/26526.
2023-12-16 16:47:22 +01:00
Christian Clason
c95b9a32f8 build(deps): bump luajit to HEAD - ff204d035 2023-12-11 10:29:46 +01:00
dundargoc
404043e74c build: vendor libtermkey
This is a proof of concept/WIP to evaluate the viability of vendoring
libtermkey as it's been deprecated.
2023-11-30 12:02:10 -06:00
dundargoc
99b8a343e1 fixup: quick update, squash later 2023-11-20 15:21:55 +01:00
dundargoc
7a80e169c5 build: disable all compiler warnings from dependencies 2023-11-20 15:21:55 +01:00
dundargoc
bec2ebebda build: various cmake fixes
- Correct MSVC warning suppression. The C4003 warning is issued during
  file generation and not for the actual source files.
- Remove non-existent "scripts/pvscheck.sh" file from `lintsh` target.
- Remove spaces inside for loops with uncrustify.
- Point dependencies to use a git tag rather than releases, as releases
  might have changes that deviate from the actual source code.
- Automatically update uncrustify config before formatting or linting.
2023-11-18 18:38:45 +01:00
dundargoc
a388c852c4 build: update libtermkey commit
The new commit includes the following patches:

bf544610f5
dcb198a85c

Fixes https://github.com/neovim/neovim/issues/26038.
2023-11-16 22:02:45 +01:00
Christian Clason
d92dd2a0c0 build(deps): bump luajit to HEAD - 43d0a1915 2023-11-15 09:39:43 +01:00
Christian Clason
cbad7f8c21 build(deps): bump luajit to HEAD - 113a168b7 2023-11-13 10:11:29 +01:00
Christian Clason
430b8da01d build(deps): bump tree-sitter-markdown to v0.1.7 2023-11-10 16:56:10 +01:00
Christian Clason
0a82fa9989 build(deps): bump luajit to HEAD - 69bbbf773 2023-11-10 15:33:18 +01:00
Christian Clason
4c8fdc018b build(deps): bump luajit to HEAD - b94fbfbee 2023-11-08 08:30:14 +01:00
Christian Clason
3ca967387c build(deps): bump libuv to v1.47.0 2023-11-07 09:43:48 +01:00
ObserverOfTime
f9416470b1 fix(build): include FindPackageHandleStandardArgs 2023-11-06 17:46:02 +01:00
Christian Clason
f1e9aa8f7e build(deps): bump luajit to HEAD - 07b3cd3cf 2023-11-06 08:12:00 +01:00
dundargoc
8ae39eb584 build: remove git requirement
We do not have any patches that we use at the moment, so git is not
needed right now. Futhermore, we've become more strict with not adding
patches, which makes it pretty safe to remove this for the time being.
2023-11-05 21:39:24 +01:00
Christian Clason
c513cbf361 build(deps): bump luajit to HEAD - 0afa1676b 2023-11-05 15:25:44 +01:00
Christian Clason
a8aebcff50 build(deps): bump libiconv to 1.17
new license (LGPL 2.1), adds EBCDIC encodings
2023-11-05 13:30:47 +01:00
dundargoc
5cefec7349 build: various cmake fixes
- silence false warnings on MSVC
- merge `clang-tidy` cmake target into `lintc` and remove the
  corresponding make target
- use cmake's built-in endianness detection
2023-11-04 18:32:47 +01:00
dundargoc
8405649f92 build: use neovim/libvterm instead of neovim/deps for libvterm
Using a mirror makes it easier to test patches as well as reducing
maintenance when a new version is released.
2023-10-29 12:14:19 +01:00
dundargoc
4f526b9fd8 build: use neovim/libtermkey instead of neovim/deps for libtermkey
Using a mirror makes it easier to test patches as well as reducing
maintenance when a new version is released.
2023-10-28 22:32:52 +02:00
Christian Clason
752c6ce4ad build(deps): bump luajit to HEAD - e826d0c10 2023-10-21 14:14:12 +02:00
James McCoy
a8fc94a2fd build(deps): include Find module
Now that all the Find<Foo>.cmake modules are using our custom
find_path2, the bundled deps build needs to include the Find module so
it has access to find_path2.

The missing include was causing the PPA build to fail:

```
cd .deps && \
	cmake -G 'Unix Makefiles'   \
	-DUSE_EXISTING_SRC_DIR=ON -DUSE_BUNDLED_LUAROCKS=OFF -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_GPERF=OFF -DUSE_BUNDLED_LUA=OFF /<<PKGBUILDDIR>>//cmake.deps
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found GNU Make at /usr/bin/make
-- CMAKE_BUILD_TYPE not specified, default is 'Debug'
-- Performing Test HAS_OG_FLAG
-- Performing Test HAS_OG_FLAG - Success
-- Found Git: /usr/bin/git (found version "2.17.1")
CMake Error at /<<PKGBUILDDIR>>/cmake/FindLuajit.cmake:1 (find_path2):
  Unknown CMake command "find_path2".
Call Stack (most recent call first):
  cmake/BuildLuv.cmake:13 (find_package)
  CMakeLists.txt:127 (include)

-- Configuring incomplete, errors occurred!
```
2023-10-18 23:47:20 +02:00
dundargoc
b80a8e2c16 build: adjust how find order is prioritized
Ensure bundled libraries and include directories are always searched
first before any others. This will provide a more consistent experience
as the search order of the builtin find_ functions can vary depending on
system. This should make the build process faster when building with
bundled deps as we limit the search to only the .deps directory.
Separating the search between .deps and everything makes debugging
find_-related problems simpler if you need to check how dependencies are
found.

For libraries, we divide the search process into the following order:
1. Only search in .deps directory and only search for static libraries.
2. Only search in .deps directory and search for all libraries.
3. Search everywhere and search for all libraries.

Make an exception for FindLibintl.cmake as changing the search order
seems to break some tests on macos.
2023-10-16 20:15:41 +02:00
Christian Clason
dadc06ced2 build(deps): bump luajit to HEAD - 656ecbcf8 2023-10-09 09:25:26 +02:00
Christian Clason
ef77180908 build(deps): bump luajit to HEAD - becf5cc65 2023-09-25 18:06:54 +02:00
Christian Clason
b8103eece3 build(deps): bump luajit to HEAD - 97c75843c 2023-09-23 10:46:43 +02:00
Christian Clason
520ef606e9 build(deps): bump luajit to HEAD - d1a2fef8a 2023-09-21 08:16:44 +02:00
Christian Clason
767b968647 build(deps): bump luajit to HEAD - e897c5743 2023-09-17 12:27:08 +02:00
Christian Clason
fe2fa98460 build(deps): bump luajit to HEAD - 7a77a3cd8 2023-09-15 09:10:00 +02:00
Christian Clason
3849cc9c18 build(deps): bump luajit to HEAD - 8af63f992 2023-09-12 09:01:52 +02:00
Christian Clason
6c1b7535fe build(deps): bump tree-sitter to HEAD - 46af27796 2023-09-12 09:01:38 +02:00
Christian Clason
e99a3fd25d build(deps): bump luajit to HEAD - 5a18d4582 2023-09-10 12:48:52 +02:00
dundargoc
54d357dce0
build: bump lpeg to 1.1.0 (#25016)
Release notes indicates it has better UTF8 handling which is relevant
for us.
2023-09-04 22:42:47 +02:00
dundargoc
c50951a4d0
build: various fixes
- simplify lua interpreter search
- fix incorrect variable name in BuildLua.cmake
- build PUC Lua with -O2
- silence non-mandatory find_package search for libuv
- simplify Find modules
- Prefer using the explicitly set CI_BUILD over relying on the
  environment variable "CI".
2023-09-04 00:00:26 +02:00
Christian Clason
62869da11c build(deps): bump luajit to HEAD - 41fb94def 2023-08-30 10:03:19 +02:00
Christian Clason
009c84322d build(deps): bump luajit to HEAD - 83954100d 2023-08-29 09:42:18 +02:00
Amaan Qureshi
7c4d317a66 build(deps): bump tree-sitter to HEAD 2023-08-29 02:43:01 +09:00
Sanchayan Maity
874b8172a6 build(deps): bump tree-sitter-python to v0.20.4 2023-08-27 10:03:24 +09:00
zhaozg
c4728a5c46 build(deps): bump luv to HEAD dcd1a1c 2023-08-27 10:02:43 +09:00
Christian Clason
3e80b39a8e build(deps): bump luajit to HEAD - 03c31124c
Switch to a rolling release, so the `0-beta3` suffix is dropped in favor
of the date. Remove the custom UNIX command as the symlink is now
created by the LuaJIT Makefile.
2023-08-23 11:23:11 +09:00
Christian Clason
d7ae9ae3e5 build(deps): bump tree-sitter to HEAD - ab09ae20d 2023-08-19 03:16:14 +02:00
Christian Clason
7aad4643f9 fix(deps): remove stray conflict marker
fixup for 22d397c233
2023-08-15 12:32:20 +02:00
Christian Clason
22d397c233 build(deps): bump tree-sitter-lua to v0.0.19 2023-08-15 11:43:17 +02:00
Christian Clason
6d93bdd458 build(deps): bump tree-sitter-c to v0.20.6 2023-08-14 09:53:25 +02:00
Christian Clason
c3dd84e76f build(deps): bump tree-sitter-c to v0.20.5 2023-08-13 12:30:47 +02:00
Christian Clason
e3ce025e55 build(deps): bump luajit to HEAD - 72efc42ef 2023-08-13 11:55:12 +02:00
Christian Clason
2e824e89c1
build(deps): bump tree-sitter to HEAD - 0a1c4d846 (#24607)
adapt to breaking change in `ts_query_cursor_set_max_start_depth`
https://github.com/tree-sitter/tree-sitter/pull/2278
2023-08-08 14:57:06 +02:00
zeertzjq
c4f775fa57
build(deps): bump libvterm to 0.3.3 (#24547)
Fix #21106
2023-08-04 07:08:43 +08:00
Christian Clason
41cefe5130
build(deps): bump tree-sitter-c to v0.20.4 (#24495) 2023-07-27 12:45:08 +02:00
Christian Clason
183147a906
build(deps): bump tree-sitter to HEAD - 3f44b8968 (#24447) 2023-07-23 11:39:45 +02:00
Christian Clason
011166438d
build(deps): bump tree-sitter-python to v0.20.3 (#24446) 2023-07-23 11:17:13 +02:00
Christian Clason
ad95b36985
fix(treesitter): update markdown parser and queries (#24429) 2023-07-22 19:57:58 +02:00
Christian Clason
998bebc15e
build(deps): bump luajit to HEAD - 8635cbabf (#24301) 2023-07-13 09:35:36 +02:00
Christian Clason
2d40f5e843
build(deps): bump luv to 1.45.0-0 (#24228)
https://github.com/luvit/luv/releases/tag/1.45.0-0
2023-07-02 11:17:23 +02:00
Christian Clason
cb0a1a10b2 feat(treesitter): add bash parser and queries 2023-07-01 11:28:32 +02:00
Christian Clason
88c8803aa1 feat(treesitter): add python parser and queries 2023-07-01 11:28:32 +02:00
Christian Clason
11844dde81
feat(treesitter): bundle markdown parser and queries (#22481)
* bundle split Markdown parser from https://github.com/MDeiml/tree-sitter-markdown
* add queries from https://github.com/nvim-treesitter/nvim-treesitter/tree/main
* upstream `#trim!` and `#inject-language!` directives

Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-07-01 11:08:06 +02:00
Christian Clason
538b6c3853
build(deps): bump libuv to v1.46.0 (#24218)
https://github.com/libuv/libuv/releases/tag/v1.46.0
2023-07-01 11:07:54 +02:00
Justin M. Keyes
99cb1f0c37 build(deps): tree-sitter-vimdoc v2.0.1 2023-06-26 11:29:12 +02:00
Christian Clason
b697c0cd4f
fix(treesitter): update lua parser and queries (#24148) 2023-06-26 09:25:46 +02:00
Justin M. Keyes
46fab3831b refactor: remove WINGUI_URL
nvim-qt was removed in 0370e4def0
2023-06-12 00:06:30 +02:00
dundargoc
0370e4def0
build!: remove neovim qt
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.
2023-06-06 19:19:00 +02:00
Christian Clason
a8ee4c7a81
build(deps): bump luajit to HEAD - 51fb2f2c3 (#23886) 2023-06-02 19:41:47 +02:00
Christian Clason
c855eee919
feat(term): enable reflow by default (#21124)
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.
2023-05-24 10:04:49 +02:00
James McCoy
8a6716682e
fix(deps): restore functionality of USE_EXISTING_SRC_DIR
30a0299bc removed the USE_EXISTING_SRC_DIR hack which broke building the
nightly PPA since ExternalProject tried to download the sources.
2023-05-22 19:24:36 -04:00
dundargoc
8b8e607284
build: move luarocks and rocks installation to main build
This will ensure luacheck and busted are only installed when they're
actually needed. This cuts total build time by over 50%.

Closes https://github.com/neovim/neovim/issues/22797.
2023-05-21 20:57:39 +02:00
Christian Clason
bbedbc347f build(deps): bump luv to HEAD - c1497c0ff 2023-05-21 10:52:50 +02:00
Christian Clason
4c05b1a6ab
build(deps): bump libuv to v1.45.0 (#23684) 2023-05-19 14:15:24 +02:00
dundargoc
826b95203a
build: bundle uncrustify
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.
2023-05-18 16:27:47 +02:00
Christian Clason
0dbed7132b build(deps): update lua parser and queries 2023-05-15 14:13:31 +02:00
Christian Clason
33687f5e87
build(deps): bump libuv to HEAD - 30fc896cc (#23636) 2023-05-15 11:22:34 +02:00