Skip to content

Commit

Permalink
No longer support 7.4 and do not fail-fast anymore (#1425)
Browse files Browse the repository at this point in the history
Also update the docs to indicate that officially we now only support Vim >= 8.0.
  • Loading branch information
SirVer authored Jan 21, 2022
1 parent 53c2333 commit bc480c1
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/issue_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ and set of keystrokes that reproduces your problem.
- **Vim Version**: <!-- first two lines of `:version` output -->
- **UltiSnips Version**: <!-- e.g. 3.1. If you're using version from git
run: `git rev-parse origin/master` -->
- **Python inside Vim**: <!-- e.g. 2.7.14 / 3.6.5. If unsure run inside vim:
- **Python inside Vim**: <!-- e.g. 3.9.1 / 3.6.5. If unsure run inside vim:
`:py import sys; print(sys.version)` and
`:py3 import sys; print(sys.version)' -->
- **Docker repo/vimrc**: <!-- link to the branch containing the repro case,
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { vim_version: "7.4", python_image: "3.6-stretch", tag: "vim_74_py36" }
# 80 does not build with py37 and py38. The build errors out with
# "Require native threads".
- { vim_version: "8.0", python_image: "3.6-stretch", tag: "vim_80_py36" }
- { vim_version: "8.1", python_image: "3.6-stretch", tag: "vim_81_py36" }
- { vim_version: "git", python_image: "3.6-stretch", tag: "vim_git_py36" }
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MAKEFILE_DIR := $(dir ${MAKEFILE_PATH})

# Test images as run on CI.
image_vim_74_py35:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.5-stretch --build-arg VIM_VERSION=7.4 .
image_vim_80_py35:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.5-stretch --build-arg VIM_VERSION=8.0 .
image_vim_81_py35:
Expand All @@ -12,8 +10,6 @@ image_vim_82_py35:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.5-stretch --build-arg VIM_VERSION=8.2 .
image_vim_git_py35:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.5-stretch --build-arg VIM_VERSION=git .
image_vim_74_py36:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.6-stretch --build-arg VIM_VERSION=7.4 .
image_vim_80_py36:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.6-stretch --build-arg VIM_VERSION=8.0 .
image_vim_81_py36:
Expand All @@ -22,7 +18,6 @@ image_vim_82_py36:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.6-stretch --build-arg VIM_VERSION=8.2 .
image_vim_git_py36:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.6-stretch --build-arg VIM_VERSION=git .
# 74 and 80 do not build with py37 and py38. The build errors out with "Require native threads".
image_vim_81_py37:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.7-stretch --build-arg VIM_VERSION=8.1 .
image_vim_82_py37:
Expand All @@ -41,6 +36,8 @@ image_vim_82_py39:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.9-buster --build-arg VIM_VERSION=8.2 .
image_vim_git_py39:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.9-buster --build-arg VIM_VERSION=git .
image_vim_git_py310:
docker build -t ultisnips:$@ --build-arg PYTHON_IMAGE=3.10-buster --build-arg VIM_VERSION=git .

image_repro: image_vim_82_py39
docker build -t ultisnips:repro --build-arg BASE_IMAGE=$< -f Dockerfile.repro .
Expand Down
12 changes: 5 additions & 7 deletions doc/UltiSnips.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*UltiSnips.txt* For Vim version 7.4 or later.
*UltiSnips.txt* For Vim version 8.0 or later.

The Ultimate Plugin for Snippets in Vim~

Expand Down Expand Up @@ -93,7 +93,7 @@ http://vimcasts.org/episodes/ultisnips-visual-placeholder/
1.1 Requirements *UltiSnips-requirements*
----------------

This plugin works with Vim version 7.4 or later with Python 3 support enabled.
This plugin works with Vim version 8.0 or later with Python 3 support enabled.
It only works if the 'compatible' setting is not set.

The Python 3.x interface must be available. In other words, Vim
Expand Down Expand Up @@ -1058,9 +1058,9 @@ wow<tab>Hello World ->
Hello World HELLO WORLD

Python global functions can be stored in a python module and then imported.
This makes global functions easily accessible to all snippet files. Since Vim
7.4 you can just drop python files into ~/.vim/pythonx and import them
directly inside your snippets. For example to use
This makes global functions easily accessible to all snippet files. You can
just drop python files into ~/.vim/pythonx and import them directly inside
your snippets. For example to use
~/.vim/pythonx/my_snippets_helpers.py >
global !p
Expand Down Expand Up @@ -1722,8 +1722,6 @@ endsnippet
4.11 Autotrigger *UltiSnips-autotrigger*
----------------

Note: vim must be newer than 7.4.214 to support this feature.

Many language constructs can occur only at specific places, so it's
possible to use snippets without manually triggering them.

Expand Down
4 changes: 2 additions & 2 deletions plugin/UltiSnips.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ if exists('did_plugin_ultisnips') || &cp
endif
let did_plugin_ultisnips=1

if version < 704
if version < 800
echohl WarningMsg
echom "UltiSnips requires Vim >= 7.4"
echom "UltiSnips requires Vim >= 8.0"
echohl None
finish
endif
Expand Down
31 changes: 0 additions & 31 deletions test/test_Autotrigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
from test.constant import *


def check_required_vim_version(test):
if test.vim_flavor == "neovim":
return None
if not test.vim.has_version(7, 4, 214):
return "Vim newer than 7.4.214 is required"
else:
return None


class Autotrigger_CanMatchSimpleTrigger(_VimTest):
skip_if = check_required_vim_version
files = {
"us/all.snippets": r"""
snippet a "desc" A
Expand All @@ -25,7 +15,6 @@ class Autotrigger_CanMatchSimpleTrigger(_VimTest):


class Autotrigger_CanMatchContext(_VimTest):
skip_if = check_required_vim_version
files = {
"us/all.snippets": r"""
snippet a "desc" "snip.line == 2" Ae
Expand All @@ -38,7 +27,6 @@ class Autotrigger_CanMatchContext(_VimTest):


class Autotrigger_CanExpandOnTriggerWithLengthMoreThanOne(_VimTest):
skip_if = check_required_vim_version
files = {
"us/all.snippets": r"""
snippet abc "desc" A
Expand All @@ -50,26 +38,7 @@ class Autotrigger_CanExpandOnTriggerWithLengthMoreThanOne(_VimTest):
wanted = "autotriggered"


class Autotrigger_WillProduceNoExceptionWithVimLowerThan214(_VimTest):
skip_if = (
lambda self: "Vim older than 7.4.214 is required"
if self.vim.has_version(7, 4, 214)
else None
)

files = {
"us/all.snippets": r"""
snippet abc "desc" A
autotriggered
endsnippet
"""
}
keys = "abc"
wanted = "abc"


class Autotrigger_CanMatchPreviouslySelectedPlaceholder(_VimTest):
skip_if = check_required_vim_version

files = {
"us/all.snippets": r"""
Expand Down
2 changes: 0 additions & 2 deletions test/test_Chars.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from test.constant import *
from test.util import running_on_windows

# Test for Bug #774917


def _snip_quote(qt):
return (
Expand Down
11 changes: 0 additions & 11 deletions test/test_Editing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
from test.constant import *


def check_required_vim_version(test):
if test.vim_flavor == "neovim":
return None
if not test.vim.has_version(7, 4, 1):
return "Vim newer than 7.4.1 is required"
else:
return None


class Undo_RemoveMultilineSnippet(_VimTest):
snippets = ("test", "Hello\naaa ${1} bbb\nWorld")
keys = "test" + EX + ESC + "u"
Expand Down Expand Up @@ -122,14 +113,12 @@ class Backspace_TabStop_NotZero(_VimTest):


class UpdateModifiedSnippetWithoutCursorMove1(_VimTest):
skip_if = check_required_vim_version
snippets = ("test", "${1:one}(${2:xxx})${3:three}")
keys = "test" + EX + "aaaaa" + JF + BS + JF + "3333"
wanted = "aaaaa()3333"


class UpdateModifiedSnippetWithoutCursorMove2(_VimTest):
skip_if = check_required_vim_version
snippets = (
"test",
"""\
Expand Down

0 comments on commit bc480c1

Please sign in to comment.