dense-analysis / dense-analysis/ale

Hack LSP Doesn't Run When Custom Executable Is Set

Open
#3,913 15 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

## Information

**VIM version**

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 23 2020 18:41:43)
macOS version - x86_64
Included patches: 1-2202

Operating System: **macOS Big Sur** - Version 11.6 (20G165)

## What went wrong

When configuring a custom executable for hack (`hh_client`) via `let g:ale_hack_hack_executable`, the Hack LSP no longer attempts to start, yet shows no error messages.

Without a custom executable set, `:ALEInfo` will show (at the bottom):
```
Command History:
(executable check - success) hh_client
(executable check - success) vendor/bin/hhast-lint
(started) ['/usr/local/bin/bash', '-c', '''hh_client'' lsp --from vim-ale']
(started) ['/usr/local/bin/bash', '-c', '''vendor/bin/hhast-lint'' --mode lsp --from vim-ale']
```

**However**, after setting custom executables via the following vim config lines:
```
let g:ale_hack_hack_executable = systemlist("type -p docker_hh_client")->get(0, '')
let g:ale_hack_hhast_executable = systemlist("type -p docker_hhast")->get(0, '')
```
... the LSP will no longer start and `:ALEInfo` will show:
```
Command History:
(executable check - success) /Users/tsuarez/local_device/bin/docker_hh_client
(executable check - success) /Users/tsuarez/local_device/bin/docker_hhast
```

## Reproducing the bug

1. With no specific configuration, the Hack LSP will attempt to start
2. Configure a custom executable for hack (`hh_client`), that *exists* and the LSP will no longer attempt to start

### :ALEInfo

```
Current Filetype: hack
Available Linters: ['hack', 'hhast']
Enabled Linters: ['hack', 'hhast']
Ignored Linters: []
Suggested Fixers:
'hackfmt' - Fix Hack files with hackfmt.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
Linter Variables:

let g:ale_hack_hack_executable = '/Users/tsuarez/local_device/bin/docker_hh_client'
let g:ale_hack_hack_use_global = 1
let g:ale_hack_hhast_executable = '/Users/tsuarez/local_device/bin/docker_hhast'
let g:ale_hack_hhast_use_global = 1
Global Variables:

let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = v:null
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 1
let g:ale_completion_max_suggestions = 50
let g:ale_disable_lsp = 0
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 = {'go': [], 'typescript': ['deno'], 'json': ['jq', 'prettier'], 'sh': ['shfmt'], 'javascript': ['prettier', 'eslint'], 'hack': ['Slackfmt']}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = v:null
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 0
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 0
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'never'
let g:ale_linter_aliases = {}
let g:ale_linters = {'go': ['go build', 'gofmt', 'golint'], 'php': ['php', 'phpcs', 'phpstan'], 'hack': ['hack', 'hhast']}
let g:ale_linters_explicit = 0
let g:ale_linters_ignore = {}
let g:ale_list_vertical = v:null
let g:ale_list_window_size = v:null
let g:ale_loclist_msg_format = v:null
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = v:null
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 1
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_root = {}
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 = v:null
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 - success) /Users/tsuarez/local_device/bin/docker_hh_client
(executable check - success) /Users/tsuarez/local_device/bin/docker_hhast
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.