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

[bug] E117: Unknown function: ale#handlers#ruby#EscapeExecutable #2821

Closed
toriumi0118 opened this issue Oct 9, 2019 · 4 comments
Closed
Labels

Comments

@toriumi0118
Copy link

Information

VIM version

:version
NVIM v0.3.8
Build type: Release

Operating System: macOS Catalina version 10.15

What went wrong

When I save .rb file, Ale shows error like this.

function <SNR>121_NeoVimCallback[29]..<lambda>15[1]..<SNR>112_ExitCallback[28]..<SNR>116_HandleExit[41]..<SNR>116_RunFixer[6]..ale#fix#A
pplyFixes[26]..ale#fix#ApplyQueuedFixes[65]..ale#Queue[33]..<SNR>76_Lint[26]..ale#engine#RunLinters[14]..<SNR>111_RunLinter[6]..<SNR>111
_RunIfExecutable[26]..ale#linter#GetCommand[5]..ale_linters#ruby#debride#GetCommand の処理中にエラーが検出されました:
行    4:
E117: 未知の関数です: ale#handlers#ruby#EscapeExecutable

I updated plugin today, then master branch is pulled and I used it.

Also I checked source codes (I'm not familiar for ale and vim scripts).
This fix might leak a fix at this line or merge timing makes this situation.

The line should be

return ale#ruby#EscapeExecutable(l:executable, 'debride')

Reproducing the bug

  1. update plugin by vim-plug.
  2. my configuration is like this.
let g:ale_fixers = {
      \ 'javascript': ['prettier', 'eslint'],
      \ 'typescript': ['prettier', 'eslint'],
      \ 'vue': ['prettier', 'eslint'],
      \ 'ruby': ['rubocop'],
      \ 'elixir': ['mix_format'],
      \ 'elm': ['elm-format'],
      \ 'css': ['stylelint'],
      \ 'scss': ['stylelint'],
      \ }
let g:ale_sign_error = "!"                   " error sign
let g:ale_lint_on_text_changed = 'never'     " setting for linter only run file changed
let g:ale_fix_on_save = 1                    " setting for linter only run file changed
let g:ale_ruby_rubocop_executable = 'bundle' " fix rubucop executor
  1. save .rb file.
  2. ale shows error.

:ALEInfo

 Current Filetype: ruby
Available Linters: ['brakeman', 'debride', 'rails_best_practices', 'reek', 'rubocop', 'ruby', 'solargraph', 'sorbet', 'standardrb']
   Linter Aliases:
'sorbet' -> ['srb']
  Enabled Linters: ['brakeman', 'debride', 'rails_best_practices', 'reek', 'rubocop', 'ruby', 'solargraph', 'sorbet', 'standardrb']
 Suggested Fixers:
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'rubocop' - Fix ruby files with rubocop --auto-correct.
  'rufo' - Fix ruby files with rufo
  'sorbet' - Fix ruby files with srb tc --autocorrect.
  'standardrb' - Fix ruby files with standardrb --fix
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
 Linter Variables:
let g:ale_ruby_brakeman_executable = 'brakeman'
let g:ale_ruby_brakeman_options = ''
let g:ale_ruby_debride_executable = 'debride'
let g:ale_ruby_debride_options = ''
let g:ale_ruby_rails_best_practices_executable = 'rails_best_practices'
let g:ale_ruby_rails_best_practices_options = ''
let g:ale_ruby_reek_executable = 'reek'
let g:ale_ruby_reek_options = ''
let g:ale_ruby_reek_show_context = 0
let g:ale_ruby_reek_show_wiki_link = 0
let g:ale_ruby_rubocop_executable = 'bundle'
let g:ale_ruby_rubocop_options = ''
let g:ale_ruby_ruby_executable = 'ruby'
let g:ale_ruby_solargraph_executable = 'solargraph'
let g:ale_ruby_solargraph_options = {}
let g:ale_ruby_sorbet_executable = 'srb'
let g:ale_ruby_sorbet_options = ''
let g:ale_ruby_standardrb_executable = 'standardrb'
let g:ale_ruby_standardrb_options = ''
 Global Variables:
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
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 = 1
let g:ale_fixers = {'elixir': ['mix_format'], 'typescript': ['prettier', 'eslint'], 'vue': ['prettier', 'eslint'], 'elm': ['elm-format']
, 'scss': ['stylelint'], 'ruby': ['rubocop'], 'javascript': ['prettier', 'eslint'], 'css': ['stylelint']}
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_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_linters_explicit = 0
let g:ale_list_vertical = 0
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_lsp_root = {}
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 0
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
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 = v:null
let g:ale_sign_error = '!'
let g:ale_sign_info = v:null
let g:ale_sign_offset = v:null
let g:ale_sign_style_error = v:null
let g:ale_sign_style_warning = v:null
let g:ale_sign_warning = v:null
let g:ale_sign_highlight_linenrs = v:null
let g:ale_statusline_format = v:null
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 0
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:
(executable check - failure) brakeman
(executable check - success) debride
(finished - exit code 0) ['/bin/sh', '-c', '''bundle'' exec rubocop --config ''/Users/yasuyuki.toriumi/.ghq/github.com/sotoasobi/sotoasobi_rails/.rubocop.yml'' --auto-correct --force-exclusion ''/var/folders/zy/99xy3wkd2g91l1xtz0lr114h0000gp/T/nvimpwuhaP/3/module_spec.rb'
'']
(executable check - failure) brakeman
(executable check - failure) solargraph
(executable check - failure) srb
(finished - exit code 0) ['/bin/sh', '-c', '''bundle'' exec rubocop --config ''/Users/yasuyuki.toriumi/.ghq/github.com/sotoasobi/sotoasobi_rails/.rubocop.yml'' --auto-correct --force-exclusion ''/var/folders/zy/99xy3wkd2g91l1xtz0lr114h0000gp/T/nvimpwuhaP/4/module_spec.rb'
'']
(executable check - failure) brakeman
@w0rp w0rp added the bug label Oct 9, 2019
@w0rp w0rp closed this as completed in e8de12c Oct 9, 2019
@w0rp
Copy link
Member

w0rp commented Oct 9, 2019

I have fixed this now. An older patch was merged that referenced the function with an older name.

suoto pushed a commit to suoto/ale that referenced this issue Oct 9, 2019
suoto pushed a commit to suoto/ale that referenced this issue Oct 9, 2019
AntoineGagne added a commit to AntoineGagne/ale that referenced this issue Oct 31, 2019
* master: (39 commits)
  Fix the test issues with html-beautify
  Add support for html-beautify (dense-analysis#2788)
  fixers/stylelint: enhance `stylelint` fixer (dense-analysis#2745)
  Fix dense-analysis#2835 - Bump up the sign group version check for NeoVim
  Mention the disabled option for message severity
  Adding support for LSP `window/showMessage` method (dense-analysis#2652)
  Fix tsserver not returning details for items with empty source
  Allow code actions to work on callback based sources
  Add support for nimlsp (dense-analysis#2815)
  Add definition of c/clangd's language as C (dense-analysis#2791)
  Bump the ALE version
  Fix TCP server config example.
  Suboptimal fix to prevent variables from leaking out of new clangd test
  Hopefully fixed issue with Windows paths
  Added tests for clangd compile commands dectection
  Updated ale_linters/c/clangd.vim to match ale_linters/cpp/clangd.vim
  Fix dense-analysis#2800 - Ignore completion user data which is not a dictionary
  Fix dense-analysis#2821 - Fix the debride linter after merging older code
  Add the possiblity to add extra psalm options
  fix tflint handler for 0.11+ (dense-analysis#2775)
  ...
timlag1305 pushed a commit to timlag1305/ale that referenced this issue Nov 5, 2019
suoto pushed a commit to suoto/ale that referenced this issue Nov 7, 2019
@digitalronin
Copy link

digitalronin commented Aug 1, 2020

I'm getting this error today, having just pulled the latest master of ale. I worked around it by avoiding debride like this:

let g:ale_linters = {'ruby': ['standardrb']}
let g:ale_fixers = {'ruby': ['standardrb']}

@w0rp
Copy link
Member

w0rp commented Aug 6, 2020

You probably have two different versions of ALE installed. Have a look through your runtimepath. (:set runtimepath)

@digitalronin
Copy link

Thanks for replying. I'll look into that.

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

No branches or pull requests

3 participants