Closed twouters closed 2 years ago
What are the steps to reproduce this? I cannot reproduce this issue in my environment
Triggers in Arch Linux with:
$ mkdir -p /tmp/coc-ansible-26/tasks
$ vim /tmp/coc-ansible-26/tasks/main.yml
I'll try to reproduce in a clean env
All I have been able to confirm is that I get this diagnostics message. Is this the problem?
load-failure[filenotfounderror]
Description: [Errno 2] No such file or directory: '/private/tmp/coc-ansible-26/tasks/main.yml' (Ansible)
This is a behavior on the language server side and may not be adjustable on the coc-extension (coc-ansible) side.
Ok, do you think I'll have to report it there then?
Just for completeness, repro steps in a clean docker:
$ docker pull archlinux/archlinux
$ docker run -ti archlinux/archlinux:latest /bin/bash
# pacman -Syu
# pacman -S vim ansible-lint python-black nodejs git npm
# curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# cat <<EOF > ~/.vimrc
call plug#begin()
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'pearofducks/ansible-vim', { 'do': './UltiSnips/generate.sh --style dictionary' }
call plug#end()
let g:coc_filetype_map = {'yaml.ansible': 'ansible',}
EOF
# vim
:PlugInstall
:q!
# vim
:CocInstall @yaegassy/coc-ansible
:q!
# mkdir -p /tmp/coc-ansible-26/tasks
# vim /tmp/coc-ansible-26/tasks/main.yml
:messages
Is this the same as mine that you are having problems with? Are you perhaps experiencing different errors, etc.? https://github.com/yaegassy/coc-ansible/issues/26#issuecomment-1236721575
I don't see this as a particularly big problem, but if you do, please file an issue report with the language server itself.
It's the same error, vim just shows different output depending on where it's shown. e.g. if you wait until the ansible lint progress bar stops and press down and up you'll see:
It's not a big problem, just a minor annoyance.
Hmmm. I tried it in Vim and it behaves the same as Neovim. I can't reproduce your problem. (Never mind the command vimc
)
https://user-images.githubusercontent.com/188642/188423297-abb71840-6d01-4d0c-bdd2-fe25526932f2.mp4
Ah, I tried increasing the version of ansible-lint and was able to reproduce the problem. Yes, this does feel like noise...
It seems to be caused by a change in command behavior since v6.5.0
of ansible-lint
.
@twouters Please issue report to ansible-language-server
or ansible-lint
. 🙇
Reported at ansible-lint :point_up: While typing the report I figured this is more likely to be fixed in ansible-language-server but we'll see.
If you open a non-existing file (e.g. a new playbook or role tasks file) the plugin throws an error because it tries to run the ansible-lint command on the filename, which doesn't exist yet: