Skip to content

Commit

Permalink
Update required version of Vim
Browse files Browse the repository at this point in the history
Update the required version of Vim to be the version installed with
Ubuntu 20.04 LTS.
  • Loading branch information
bhcleek committed Jun 1, 2023
1 parent 3289077 commit cfa1ab8
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fail-fast: false
matrix:
go: ['1.19','1.20']
vim: ['vim-8.0', 'vim-8.2', 'nvim']
vim: ['vim-8.1', 'vim-8.2', 'nvim']
steps:
- name: setup Go
uses: actions/setup-go@v2.1.3
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ USER vim-go
COPY scripts/install-vim /vim-go/scripts/install-vim
WORKDIR /vim-go

RUN scripts/install-vim vim-8.0
RUN scripts/install-vim vim-8.1
RUN scripts/install-vim vim-8.2
RUN scripts/install-vim nvim

COPY . /vim-go/
WORKDIR /vim-go

RUN scripts/install-tools vim-8.0
RUN scripts/install-tools vim-8.1
RUN scripts/install-tools vim-8.2
RUN scripts/install-tools nvim

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VIMS ?= vim-8.0 vim-8.2 nvim
VIMS ?= vim-8.1 vim-8.2 nvim
TEST_FLAGS ?=

all: install lint test
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This plugin adds Go language support for Vim, with the following main features:

## Install

vim-go requires at least Vim 8.0.1453 or Neovim 0.4.0.
vim-go requires at least Vim 8.1.2269 or Neovim 0.4.0.

The [**latest stable release**](https://github.com/fatih/vim-go/releases/latest) is the
recommended version to use. If you choose to use the master branch instead,
Expand Down
4 changes: 2 additions & 2 deletions autoload/go/lint_test.vim
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@ func! s:vimdir()
let l:vim = "vim-8.2"
if has('nvim')
let l:vim = 'nvim'
elseif v:version == 800
let l:vim = 'vim-8.0'
elseif v:version == 810
let l:vim = 'vim-8.1'
endif

return l:vim
Expand Down
2 changes: 1 addition & 1 deletion doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ experience.
==============================================================================
INSTALL *go-install*

vim-go requires at least Vim 8.0.1453 or Neovim 0.4.0. On macOS, if you are
vim-go requires at least Vim 8.1.2269 or Neovim 0.4.0. On macOS, if you are
still using your system version of vim, you can use homebrew to keep your
version of Vim up-to-date with the following terminal command:
>
Expand Down
6 changes: 3 additions & 3 deletions plugin/go.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ function! s:checkVersion() abort
if has('nvim')
let l:unsupported = !has('nvim-0.4.0')
else
let l:unsupported = !has('patch-8.0.1453')
let l:unsupported = !has('patch-8.1.2269')
endif

if l:unsupported == 1
echohl Error
echom "vim-go requires at least Vim 8.0.1453 or Neovim 0.4.0, but you're using an older version."
echom "vim-go requires at least Vim 8.1.2269 or Neovim 0.4.0, but you're using an older version."
echom "Please update your Vim for the best vim-go experience."
echom "If you really want to continue you can set this to make the error go away:"
echom " let g:go_version_warning = 0"
echom "Note that some features may error out or behave incorrectly."
echom "Please do not report bugs unless you're using at least Vim 8.0.1453 or Neovim 0.4.0."
echom "Please do not report bugs unless you're using at least Vim 8.1.2269 or Neovim 0.4.0."
echohl None

" Make sure people see this.
Expand Down
2 changes: 1 addition & 1 deletion scripts/bench-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cd "$vimgodir"

if [ -z "${1:-}" ]; then
echo "unknown version: '${1:-}'"
echo "First argument must be 'vim-8.0' or 'nvim'."
echo "First argument must be 'vim-8.1', 'vim-8.2', or 'nvim'."
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker-test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -euC
vimgodir=$(cd -P "$(dirname "$0")/.." > /dev/null && pwd)
cd "$vimgodir"

docker build --tag vim-go-test .
docker build --platform=linux/amd64 --tag vim-go-test .
# seccomp=confined is required for dlv to run in a container, hence it's
# required for vim-go's debug tests.
docker run -e VIMS --rm --security-opt="seccomp=unconfined" vim-go-test
Expand Down
15 changes: 12 additions & 3 deletions scripts/install-vim
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ vimgodir=$(cd -P "$(dirname "$0")/.." > /dev/null && pwd)
cd "$vimgodir"

vim=${1:-}
patches=


case "$vim" in
"vim-8.0")
"vim-8.1")
# This follows the version in Ubuntu LTS. Vim's master branch isn't always
# stable, and we don't want to have the build fail because Vim introduced a
# bug.
tag="v8.0.1453"
tag="v8.1.2269"
giturl="https://github.com/vim/vim"
patches="3612 3625 3669 3741"

;;

"vim-8.2")
Expand All @@ -40,7 +44,7 @@ case "$vim" in

*)
echo "unknown version: '${1:-}'"
echo "First argument must be 'vim-8.0', vim-8.2, or 'nvim'."
echo "First argument must be 'vim-8.1', vim-8.2, or 'nvim'."
exit 1
;;
esac
Expand Down Expand Up @@ -86,6 +90,11 @@ else
git clone --branch "$tag" --depth 1 "$giturl" "$srcdir"
fi

for patch in $patches; do
git fetch --depth 2 v8.2.$patch
git cherry-pick v8.2.$patch
done

./configure --prefix="$installdir" --with-features=huge --disable-gui
make install
mkdir -p "$installdir/share/vim/vimgo/pack/vim-go/start"
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cd "$vimgodir"
#####################################
if [ -z "${1:-}" ]; then
echo "unknown version: '${1:-}'"
echo "First argument must be 'vim-8.0' or 'nvim'."
echo "First argument must be 'vim-8.1', 'vim-8.2' or 'nvim'."
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/run-vim
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ shift $((OPTIND - 1))

if [ -z "${1:-}" ]; then
echo "unknown version: '${1:-}'"
echo "First argument must be 'vim-8.0', 'vim-8.2', or 'nvim'."
echo "First argument must be 'vim-8.1', 'vim-8.2', or 'nvim'."
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ shift $((OPTIND - 1))
#####################################
if [ -z "${1:-}" ]; then
echo "unknown version: '${1:-}'"
echo "First argument must be 'vim-8.0' or 'nvim'."
echo "First argument must be 'vim-8.1', 'vim-8.2', or 'nvim'."
exit 1
fi

Expand Down

0 comments on commit cfa1ab8

Please sign in to comment.