Compare commits

..

20 Commits

Author SHA1 Message Date
James McCoy
1e1fd71fea Merge pull request #16208 from neovim/backport-16207-to-release-0.5
[Backport release-0.5] ci(release): delete nightly/stable tag so release recreates it
2021-11-02 07:37:44 -04:00
James McCoy
606ace0fbe ci(release): delete nightly/stable tag so release recreates it
Even though the releaes itself gets deleted, if the tag is not, then
creating a new release just re-uses the same tag, even though we're
using “--target <sha>”.

[skip ci]

(cherry picked from commit 14716e4619)
2021-11-02 11:37:28 +00:00
James McCoy
b69ceaa2e8 Merge pull request #16193 from neovim/backport-16191-to-release-0.5
ci(win): only remove choco's cpack.exe if it exists
2021-11-01 06:39:11 -04:00
James McCoy
3ad07553e2 fix(ci): use correct check for path-existence 2021-10-31 20:00:14 -04:00
James McCoy
64ec1f5b02 ci(win): only remove choco's cpack.exe if it exists
(cherry picked from commit ec0f4fab48)
2021-10-31 15:31:10 +00:00
James McCoy
b60293b76d Merge pull request #16183 from neovim/backport-16180-to-release-0.5
[Backport release-0.5] Refactor release workflow to use gh instead of a third-party action
2021-10-30 16:53:24 -04:00
James McCoy
e86f95eb10 ci: make sure choco cpack does not interfere with CMake cpack
[skip ci]

(cherry picked from commit c84b86fe3d)
2021-10-30 20:52:30 +00:00
James McCoy
f65c52d235 ci(release): do not fail if stable/nightly release doesn't exist
[skip ci]

(cherry picked from commit c819ce1fd4)
2021-10-30 20:52:30 +00:00
James McCoy
2e77847896 ci(release): re-publish "stable" release for versioned releases
[skip ci]

(cherry picked from commit eede587b06)
2021-10-30 20:52:30 +00:00
James McCoy
5ba88321a6 ci(release): use gh cli instead of 3rd-party actions
Closes #15709

[skip ci]

(cherry picked from commit 0ce800753e)
2021-10-30 20:52:30 +00:00
Justin M. Keyes
d8ccee30b0 fix(jobwait): always drain process event queues #15970
Problem:
jobwait() returns early if the job was stopped, but the job might have
pending callbacks on its event queue which are required to complete its
teardown. State such as term->closed might not be updated yet (by the
pending callbacks), so codepaths such as :bdelete think the job is still
running.

Solution:
Always flush the job's event queue before returning from jobwait().

ref #15349

