semgrep-ls has exited (exited abnormally with code 2)
Thank you for the bug report
- [X] I am using the latest version of
lsp-moderelated packages. - [X] I checked FAQ and Troubleshooting sections
- [X] You may also try reproduce the issue using clean environment using the following command:
M-x lsp-start-plain
Bug description
2 bugs here : 1st bug - I don't want to use semgrep and since the last update of lsp it's automatically running via the dart-mode 2nd bug - semgrep-ls:337677/starting exited ... event if semgrep is installed via pip
Steps to reproduce
1st bug - I don't want to use semgrep and since the last update of lsp it's automatically running via the dart-mode
We should disable semgrep by default...
2nd bug - semgrep-ls:337677/starting exited ... event if semgrep is installed via pip
Semgrep doesn't work proprelly
Expected behavior
1st bug - I don't want to use semgrep and since the last update of lsp it's automatically running via the dart-mode
Having a way to bypass semgrep as an option would be great... It should not be loaded by default.
2nd bug - semgrep-ls:337677/starting exited ... event if semgrep is installed via pip
There is not much error logs about semgrep. I just ask to have a simple working LSP config. I'm happy if it does work properly but having more features and require people to install additional software manually with LSP make lsp-mode unmanageable.
Which Language Server did you use?
dart-mode
OS
Linux
Error callstack
Reverting buffer ‘lib<flutter_application_1>’
LSP :: semgrep-ls has exited (exited abnormally with code 2)
error in process sentinel: Quit [2 times]
[15.85][ERROR]: Error: exception Unix_error: Permission denied opendir /home/michael/src/databases/db
Raised by primitive operation at List_files.with_dir_handle in file "libs/paths/List_files.ml", line 20, characters 12-31
Called from Find_targets.walk_skip_and_collect.aux in file "src/targeting/Find_targets.ml", line 242, characters 18-55
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Stdlib__List.iter in file "list.ml", line 110, characters 12-15
Called from Find_targets.walk_skip_and_collect in file "src/targeting/Find_targets.ml", line 267, characters 2-15
Called from Find_targets.get_targets_from_filesystem.(fun) in file "src/targeting/Find_targets.ml", line 475, characters 19-54
Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
Called from Find_targets.get_targets_for_project in file "src/targeting/Find_targets.ml", line 526, characters 8-54
Called from List_.fast_map in file "libs/commons/List_.ml", line 79, characters 17-20
Called from Find_targets.get_targets in file "src/targeting/Find_targets.ml", line 555, characters 2-104
Called from Find_targets.get_target_fpaths in file "src/targeting/Find_targets.ml", line 568, characters 26-57
Called from Session.get_targets in file "src/osemgrep/language_server/server/Session.ml", line 99, characters 2-167
Called from Session.cache_workspace_targets.(fun) in file "src/osemgrep/language_server/server/Session.ml", line 168, characters 40-61
Called from List_.fast_map in file "libs/commons/List_.ml", line 79, characters 17-20
Called from Session.cache_workspace_targets in file "src/osemgrep/language_server/server/Session.ml", line 168, characters 16-71
Called from Initialize_request.initialize_server in file "src/osemgrep/language_server/requests/Initialize_request.ml", line 116, characters 2-48
Called from Initialize_request.on_request in file "src/osemgrep/language_server/requests/Initialize_request.ml", line 135, characters 15-46
Called from Request_handler.on_request in file "src/osemgrep/language_server/requests/Request_handler.ml", line 70, characters 6-49
Called from RPC_server.Make.handle_client_message in file "src/osemgrep/language_server/server/RPC_server.ml", line 218, characters 33-63
Called from RPC_server.Make.rpc_loop.(fun) in file "src/osemgrep/language_server/server/RPC_server.ml", line 243, characters 39-71
Called from Lwt.Sequential_composition.backtrace_bind.create_result_promise_and_callback_if_deferred.callback in file "src/core/lwt.ml", line 1910, characters 16-19
Re-raised at RPC_server.Make.rpc_loop.(fun) in file "src/osemgrep/language_server/server/RPC_server.ml", line 240, characters 8-446
Re-raised at Lwt.Miscellaneous.poll in file "src/core/lwt.ml", line 3123, characters 20-29
Called from Lwt_main.run.run_loop in file "src/unix/lwt_main.ml", line 27, characters 10-20
Called from Lwt_main.run in file "src/unix/lwt_main.ml", line 106, characters 8-13
Re-raised at Lwt_main.run in file "src/unix/lwt_main.ml", line 112, characters 4-13
Called from Lsp_subcommand.run_conf in file "src/osemgrep/cli_lsp/Lsp_subcommand.ml", line 51, characters 2-34
Called from CLI.dispatch_subcommand in file "src/osemgrep/cli/CLI.ml", line 202, characters 12-120
Called from CLI.safe_run in file "src/osemgrep/cli/CLI.ml", line 253, characters 8-12
Error: fatal error
Exiting with error status 2: osemgrep lsp
[0m
Process semgrep-ls stderr finished
Anything else?
Apparently according the backtrace semgrep try to load a directory out of my project ! /home/michael/src/databases/db
Which it makes no sense. To solution doesn't look very mature.
I also tried to use : M-x lsp-start-plain from emacs -q and I have the same error.
if you want to disable semgrep-ls you can do the following:
(setq lsp-disabled-clients '(semgrep-ls))