Skip to content

Commit 7556c68

Browse files
agriffisdbarnett
authored andcommitted
fix: neovim vroom tests (#131)
Four problems that were preventing the vroom tests from running on neovim: - The vroom version was too old, see google/vroom#104 - The maktaba version was too old, see google/vim-maktaba#172. I considered constraining this to neovim but it applies to recent vim as well (the version of vim in travis/xenial is quite old) and the extra version checking seems pointless. - The get-pip.py invocation was outdated. - For some reason neovim pauses more often with "Hit ENTER" messages. Perhaps newer vim would too. In any case, increasing the cmdheight solves the problem without needing to sprinkle :silent everywhere.
1 parent dae6dd8 commit 7556c68

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

Diff for: .travis.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
language: generic
22
env:
3+
global:
4+
- VROOM_VERSION=0.13.0
35
matrix:
46
# This Maktaba version should match the minimum required in instant/flags.vim.
5-
- CI_TARGET=vim MAKTABA_VERSION=1.10.0
7+
- CI_TARGET=vim MAKTABA_VERSION=1.12.0
68
- CI_TARGET=vim MAKTABA_VERSION=master
9+
- CI_TARGET=neovim MAKTABA_VERSION=1.12.0
710
- CI_TARGET=neovim MAKTABA_VERSION=master
811
before_script:
912
- sudo apt-get update
@@ -13,11 +16,11 @@ before_script:
1316
elif [ $CI_TARGET = neovim ]; then
1417
eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64" &&
1518
wget https://bootstrap.pypa.io/get-pip.py &&
16-
sudo python3 get-pip.py --allow-external sudo &&
19+
sudo python3 get-pip.py &&
1720
sudo pip3 install neovim;
1821
fi
19-
- wget https://github.com/google/vroom/releases/download/v0.12.0/vroom_0.12.0-1_all.deb
20-
- sudo dpkg -i ./vroom_0.12.0-1_all.deb
22+
- wget https://github.com/google/vroom/releases/download/v${VROOM_VERSION}/vroom_${VROOM_VERSION}-1_all.deb
23+
- sudo dpkg -i ./vroom_${VROOM_VERSION}-1_all.deb
2124
- git clone -b ${MAKTABA_VERSION} https://github.com/google/vim-maktaba.git ../maktaba/
2225
- git clone https://github.com/google/vim-glaive.git ../glaive/
2326
services:
@@ -27,5 +30,3 @@ script:
2730
- vroom $VROOM_ARGS --crawl ./vroom/
2831
matrix:
2932
fast_finish: true
30-
allow_failures:
31-
- env: CI_TARGET=neovim MAKTABA_VERSION=master

Diff for: instant/flags.vim

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ endif
3333

3434

3535
" Shout if maktaba is too old. Done here to ensure it's always triggered.
36-
if !maktaba#IsAtLeastVersion('1.10.0')
37-
call maktaba#error#Shout('Codefmt requires maktaba version 1.10.0.')
36+
" We need at least 1.12.0 so that maktaba#ensure#IsCallable works on Neovim and
37+
" recent Vim (newer than is actually in Travis/Xenial).
38+
" See https://github.com/google/vim-maktaba/issues/173
39+
if !maktaba#IsAtLeastVersion('1.12.0')
40+
call maktaba#error#Shout('Codefmt requires maktaba version 1.12.0.')
3841
call maktaba#error#Shout('You have maktaba version %s.', maktaba#VERSION)
3942
call maktaba#error#Shout('Please update your maktaba install.')
4043
endif

Diff for: vroom/setupvroom.vim

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
" Codefmt does not support compatible mode.
1919
set nocompatible
2020

21+
" Set cmdheight to avoid "Hit ENTER to continue" without needing :silent
22+
set cmdheight=10
23+
2124
" Install the codefmt plugin.
2225
let s:repo = expand('<sfile>:p:h:h')
2326
execute 'source' s:repo . '/bootstrap.vim'

0 commit comments

Comments
 (0)