Shougo / ddc.vim

Dark deno-powered completion framework for Vim/Neovim
MIT License
676 stars 32 forks source link

Deno permissions flags required to use ddc after updating deno/installing for the first time #120

Closed lukelbd closed 1 year ago

lukelbd commented 1 year ago

Problems summary

The latest version of deno (1.29.2) requires the following --allow flags for ddc.vim to work after updating deno or installing deno for the first time (I installed deno with mamba install deno):

let g:denops#server#deno_args = ['--allow-env', '--allow-net', '--allow-read', '--allow-write']

Perhaps this is specific to the deno version I installed. But if not, it might be a good idea to add some notice to the documentation / at the top of your readme. Or, you could even include these flags by default when ddc starts the server?

Expected

The ddc plugin works like normal / without errors on startup.

Actual

The ddc plugin throws many many different errors without the above init.vim setting.

Environment Information

Shougo/ddc.vim@8905e6d52b4d2ffb5d446996561ca9df304db5e6

vim-denops/denops.vim@8f3899de3d3add07105221262dca90a31c4c2d4c

deno 1.29.2 (release, x86_64-apple-darwin)
v8 10.9.194.5
typescript 4.9.4
ProductName:        macOS
ProductVersion:     13.2.1
BuildVersion:       22D68
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 28 2022 21:23:20)
macOS version - x86_64
Included patches: 1-814
Compiled by root@Mac-1666991276477.local
``` Huge version without GUI. Features included (+) or not (-): +acl +file_in_path +mouse_urxvt -tag_any_white +arabic +find_in_path +mouse_xterm -tcl +autocmd +float +multi_byte +termguicolors +autochdir +folding +multi_lang +terminal -autoservername -footer -mzscheme +terminfo -balloon_eval +fork() +netbeans_intg +termresponse +balloon_eval_term +gettext +num64 +textobjects -browse -hangul_input +packages +textprop ++builtin_terms +iconv +path_extra +timers +byte_offset +insert_expand +perl +title +channel +ipv6 +persistent_undo -toolbar +cindent +job +popupwin +user_commands -clientserver +jumplist +postscript +vartabs +clipboard +keymap +printer +vertsplit +cmdline_compl +lambda +profile +vim9script +cmdline_hist +langmap -python +viminfo +cmdline_info +libcall +python3 +virtualedit +comments +linebreak +quickfix +visual +conceal +lispindent +reltime +visualextra +cryptv +listcmds +rightleft +vreplace +cscope +localmap -ruby +wildignore +cursorbind -lua +scrollbind +wildmenu +cursorshape +menu +signs +windows +dialog_con +mksession +smartindent +writebackup +diff +modify_fname -sodium -X11 +digraphs +mouse -sound -xfontset -dnd -mouseshape +spell -xim -ebcdic +mouse_dec +startuptime -xpm +emacs_tags -mouse_gpm +statusline -xsmp +eval -mouse_jsbterm -sun_workshop -xterm_clipboard +ex_extra +mouse_netterm +syntax -xterm_save +extra_search +mouse_sgr +tag_binary -farsi -mouse_sysmouse -tag_old_static system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/Users/ldavis/mambaforge/share/vim" Compilation: x86_64-apple-darwin13.4.0-clang -c -I. -Iproto -DHAVE_CONFIG_H -isystem /Users/ldavis/mambaforge/include -mmacosx-version-min=10.9 -DMACOS_X -DMACOS_X_DARWIN -I/Users/ldavis/mambaforge/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/ldavis/mambaforge/include -fdebug-prefix-map=/Users/runner/miniforge3/conda-bld/vim_1666991858049/work=/usr/local/src/conda/vim-9.0.0814 -fdebug-prefix-map=/Users/ldavis/mambaforge=/usr/local/src/conda-prefix -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: x86_64-apple-darwin13.4.0-clang -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/ldavis/mambaforge/lib -L/Users/ldavis/mambaforge/lib -o vim -lm -ltinfo -liconv -lintl -framework AppKit -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/ldavis/mambaforge/lib -L/Users/ldavis/mambaforge/lib -fstack-protector-strong -L/Users/ldavis/mambaforge/lib/perl5/5.32/core_perl/CORE -lperl -L/Users/ldavis/mambaforge/lib/python3.10/config-3.10-darwin -lpython3.10 -framework CoreFoundation ```

Provide a minimal init.vim/vimrc without plugin managers (Required!)

" Your minimal init.vim/vimrc
set runtimepath+=~/path/to/ddc.vim/
call ddc#enable()
" Uncomment to fix the errors:
" let g:denops#server#deno_args = ['--allow-env', '--allow-net', '--allow-read', '--allow-write']

How to reproduce the problem from neovim/Vim startup (Required!)

Simply start vim with ddc enabled and the versions listed above.

Upload the log messages by :redir and :message (if errored)

I can no longer get the specific error messages, but hopefully you can still reproduce. Thanks for the great package.

Shougo commented 1 year ago

The latest version of deno (1.29.2) requires the following --allow flags for ddc.vim to work after updating deno or installing deno for the first time (I installed deno with mamba install deno):

Please use the latest version of deno. Because 1.29.2 is not the latest.

% deno upgrade
Looking up latest version
Local deno version 1.32.1 is the most recent release