Update minimum supported NeoVim version to 0.6.0

Stop officially supporting NeoVim versions below 0.6.0, without
necessarily breaking ALE for people using older versions.
This commit is contained in:
w0rp 2023-09-07 19:59:05 +01:00
parent 14350dbb0d
commit 108e858d61
No known key found for this signature in database
GPG Key ID: 0FC1ECAA8C81CD83
8 changed files with 66 additions and 71 deletions

View File

@ -28,7 +28,7 @@ jobs:
vim-version:
- '--vim-80-only'
- '--vim-90-only'
- '--neovim-02-only'
- '--neovim-06-only'
- '--neovim-08-only'
- '--linters-only'
steps:

View File

@ -4,7 +4,7 @@ FROM testbed/vim:${TESTBED_VIM_VERSION}
RUN install_vim -tag v8.0.0027 -build \
-tag v9.0.0297 -build \
-tag neovim:v0.2.0 -build \
-tag neovim:v0.6.0 -build \
-tag neovim:v0.8.0 -build
ENV PACKAGES="\

View File

@ -5,7 +5,7 @@
![ALE Logo by Mark Grealish - https://www.bhalash.com/](https://user-images.githubusercontent.com/3518142/59195920-2c339500-8b85-11e9-9c22-f6b7f69637b8.jpg)
ALE (Asynchronous Lint Engine) is a plugin providing linting (syntax checking
and semantic errors) in NeoVim 0.2.0+ and Vim 8.0+ while you edit your text files,
and semantic errors) in NeoVim 0.6.0+ and Vim 8.0+ while you edit your text files,
and acts as a Vim [Language Server Protocol](https://langserver.org/) client.
<video autoplay="true" muted="true" loop="true" controls="false" src="https://user-images.githubusercontent.com/3518142/210141215-8f2ff760-6a87-4704-a11e-c109b8e9ec41.mp4" title="An example showing what ALE can do."></video>

View File

@ -48,7 +48,7 @@ documented functions and options, until a major version is planned. Breaking
changes should be preceded by a deprecation phase complete with warnings.
Changes required for security may be an exception.
ALE supports Vim 8 and above, and NeoVim 0.2.0 or newer. These are the
ALE supports Vim 8 and above, and NeoVim 0.6.0 or newer. These are the
earliest versions of Vim and NeoVim which support |job|, |timer|, |closure|,
and |lambda| features. All ALE code should be written so it is compatible with
these versions of Vim, or with version checks so particular features can
@ -156,7 +156,7 @@ environments.
1. Vim 8.0.0027 on Linux via GitHub Actions.
2. Vim 9.0.0297 on Linux via GitHub Actions.
3. NeoVim 0.2.0 on Linux via GitHub Actions.
3. NeoVim 0.6.0 on Linux via GitHub Actions.
4. NeoVim 0.8.0 on Linux via GitHub Actions.
6. Vim 8 (stable builds) on Windows via AppVeyor.

View File

@ -14,6 +14,7 @@ let g:loaded_ale_dont_use_this_in_other_plugins_please = 1
" A flag for detecting if the required features are set.
if has('nvim')
" We check for NeoVim 0.2.0+, but we only officially support NeoVim 0.6.0
let s:has_features = has('timers') && has('nvim-0.2.0')
else
" Check if Job and Channel functions are available, instead of the
@ -25,7 +26,7 @@ if !s:has_features
" Only output a warning if editing some special files.
if index(['', 'gitcommit'], &filetype) == -1
" no-custom-checks
echoerr 'ALE requires NeoVim >= 0.2.0 or Vim 8 with +timers +job +channel'
echoerr 'ALE requires NeoVim >= 0.6.0 or Vim 8 with +timers +job +channel'
" no-custom-checks
echoerr 'Please update your editor appropriately.'
endif

View File

@ -24,7 +24,7 @@ tests='test/*.vader test/*/*.vader test/*/*/*.vader'
# These flags are forwarded to the script for running Vader tests.
verbose_flag=''
quiet_flag=''
run_neovim_02_tests=1
run_neovim_06_tests=1
run_neovim_08_tests=1
run_vim_80_tests=1
run_vim_90_tests=1
@ -43,7 +43,7 @@ while [ $# -ne 0 ]; do
--build-image)
run_vim_80_tests=0
run_vim_90_tests=0
run_neovim_02_tests=0
run_neovim_06_tests=0
run_neovim_08_tests=0
run_linters=0
shift
@ -54,7 +54,7 @@ while [ $# -ne 0 ]; do
run_linters=0
shift
;;
--neovim-02-only)
--neovim-06-only)
run_neovim_08_tests=0
run_vim_80_tests=0
run_vim_90_tests=0
@ -62,27 +62,27 @@ while [ $# -ne 0 ]; do
shift
;;
--neovim-08-only)
run_neovim_02_tests=0
run_neovim_06_tests=0
run_vim_80_tests=0
run_vim_90_tests=0
run_linters=0
shift
;;
--vim-only)
run_neovim_02_tests=0
run_neovim_06_tests=0
run_neovim_08_tests=0
run_linters=0
shift
;;
--vim-80-only)
run_neovim_02_tests=0
run_neovim_06_tests=0
run_neovim_08_tests=0
run_vim_90_tests=0
run_linters=0
shift
;;
--vim-90-only)
run_neovim_02_tests=0
run_neovim_06_tests=0
run_neovim_08_tests=0
run_vim_80_tests=0
run_linters=0
@ -91,14 +91,14 @@ while [ $# -ne 0 ]; do
--linters-only)
run_vim_80_tests=0
run_vim_90_tests=0
run_neovim_02_tests=0
run_neovim_06_tests=0
run_neovim_08_tests=0
shift
;;
--fast)
run_vim_80_tests=0
run_vim_90_tests=0
run_neovim_02_tests=0
run_neovim_06_tests=0
run_neovim_08_tests=1
shift
;;
@ -113,7 +113,7 @@ while [ $# -ne 0 ]; do
echo ' -q Hide output for successful tests'
echo ' --build-image Run docker image build only.'
echo ' --neovim-only Run tests only for NeoVim'
echo ' --neovim-02-only Run tests only for NeoVim 0.2'
echo ' --neovim-06-only Run tests only for NeoVim 0.2'
echo ' --neovim-08-only Run tests only for NeoVim 0.8'
echo ' --vim-only Run tests only for Vim'
echo ' --vim-80-only Run tests only for Vim 8.2'
@ -228,7 +228,7 @@ trap cancel_tests INT TERM
for vim in $(docker run --rm "$DOCKER_RUN_IMAGE" ls /vim-build/bin | grep '^neovim\|^vim' ); do
if ( [[ $vim =~ ^vim-v8.0 ]] && ((run_vim_80_tests)) ) \
|| ( [[ $vim =~ ^vim-v9.0 ]] && ((run_vim_90_tests)) ) \
|| ( [[ $vim =~ ^neovim-v0.2 ]] && ((run_neovim_02_tests)) ) \
|| ( [[ $vim =~ ^neovim-v0.6 ]] && ((run_neovim_06_tests)) ) \
|| ( [[ $vim =~ ^neovim-v0.8 ]] && ((run_neovim_08_tests)) ); then
echo "Starting Vim: $vim..."
file_number=$((file_number+1))

View File

@ -45,7 +45,7 @@ Execute(The start position should be returned when results can be requested):
AssertEqual 11, ale#completion#OmniFunc(1, '')
Execute(The omnifunc function should return async results):
" Neovim 0.2.0 and 0.4.4 struggles at running these tests.
" Neovim struggles at running these tests.
if !has('nvim')
call timer_start(0, function('SetCompletionResult'))

View File

@ -2,10 +2,6 @@ Before:
Save g:ale_use_neovim_diagnostics_api
function! CollectMessages(buffer)
if !has('nvim-0.6')
return
endif
let l:messages = []
for l:diag in v:lua.vim.diagnostic.get(a:buffer)
call add(l:messages, l:diag.message)
@ -22,56 +18,54 @@ After:
Execute(Should only set diagnostics belonging to the given buffer):
if has('nvim-0.6')
let b:other_bufnr = bufnr('/foo/bar/baz', 1)
" Make sure we actually get another buffer number, or the test is invalid.
AssertNotEqual -1, b:other_bufnr
let b:other_bufnr = bufnr('/foo/bar/baz', 1)
" Make sure we actually get another buffer number, or the test is invalid.
AssertNotEqual -1, b:other_bufnr
let g:ale_use_neovim_diagnostics_api = 1
let g:ale_use_neovim_diagnostics_api = 1
call ale#engine#SetResults(bufnr('%'), [
\ {
\ 'lnum': 1,
\ 'col': 10,
\ 'bufnr': bufnr('%'),
\ 'vcol': 0,
\ 'linter_name': 'bettercode',
\ 'nr': -1,
\ 'type': 'W',
\ 'text': 'A',
\ },
\ {
\ 'lnum': 2,
\ 'col': 10,
\ 'bufnr': b:other_bufnr,
\ 'vcol': 0,
\ 'linter_name': 'bettercode',
\ 'nr': -1,
\ 'type': 'W',
\ 'text': 'B',
\ },
\ {
\ 'lnum': 3,
\ 'col': 1,
\ 'bufnr': bufnr('%'),
\ 'vcol': 0,
\ 'linter_name': 'bettercode',
\ 'nr': -1,
\ 'type': 'E',
\ 'text': 'C',
\ },
\ {
\ 'lnum': 4,
\ 'col': 1,
\ 'bufnr': b:other_bufnr,
\ 'vcol': 0,
\ 'linter_name': 'bettercode',
\ 'nr': -1,
\ 'type': 'E',
\ 'text': 'D',
\ },
\])
AssertEqual ["A", "C"], CollectMessages(bufnr('%'))
call ale#engine#SetResults(bufnr('%'), [
\ {
\ 'lnum': 1,
\ 'col': 10,
\ 'bufnr': bufnr('%'),
\ 'vcol': 0,
\ 'linter_name': 'bettercode',
\ 'nr': -1,
\ 'type': 'W',
\ 'text': 'A',
\ },
\ {
\ 'lnum': 2,
\ 'col': 10,
\ 'bufnr': b:other_bufnr,
\ 'vcol': 0,
\ 'linter_name': 'bettercode',
\ 'nr': -1,
\ 'type': 'W',
\ 'text': 'B',
\ },
\ {
\ 'lnum': 3,
\ 'col': 1,
\ 'bufnr': bufnr('%'),
\ 'vcol': 0,
\ 'linter_name': 'bettercode',
\ 'nr': -1,
\ 'type': 'E',
\ 'text': 'C',
\ },
\ {
\ 'lnum': 4,
\ 'col': 1,
\ 'bufnr': b:other_bufnr,
\ 'vcol': 0,
\ 'linter_name': 'bettercode',
\ 'nr': -1,
\ 'type': 'E',
\ 'text': 'D',
\ },
\])
AssertEqual ["A", "C"], CollectMessages(bufnr('%'))
endif