Co-authored-by: Gregory Anders <greg@gpanders.com>
2021-10-08 17:02:37 -07:00
Justin M. Keyes
b5276b36d4 Merge #15879 backports 2021-10-05 04:26:08 -07:00
Michael Lingelbach
3f20d8bb09 chore(lsp): fix formatting in vim.lsp.log (#15596) 2021-10-02 17:18:22 -07:00
Michael Lingelbach
9eed756cad feat(lsp): add warning message for large log size 2021-10-02 17:18:11 -07:00
Justin M. Keyes
5908d88a3e fix(lsp_spec): tests depended on previous session
backport #15803

- fix tests which accidentally depended on previous session
2021-10-02 16:53:14 -07:00
James McCoy
71950115eb Merge pull request #15865 from jamessan/gitattributes
fix: include ci/ in exported tarball
2021-10-01 19:55:47 -04:00
James McCoy
d6f03aaafd fix: include ci/ in exported tarball
src/nvim/testdir/runnvim.sh re-uses the test suite code from ci/ to
cleanup the output of legacy tests.

Closes #15856

[skip ci]
2021-10-01 19:53:27 -04:00
Justin M. Keyes
14ff19bc36 ci: remove "labeler" job in release-0.5 branch #15804
Its config and labels are out of date and we don't need it on the
release-0.5. branch anyway.
2021-09-26 16:06:57 -07:00
Justin M. Keyes
7b822ea72b Merge #15796 release: Nvim 0.5.1 2021-09-26 15:45:12 -07:00
Justin M. Keyes
a3a56cf60c version bump 2021-09-26 15:15:30 -07:00
12 changed files with 139 additions and 171 deletions

1
.gitattributes vendored
View File

@@ -1,7 +1,6 @@
*.h linguist-language=C
src/nvim/testdir/test42.in diff
.github/ export-ignore
ci/ export-ignore
.travis.yml export-ignore
codecov.yml export-ignore
.builds/ export-ignore

49
.github/labeler.yml vendored
View File

@@ -1,49 +0,0 @@
"lsp":
- runtime/lua/vim/lsp.lua
- runtime/lua/vim/lsp/*
"lua":
- runtime/lua/**/*
- src/nvim/lua
"tui":
- src/nvim/tui/tui.*
"treesitter":
- src/nvim/lua/treesitter.*
- runtime/lua/vim/treesitter.lua
- runtime/lua/vim/treesitter/*
"dependencies":
- third-party/**/*
"topic: spell":
- src/nvim/spell*
"topic: :terminal":
- src/nvim/terminal.*
"topic: column":
- src/nvim/mark.h
- src/nvim/mark.c
- src/nvim/sign*
"topic: folds":
- src/nvim/fold*
"topic: mouse":
- src/nvim/mouse*
"topic: documentation":
- runtime/doc/*
"topic: clipboard":
- runtime/autoload/provider/clipboard.vim
"topic: diff":
- src/nvim/diff.*
"topic: build":
- CMakeLists.txt
- "**/CMakeLists.txt"
- "**/*.cmake"

View File

@@ -1,13 +0,0 @@
name: "Pull Request Labeler"
on:
- pull_request_target
jobs:
triage:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@main
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

41
.github/workflows/notes.md vendored Normal file
View File

@@ -0,0 +1,41 @@
```
${NVIM_VERSION}
```
## Install
### Windows
1. Extract **nvim-win64.zip** (or **nvim-win32.zip**)
2. Run `nvim-qt.exe`
### macOS
1. Download **nvim-macos.tar.gz**
2. Extract: `tar xzvf nvim-macos.tar.gz`
3. Run `./nvim-osx64/bin/nvim`
### Linux (x64)
1. Download **nvim.appimage**
2. Run `chmod u+x nvim.appimage && ./nvim.appimage`
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
```
./nvim.appimage --appimage-extract
./squashfs-root/usr/bin/nvim
```
### Other
- Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim)
## SHA256 Checksums
```
${SHA_LINUX_64}
${SHA_APP_IMAGE}
${SHA_APP_IMAGE_ZSYNC}
${SHA_MACOS}
${SHA_WIN_64}
${SHA_WIN_32}
```

View File

