k-takata / minpac

A minimal package manager for Vim 8+ (and Neovim)
833 stars 31 forks source link

Not working on Macvim #53

Open dxnxk-0 opened 6 years ago

dxnxk-0 commented 6 years ago

Hi guys, while minpac is perfectly working for me in a terminal, it fails on Macvim (GUI mode) with the following error message:

Error detected while processing function minpac#update[2]..minpac#impl#update[35]..<SNR>118_update_single_plugin[31]..<SNR>118_get_plugin_revision[3]..
<SNR>118_system[8]..minpac#job#wait[2]..<SNR>119_job_wait[6]..<SNR>119_job_wait_single:
line   10:
E806: using Float as a String
E15: Invalid expression: a:timeout / 1000.0    

Mac OS 10.13.3

MacVim Custom Version 8.0.1522 (145)

~$ /Applications/MacVim.app/Contents/bin/vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 18 2018 04:09:42)
macOS version
Included patches: 1-1522
Compiled by root@Traviss-Mac-913.local
Huge version with MacVim GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_netterm     +tag_binary
+arabic            +file_in_path      +mouse_sgr         +tag_old_static
+autocmd           +find_in_path      -mouse_sysmouse    -tag_any_white
-autoservername    +float             +mouse_urxvt       -tcl
+balloon_eval      +folding           +mouse_xterm       +termguicolors
+balloon_eval_term -footer            +multi_byte        +terminal
+browse            +fork()            +multi_lang        +terminfo
++builtin_terms    +fullscreen        -mzscheme          +termresponse
+byte_offset       -gettext           +netbeans_intg     +textobjects
+channel           -hangul_input      +num64             +timers
+cindent           +iconv             +odbeditor         +title
+clientserver      +insert_expand     +packages          +toolbar
+clipboard         +job               +path_extra        +transparency
+cmdline_compl     +jumplist          +perl/dyn          +user_commands
+cmdline_hist      +keymap            +persistent_undo   +vertsplit
+cmdline_info      +lambda            +postscript        +virtualedit
+comments          +langmap           +printer           +visual
+conceal           +libcall           +profile           +visualextra
+cryptv            +linebreak         +python/dyn        +viminfo
+cscope            +lispindent        +python3/dyn       +vreplace
+cursorbind        +listcmds          +quickfix          +wildignore
+cursorshape       +localmap          +reltime           +wildmenu
+dialog_con_gui    +lua/dyn           +rightleft         +windows
+diff              +menu              +ruby/dyn          +writebackup
+digraphs          +mksession         +scrollbind        -X11
+dnd               +modify_fname      +signs             -xfontset
-ebcdic            +mouse             +smartindent       +xim
+emacs_tags        +mouseshape        +startuptime       -xpm
+eval              +mouse_dec         +statusline        -xsmp
+ex_extra          -mouse_gpm         -sun_workshop      -xterm_clipboard
+extra_search      -mouse_jsbterm     +syntax            -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: clang   -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon       -lm  -lncurses -liconv -framework AppKit   -fstack-protector  -L/System/Library/Perl/5.16/darwin-thread-multi-2level/CORE 
r-laf commented 6 years ago

Works for me. I'm using macvim version 8.0.1633.

arkhandir commented 4 years ago

I got similar errors with MacVim 8.1.1722 (157)

call minpac#status():

Error detected while processing function minpac#status[4]..minpac#status#get[14]..minpac#impl#syst
em[9]..minpac#job#wait[2]..<SNR>66_job_wait[6]..<SNR>66_job_wait_single: 
line     10:
E806: using Float as a String  
denisw commented 3 years ago

I ran into this problem today. After some searching, I found a blog post explaining that this problem is locale-specific: if the locale uses a decimal separator other that the dot (for instance a comma, as in Germany), then VimScript is apparently not able to parse floating-point literals.

To test this, try :let x = 0.5 within MacVim. You should see the E806 error.

My workaround is to use the :language command at the start of my .vimrc to set the locale to US English:

language en_US.UTF-8
arkhandir commented 3 years ago

Denis, your solutions works. Thanks. I hope the underlying issue will be fixed.