Problem:
Neovim will not build for ARM64 using MSVC due to misconfigured
gettext dependency build settings.
Solution:
Fix the dependency build settings for gettext when building with MSVC.
(cherry picked from commit 7737f89206)
Problem: Neovim bundles treesitter parsers for bash and python but does
not use them by default. This dilutes the messaging about the bundled
parsers being required for functionality or reasonable out-of-the-box
experience. It also increases the risk of query incompatibilities for no
gain.
Solution: Stop bundling bash and python parser and queries.
(cherry picked from commit 51d85f7ea5)
`GIT_REPOSITORY` will cause cmake to rebuild if local dependency
changes, which isn't the case for `URL`.
Also document how to test a different commits of a dependency.
This will reduce friction as developers no longer need to provide a hash
when testing out different commits.
To skip the hash check, set `DEPS_IGNORE_SHA` to `TRUE` in
`cmake.deps/CMakeLists.txt`.
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)
```
* 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
* 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
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.
- 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.