@@ -145,10 +145,22 @@ jobs:
publish:
needs: [linux, appimage, macOS, windows]
runs-on: ubuntu-20.04
env:
GH_REPO: ${{ github.repository }}
permissions:
contents: write
steps:
# Must perform checkout first, since it deletes the target directory
# before running, and would therefore delete the downloaded artifacts
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gettext-base
- if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
- if: github.event_name == 'schedule'
@@ -158,16 +170,21 @@ jobs:
TAG_NAME=${{ github.ref }}
echo "TAG_NAME=${TAG_NAME#refs/tags/}" >> $GITHUB_ENV
- if: env.TAG_NAME == 'nightly'
run: echo 'SUBJECT=Nvim development (prerelease) build' >> $GITHUB_ENV
- if: env.TAG_NAME != 'nightly'
run: echo 'SUBJECT=Nvim release build' >> $GITHUB_ENV
- if: env.TAG_NAME == 'nightly'
uses: dev-drprasad/delete-tag-and-release@v0.1.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
delete_release: true
tag_name: nightly
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
(echo 'SUBJECT=Nvim development (prerelease) build';
echo 'PRERELEASE=--prerelease') >> $GITHUB_ENV
gh release delete nightly --yes || true
git push origin :nightly || true
- if: env.TAG_NAME != 'nightly'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
(echo 'SUBJECT=Nvim release build';
echo 'PRERELEASE=') >> $GITHUB_ENV
gh release delete stable --yes || true
git push origin :stable || true
# `sha256sum` outputs <sha> <path>, so we cd into each dir to drop the
# containing folder from the output.
- name: Generate Linux64 SHA256 checksums
@@ -200,67 +217,13 @@ jobs:
cd ./nvim-win64
sha256sum nvim-win64.zip > nvim-win64.zip.sha256sum
echo "SHA_WIN_64=$(cat nvim-win64.zip.sha256sum)" >> $GITHUB_ENV
- uses: meeDamian/github-release@2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.TAG_NAME }}
name: ${{ needs.linux.outputs.release }}
prerelease: ${{ env.TAG_NAME == 'nightly' }}
commitish: ${{ github.sha }}
gzip: false
allow_override: ${{ env.TAG_NAME == 'nightly' }}
files: |
nvim-macos.tar.gz:./nvim-macos/nvim-macos.tar.gz
nvim-macos.tar.gz.sha256sum:./nvim-macos/nvim-macos.tar.gz.sha256sum
nvim-linux64.tar.gz:./nvim-linux64/nvim-linux64.tar.gz
nvim-linux64.tar.gz.sha256sum:./nvim-linux64/nvim-linux64.tar.gz.sha256sum
nvim.appimage:./appimage/nvim.appimage
nvim.appimage.sha256sum:./appimage/nvim.appimage.sha256sum
nvim.appimage.zsync:./appimage/nvim.appimage.zsync
nvim.appimage.zsync.sha256sum:./appimage/nvim.appimage.zsync.sha256sum
nvim-win32.zip:./nvim-win32/nvim-win32.zip
nvim-win32.zip.sha256sum:./nvim-win32/nvim-win32.zip.sha256sum
nvim-win64.zip:./nvim-win64/nvim-win64.zip
nvim-win64.zip.sha256sum:./nvim-win64/nvim-win64.zip.sha256sum
body: |
${{ env.SUBJECT }}
```
${{ needs.linux.outputs.version }}```
## Install
### Windows
1. Extract **nvim-win64.zip** (or **nvim-win32.zip**)
2. Run `nvim-qt.exe`
### macOS
1. Download **nvim-macos.tar.gz**
2. Extract: `tar xzvf nvim-macos.tar.gz`
3. Run `./nvim-osx64/bin/nvim`
### Linux (x64)
1. Download **nvim.appimage**
2. Run `chmod u+x nvim.appimage && ./nvim.appimage`
- If your system does not have FUSE you can [extract the appimage](https://github.com/AppImage/AppImageKit/wiki/FUSE#type-2-appimage):
```
./nvim.appimage --appimage-extract
./squashfs-root/usr/bin/nvim
```
### Other
- Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim)
## SHA256 Checksums
```
${{ env.SHA_LINUX_64 }}
${{ env.SHA_APP_IMAGE }}
${{ env.SHA_APP_IMAGE_ZSYNC }}
${{ env.SHA_MACOS }}
${{ env.SHA_WIN_64 }}
${{ env.SHA_WIN_32 }}
```
- name: Publish release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NVIM_VERSION: ${{ needs.linux.outputs.version }}
run: |
envsubst < "$GITHUB_WORKSPACE/.github/workflows/notes.md" > "$RUNNER_TEMP/notes.md"
gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win32/* nvim-win64/*
if [ "$TAG_NAME" != "nightly" ]; then
gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win32/* nvim-win64/*
fi

View File

@@ -137,8 +137,8 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY
# version string, else they are combined with the result of `git describe`.
set(NVIM_VERSION_MAJOR 0)
set(NVIM_VERSION_MINOR 5)
set(NVIM_VERSION_PATCH 1)
set(NVIM_VERSION_PRERELEASE "") # for package maintainers
set(NVIM_VERSION_PATCH 2)
set(NVIM_VERSION_PRERELEASE "-dev") # for package maintainers
# API level
set(NVIM_API_LEVEL 7) # Bump this after any API change.

View File

@@ -170,6 +170,11 @@ if (-not $NoTests) {
}
}
# Ensure choco's cpack is not in PATH otherwise, it conflicts with CMake's
if (Test-Path -Path $env:ChocolateyInstall\bin\cpack.exe) {
Remove-Item -Path $env:ChocolateyInstall\bin\cpack.exe -Force
}
# Build artifacts
cpack -G ZIP -C RelWithDebInfo
if ($env:APPVEYOR_REPO_TAG_NAME -ne $null) {

View File

@@ -13,7 +13,7 @@ from the connected program.
Terminal buffers behave like normal buffers, except:
- With 'modifiable', lines can be edited but not deleted.
- 'scrollback' controls how many lines are kept.
- Output is followed if the cursor is on the last line.
- Output is followed ("tailed") if cursor is on the last line.
- 'modified' is the default. You can set 'nomodified' to avoid a warning when
closing the terminal buffer.
- 'bufhidden' defaults to "hide".

View File

@@ -33,6 +33,17 @@ do
vim.fn.mkdir(vim.fn.stdpath('cache'), "p")
local logfile = assert(io.open(logfilename, "a+"))
local log_info = vim.loop.fs_stat(logfilename)
if log_info and log_info.size > 1e9 then
local warn_msg = string.format(
"LSP client log is large (%d MB): %s",
log_info.size / (1000 * 1000),
logfilename
)
vim.notify(warn_msg)
end
-- Start message for logging
logfile:write(string.format("[START][%s] LSP logging initiated\n", os.date(log_date_format)))
for level, levelnr in pairs(log.levels) do

View File

@@ -5328,14 +5328,19 @@ static void f_jobwait(typval_T *argvars, typval_T *rettv, FunPtr fptr)
TV_LIST_ITER_CONST(args, arg, {
Channel *chan = NULL;
if (TV_LIST_ITEM_TV(arg)->v_type != VAR_NUMBER
|| !(chan = find_job(TV_LIST_ITEM_TV(arg)->vval.v_number, false))) {
|| !(chan = find_channel(TV_LIST_ITEM_TV(arg)->vval.v_number))
|| chan->streamtype != kChannelStreamProc) {
jobs[i] = NULL; // Invalid job.
} else if (process_is_stopped(&chan->stream.proc)) {
// Job is stopped but not fully destroyed.
// Ensure all callbacks on its event queue are executed. #15402
process_wait(&chan->stream.proc, -1, NULL);
jobs[i] = NULL; // Invalid job.
} else {
jobs[i] = chan;
channel_incref(chan);
if (chan->stream.proc.status < 0) {
// Process any pending events on the job's queue before temporarily
// replacing it.
// Flush any events in the job's queue before temporarily replacing it.
multiqueue_process_events(chan->events);
multiqueue_replace_parent(chan->events, waiting_jobs);
}

View File

@@ -132,38 +132,35 @@ end
describe('LSP', function()
before_each(function()
clear_notrace()
-- Run an instance of nvim on the file which contains our "scripts".
-- Pass TEST_NAME to pick the script.
local test_name = "basic_init"
exec_lua([=[
lsp = require('vim.lsp')
local test_name, fixture_filename, logfile = ...
function test__start_client()
return lsp.start_client {
cmd_env = {
NVIM_LOG_FILE = logfile;
};
cmd = {
vim.v.progpath, '-Es', '-u', 'NONE', '--headless',
"-c", string.format("lua TEST_NAME = %q", test_name),
"-c", "luafile "..fixture_filename;
};
root_dir = vim.loop.cwd();
}
end
TEST_CLIENT1 = test__start_client()
]=], test_name, fake_lsp_code, fake_lsp_logfile)
end)
after_each(function()
exec_lua("lsp._vim_exit_handler()")
-- exec_lua("lsp.stop_all_clients(true)")
end)
describe('server_name specified', function()
before_each(function()
-- Run an instance of nvim on the file which contains our "scripts".
-- Pass TEST_NAME to pick the script.
local test_name = "basic_init"
exec_lua([=[
lsp = require('vim.lsp')
local test_name, fixture_filename, logfile = ...
function test__start_client()
return lsp.start_client {
cmd_env = {
NVIM_LOG_FILE = logfile;
};
cmd = {
vim.v.progpath, '-Es', '-u', 'NONE', '--headless',
"-c", string.format("lua TEST_NAME = %q", test_name),
"-c", "luafile "..fixture_filename;
};
root_dir = vim.loop.cwd();
}
end
TEST_CLIENT1 = test__start_client()
]=], test_name, fake_lsp_code, fake_lsp_logfile)
end)
after_each(function()
exec_lua("lsp._vim_exit_handler()")
-- exec_lua("lsp.stop_all_clients(true)")
end)
it('start_client(), stop_client()', function()
retry(nil, 4000, function()
eq(1, exec_lua('return #lsp.get_active_clients()'))

View File

@@ -7,6 +7,7 @@ local eq, neq = helpers.eq, helpers.neq
local write_file = helpers.write_file
local command= helpers.command
local exc_exec = helpers.exc_exec
local matches = helpers.matches
describe(':terminal buffer', function()
local screen
@@ -259,6 +260,14 @@ describe(':terminal buffer', function()
eq('Vim(wqall):E948: Job still running', exc_exec('wqall'))
end)
it('stops running jobs with :quit', function()
-- Open in a new window to avoid terminating the nvim instance
command('split')
command('terminal')
command('set nohidden')
command('quit')
end)
it('does not segfault when pasting empty buffer #13955', function()
feed_command('terminal')
feed('<c-\\><c-n>')