Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display warning when people use an older Vim #1524

Merged
merged 3 commits into from
Oct 21, 2017
Merged

Display warning when people use an older Vim #1524

merged 3 commits into from
Oct 21, 2017

Conversation

arp242
Copy link
Contributor

@arp242 arp242 commented Oct 18, 2017

This shows a warning when people use an older Vim version. You can still set
g:go_no_version_warning to override this, if people really want to continue. I
don't think we need to bother documenting that setting in the help page.

The version 7.4.1689 was chosen because that's what the latest Ubuntu LTS
(16.04) uses, which seems like a reasonable choice. I don't mind using an older
version though.

plugin/go.vim Outdated
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_no_version_warning = 1"
echom "Note that some features may error out or behave incorrect."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

incorrectly instead of incorrect.

plugin/go.vim Outdated
" Version 7.4.1689 was chosen because that's what the most recent Ubuntu LTS
" release (16.04) uses.
if
\ !exists('g:go_no_version_warning') &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't be surprised is someone sets this to 0 to try to re-enable the warning. Maybe just check that it's not 1?

Copy link
Collaborator

@bhcleek bhcleek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, but that variable would probably be better named as go_version_warning with a default of 1 for readability.

This shows a warning when people use an older Vim version. You can still set
`g:go_no_version_warning` to override this, if people really want to continue. I
don't think we need to bother documenting that setting in the help page.

The version 7.4.1689 was chosen because that's what the latest Ubuntu LTS
(16.04) uses, which seems like a reasonable choice. I don't mind using an older
version though.
@arp242 arp242 merged commit 0878992 into fatih:master Oct 21, 2017
@arp242 arp242 deleted the versionwarn branch October 21, 2017 04:49
@nqv
Copy link

nqv commented Oct 25, 2017

@Carpetsmoker @bhcleek
Do we really need this feature at all? I'm on macOS 10.12.4 and this is my default vim:

$ /usr/bin/vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Feb  4 2017 00:48:24)
Included patches: 1-898, 8056
Compiled by root@apple.com
Normal version without GUI.  Features included (+) or not (-):
+acl             -farsi           -mouse_netterm   +syntax
-arabic          +file_in_path    -mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           -mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
+builtin_terms   -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         -gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    -keymap          +postscript      +virtualedit
+comments        -langmap         +printer         +visual
-conceal         +libcall         -profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             -rightleft       +windows
+diff            +menu            +ruby/dyn        +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
-emacs_tags      -mouseshape      -sniff           -xsmp
+eval            -mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm

Never seen a problem with vim-go and the message freaked me out :)

@fatih
Copy link
Owner

fatih commented Oct 25, 2017

@nqv yes we do. Unfortunately Vim is moving fast and with every release, old releases tend to work less. You have the option to disable it as you know, so I think that would be the best option. Thanks for your feedback :)

@arp242
Copy link
Contributor Author

arp242 commented Oct 25, 2017

Adding to that, v1.15 is actually broken in versions before Vim 7.4.1546; see #1483.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants