Closed ghost closed 7 years ago
Do you have the full error message? I can't see the error there.
Take a look at :mess
Running :messages
is outputting the same thing. Is there an argument I'm missing to get the full output?
See if you can include more of the message. There should at least be a part of the message saying what line the error happened on. Usually that information is also wrong, and there's an earlier error which is the real cause of the problem.
Ah yes, seems I didn't copy a part of it over, my bad. Here's an updated output.
"main.ts" 0L, 0C
Error detected while processing function ale#Queue[9]..ale#CallWithCooldown[9]..<SNR>14_A
LEQueueImpl[41]..ale#Lint[12]..ale#CallWithCooldown[9]..<SNR>14_ALELintImpl[16]..ale#engi
ne#RunLinters[12]..<SNR>56_RunLinter[2]..<SNR>56_CheckWithLSP[2]..ale#linter#StartLSP[28]
..ale#lsp#StartProgram[28]..<SNR>63_RegisterProject:
line 3:
E713: Cannot use empty key for Dictionary
Cool. Thanks!
That error is ridiculous. If you look at the online documentation for the error code, both the documentation for Vim and NeoVim say this:
The empty string can be used as a key.
Yet empty string keys work in Vim, but don't work in NeoVim.
I'll work around that by using a substitute key instead.
Hmm 🤔 . You wanna log this to NVIM? I can otherwise.
It might be an idea to bring it up. I have fixed this now by using a substitute key for empty strings.
@w0rp I am still getting this error when opening a typescript file(.tsx)
NVIM v0.2.2
@aakashsigdel Please share the full error message.
@w0rp here is the full error message:
ne#RunLinters[12]..<SNR>82_RunLinter[2]..<SNR>82_CheckWithLSP[2]..ale#linter#StartLSP[28]..ale#lsp#StartProgram[11]..ale#job#IsRunning:
line 4:
E474: Invalid argument```
Try updating to the latest code.
@w0rp I am using vim-plug
and I removed everything in .vim
dir and did a PlugInstall
. But I am still getting these errors
This was happening because I commented out the vimproc from my vimrc. Sorry for the trouble.
I thought vim8 and nvim both have async api, are you planning to port the code to use those?
ALE is implemented using async features in Vim 8 and NeoVim. I've never worked with vimproc.
@aakashsigdel , I had this same issue after removing vim-proc thinking it was unnecessary, but that gave me the error. I added vim-proc back, and everything works fine again.
I'm using Tsuquyomi and nvim-typescript too, so it may be something to do with those packages in combination with Ale parhaps?
ALE doesn't use vim-proc.
ALE doesn't use vim-proc.
While I absolutely believe you, I must say that I had the same error and it went away after I added vimproc to my plugins. Here is my setup:
:version
: NVIM v0.2.3-785-g3d2f4154b
Note that this happened with ts files only for me. I never had any issues with plain javascript files and eslint, so this issue must be specific to the typescript component of ALE. I also saw that this happens with the latest version of ALE. I had checked out an older version where this error did not happen as well.
Update:
I tested a bit around and its true that vimproc is not needed with a minimalvimrc and ale as the only plugin. I'm also using Tsuquyomi but not nvim-typescript. It appears as if tsuquyomi is the reason when I tested it in my normal setup however with the minimalvimrc they both work fine together. I'm using dein as a plugin manager. The minimal test was done by adding both plugins to packpath
. Not sure where to continue to debug this now...
Hey all,
I got the same error after updating to the latest version of ale today. Same thing - works fine on everything but typescript files.
I also have the nvim-typescript plugin, but still got the error after removing it.
I can also attest to the fact that, for whatever reason, installing vimproc also fixed the issue.
Hate to add to the mystery, but wanted to add a data point to the debugging process. Happy to help any way I can from here. Ale is one of my favourite plugins. Thanks for all your work w0rp!!
Could you copy and paste the error you saw? ALE doesn't use vimproc, and has never used vimproc, so that shouldn't make any difference.
Sure thing!
So when opening a .ts file I get the following:
"tmp.ts" 0L, 0C
Error detected while processing function ale#Queue[9]..ale#CallWithCooldown[9]..<SNR>48_ALEQueueImpl[41]..ale#Lint[12]..ale#CallWithCooldown[9]..<SNR>48_ALELintImpl[16]..ale#engine#RunLinters[14]..<SNR>109_RunLinter[2]..<SNR>109_CheckWithLSP[2]..ale#linter#StartLSP[29]..ale#lsp#StartProgram[11]..ale#job#IsRunning:
line 4:
E474: Invalid argument
1 line less; before #1 2 seconds ago
E474: Invalid argument
Running :ALEInfo
gives the following:
Current Filetype: typescript
Available Linters: ['eslint', 'tslint', 'tsserver', 'typecheck']
Enabled Linters: ['eslint', 'tslint', 'tsserver', 'typecheck']
Linter Variables:
let g:ale_typescript_tslint_config_path = ''
let g:ale_typescript_tslint_executable = 'tslint'
let g:ale_typescript_tslint_ignore_empty_files = 0
let g:ale_typescript_tslint_rules_dir = ''
let g:ale_typescript_tslint_use_global = 0
let g:ale_typescript_tsserver_config_path = ''
let g:ale_typescript_tsserver_executable = 'tsserver'
let g:ale_typescript_tsserver_use_global = 0
Global Variables:
let g:ale_cache_executable_check_failures = 0
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = 50
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {'typescript': ['tslint']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 10
let g:ale_list_vertical = 0
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = 0
let g:ale_open_list = 0
let g:ale_pattern_options = {}
let g:ale_pattern_options_enabled = 0
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_type_map = {}
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(executable check - success) eslint
(finished - exit code 0) ['/usr/bin/zsh', '-c', '''eslint'' -f unix --stdin --stdin-filename ''/home/zookeeprr/tmp.ts'' < ''/tmp/nvimyVsAX9/3/tmp.ts''']
<<<NO OUTPUT RETURNED>>>
(executable check - success) tslint
(finished - exit code 0) ['/usr/bin/zsh', '-c', 'cd ''/home/zookeeprr'' && ''tslint'' --format json ''/tmp/nvimyVsAX9/4/tmp.ts''']
<<<OUTPUT STARTS>>>
[]
<<<OUTPUT ENDS>>>
I have a fair few plugins. It's not impossible that the ALE error is simply a symptom of another plugin's error. I'll clear out the rest of them and see what I find.
EDIT: Sure enough, running ALE as my only plugin kills the error. I'll try to find the true culprit.
Making a new comment as I found the culprit!!
Turns out the tsuquyomi plugin was to blame. Fortunately, I believe ALE offers much of the same functionality, so it should be able to be deleted.
I don't develop vim/nvim plugins, so I'm still not sure why those two wouldn't cooperate (or why vimproc made them work together), but that's definitely the issue.
Thanks again w0rp. You da man.
Edit: Another edit. Looks like twuquyomi is actually an aggregation of a bunch of other plugins. Probably one of those that's truly causing the error.
Okay, that make sense. It might be because they both try to start the same kind of server process, and maybe it's not being started properly if it's already running in a certain way. Maybe installing vimproc
makes the other plugin give up on using Vim's build in job control support, so it stops messing with something there.
Hello,
I am seeing this error message when starting NVIM 0.1.7.
I only see this error in v1.5.0. I am not able to reproduce this issue in v1.4.1, so this may be a regression.
Thanks for all your hard work, Alam
P.S. Here is the
ALEInfo
as requested.