Flaky test (osx):
[ FAILED ] ...is/build/neovim/neovim/test/functional/lua/loop_spec.lua @ 23: vim.loop timer
...is/build/neovim/neovim/test/functional/lua/loop_spec.lua:56: Expected objects to be the same.
Passed in:
(number) 0
Expected:
(number) 2
stack traceback:
...is/build/neovim/neovim/test/functional/lua/loop_spec.lua:56: in function <...is/build/neovim/neovim/test/functional/lua/loop_spec.lua:23>
It was bumped from sleeping for 20ms to 50ms in d33aaa0f5f already.
Fix issue that increment expression is executable and pointer ext
pointing out of the buffer, if the pointer ext points to the terminating
NUL.
* Change termination condition judgment to one place
* Change first condition judgment
Change to not evaluate *(ext -1) in the first condition judgment.
* Change to use copy_option_part instead of STRLCPY
- Move .luacheckrc to root, add read_globals=vim
- Simplify lualint target, run it on all lua files
- Lint preload.lua, but ignore W211
- Remove testlint target, included in lualint (and lint)
- Clean up .luacheckrc
This is required to (re)build e.g. libluv when the version changes
(which triggers a new download).
With `make deps`, changing the `LUV_URL`/`LUV_SHA256`, and `make deps` again:
Before:
> Up-to-date: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a
After:
> Installing: /home/daniel/Vcs/neovim/.deps/usr/lib/libluv.a
See with https://github.com/neovim/neovim/pull/10358 - where .deps
contained libluv 1.29, the merge updates it to 1.30, but then it failed
to link because `libluv.a` is considered to be up-to-date (after
downloading the new version).
Note that header files get installed, since they have the original time
stamp, but `libluv.a` is being generated (does not use the timestamp
from the archive here, but needs to get rebuild).
It could be argued that the build system of the included project should
catch/handle this, but it seems to be good practice to clean the binary
/ build dir with a new download to start from scratch.
Ref: https://gitlab.kitware.com/cmake/cmake/issues/19452
Also fixes cmake/BuildLuv / luv-static: use name with -DTARGET for
download command, and pass (shared) `SRC_DIR` explicitly instead.
[ ERROR ]...neovim/neovim/test/functional/autocmd/termclose_spec.lua @ TermClose event triggers when fast-exiting terminal job stops
test/functional/helpers.lua:96: Vim(call):E900: Invalid channel id
stack traceback:
test/functional/helpers.lua:96: in function 'request'
test/functional/helpers.lua:254: in function 'command'
...neovim/neovim/test/functional/autocmd/termclose_spec.lua:23: in function <...neovim/neovim/test/functional/autocmd/termclose_spec.lua:20>
* Revert "oldtests: win: keep set dir=/"
This reverts commit 714e0f8bf0.
* test/old: set swap directory to non-existent drive
Appveyor uses Administrator user so it can write anywhere in C:\\.
Neovim creates a directory for the swap file
if the directory does not exist.
D:\\ is the backup/recovery drive so use F:\\ invoke error E303.
Rationale: the purpose of nvim_execute_lua is to simply call lua code with lua
values. If a lua function expects a floating point value, it should be enough
to specify a float as argument to nvim_execute_lua.
However, make sure to preserve the existing roundtripping behavior of
API values when using `vim.api` functions. This is covered by existing
lua/api_spec.lua tests.
Required after d33aaa0f5.
Does not really make a difference, since the VERSION is not handled with
our FindLibLUV (due to missing pkg-config information
(https://github.com/luvit/luv/issues/354)).
* build: update some test dependencies
* luacheck ignores
* BuildLua: add ${BUSTED} to depends for ${BUSTED_LUA}
This is required to rebuild it when busted gets updated.
Main improvement: do not error out, but re-run CMake in case
CMAKE_INSTALL_PREFIX changed, and only check it for "install".
- only look at CMAKE_EXTRA_FLAGS via shell if not empty
- add CMAKE_INSTALL_PREFIX to CMAKE_EXTRA_FLAGS (not CMAKE_FLAGS), to
override it being set in CMAKE_EXTRA_FLAGS from local.mk
- use an empty "checkprefix" target if CMAKE_INSTALL_PREFIX is not
provided
- skip checking of cached value without build/.ran-cmake; it will be run
then anyway
- only use it with "install" target; it is only relevant there
- do not error, but re-run CMake (by removing the stamp file)
This matches Vim behavior. From `:help :ls` :
R a terminal buffer with a running job
F a terminal buffer with a finished job
? a terminal buffer without a job: `:terminal NONE`
TODO: implement `:terminal NONE`.
ref #10349
Keeps using add_definitions for compatibility with older CMake.
Newer CMake (3.12) would have `add_compile_definitions`, but it is not
required, since `add_defitions` was meant to be used for
compile/preprocessor definitions initially anyway.
Ref: https://github.com/neovim/neovim/pull/4389
Seen on Travis (osx):
[ RUN ] timers can be stopped from the handler: FAIL
.../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: Expected objects to be the same.
Passed in:
(number) 2
Expected:
(number) 3
stack traceback:
.../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: in function <.../build/neovim/neovim/test/functional/eval/timer_spec.lua:153>
Performance of high-resolution time (clock_gettime via uv_hrtime) is
expensive on some systems. For profiling VimL, syntax, etc., we don't
care about nanosecond-precision and monotonicity edge-cases, so avoid
uv_hrtime().
closes#10328
From the uv__hrtime() source:
0cdb4a5b4b/src/unix/linux-core.c (L442-L462)
/* Prefer CLOCK_MONOTONIC_COARSE if available but only when it has
* millisecond granularity or better. CLOCK_MONOTONIC_COARSE is
* serviced entirely from the vDSO, whereas CLOCK_MONOTONIC may
* decide to make a costly system call.
*/
This micro-benchmark (Debug build) shows negligible differences on my
system:
#include <sys/time.h>
...
proftime_T tm = profile_start();
int trials = 999999;
int64_t t = 0;
struct timeval tv;
for (int i = 0; i < trials; i++) {
t += gettimeofday(&tv,NULL);
}
tm = profile_end(tm);
ILOG("%d trials of gettimeofday: %s", trials, profile_msg(tm));
tm = profile_start();
for (int i = 0; i < trials; i++) {
t += os_hrtime();
}
tm = profile_end(tm);
ILOG("%d trials of os_hrtime: %s", trials, profile_msg(tm));
tm = profile_start();
for (int i = 0; i < trials; i++) {
t += os_utime();
}
tm = profile_end(tm);
ILOG("%d trials of os_utime: %s", trials, profile_msg(tm));
ILOG("%zu", t);
Problem: Search test can be flaky.
Solution: Use WaitFor() instead of a delay. Make it possible to pass a
funcref to WaitFor() to avoid the need for global variables.
(James McCoy, closesvim/vim#2282)
13deab8d08
Problem: Incremental search only shows one match.
Solution: When 'incsearch' and and 'hlsearch' are both set highlight all
matches. (haya14busa, closesvim/vim#2198)
2e51d9a097