-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Summary
Because the LSP protocol does not provide, in its base protocol, information sufficient to inform the user of things like "the server is crashing on failure to build", an LSP extension must be used to do this. Because Helix refuses to support any extensions, this leads to Helix lacking basic functionality: the knowledge that an extension is thrashing on a useless activity, wasting compute time and silently not informing me of why the LSP feedback is effectively dead.
It does not matter if something is an LSP "extension" if it leads to the program failing to do its one remaining task when it is a nonworking program of requesting human intervention instead of silently dying. If you do not want to support any extensions whatsoever, then consider ceasing to support LSP, because the protocol requires extensions in order to have basic functionality.
Reproduction Steps
I tried this:
helix pgrx/src/callconv.rs
I expected this to happen: Helix propagated the build errors.
Instead, this happened: Helix failed to provide basic information.
Helix log
how many lines do you want of the same output, I mean it's just tons more of this:
~/.cache/helix/helix.log
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-09-18T07:06:10.063984Z ERROR rust_analyzer::main_loop: FetchBuildDataError:\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- "error: failed to run custom build command for `pgrx-pg-sys v0.12.4 (/home/jubilee/pgrx/pgrx-pg-sys)`\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- "note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- "Caused by:\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " process didn't exit successfully: `/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-e9ce897a4e3bfa12/build-script-bindgen` (exit status: 1)\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " --- stdout\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_BUILD_VERBOSE\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_PG_CONFIG_PATH\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_PG_CONFIG_AS_ENV\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=LLVM_CONFIG_PATH\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=LIBCLANG_PATH\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=LIBCLANG_STATIC_PATH\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-changed=include\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-changed=cshim\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-changed=/home/jubilee/.pgrx/config.toml\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " --- stderr\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " build_paths=BuildPaths { manifest_dir: \"/home/jubilee/pgrx/pgrx-pg-sys\", out_dir: \"/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-007c978f6847dc03/out\", src_dir: \"/home/jubilee/pgrx/pgrx-pg-sys/src/include\", shim_src: \"/home/jubilee/pgrx/pgrx-pg-sys/cshim\", shim_dst: \"/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-007c978f6847dc03/out/cshim\" }\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " Error: Did not find `pg$VERSION` feature. `pgrx-pg-sys` requires one of `pg12`, `pg13`, `pg14`, `pg15`, `pg16`, `pg17` to be set\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " Location:\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- " pgrx-bindgen/src/build.rs:192:28\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-09-18T00:06:10.064 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-09-18T00:06:10.077 helix_lsp::transport [ERROR] rust-analyzer <- ServerError(-32801): content modified
2024-09-18T00:06:10.077 helix_term::application [WARN] unhandled window/showMessage: ShowMessageParams { typ: Warning, message: "Failed to run build scripts of some packages." }
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-09-18T07:06:10.572447Z ERROR flycheck: Flycheck failed to run the following command: CommandHandle { program: \"/usr/bin/cargo\", arguments: [\"check\", \"--workspace\", \"--message-format=json\", \"--manifest-path\", \"/home/jubilee/pgrx/Cargo.toml\", \"--keep-going\", \"--all-targets\"], current_dir: Some(\"/home/jubilee/pgrx\") }, error=Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(25856))):\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " Blocking waiting for file lock on package cache\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " Compiling pgrx-pg-sys v0.12.4 (/home/jubilee/pgrx/pgrx-pg-sys)\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- "error: failed to run custom build command for `pgrx-pg-sys v0.12.4 (/home/jubilee/pgrx/pgrx-pg-sys)`\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- "note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- "Caused by:\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " process didn't exit successfully: `/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-e9ce897a4e3bfa12/build-script-bindgen` (exit status: 1)\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " --- stdout\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_BUILD_VERBOSE\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_PG_CONFIG_PATH\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_PG_CONFIG_AS_ENV\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=LLVM_CONFIG_PATH\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=LIBCLANG_PATH\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=LIBCLANG_STATIC_PATH\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-changed=include\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-changed=cshim\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " cargo:rerun-if-changed=/home/jubilee/.pgrx/config.toml\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " --- stderr\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " build_paths=BuildPaths { manifest_dir: \"/home/jubilee/pgrx/pgrx-pg-sys\", out_dir: \"/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-007c978f6847dc03/out\", src_dir: \"/home/jubilee/pgrx/pgrx-pg-sys/src/include\", shim_src: \"/home/jubilee/pgrx/pgrx-pg-sys/cshim\", shim_dst: \"/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-007c978f6847dc03/out/cshim\" }\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " Error: Did not find `pg$VERSION` feature. `pgrx-pg-sys` requires one of `pg12`, `pg13`, `pg14`, `pg15`, `pg16`, `pg17` to be set\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " Location:\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- " pgrx-bindgen/src/build.rs:192:28\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- "warning: build failed, waiting for other jobs to finish...\n"
2024-09-18T00:06:10.572 helix_lsp::transport [ERROR] rust-analyzer err <- "\n"
2024-09-18T00:06:10.572 helix_term::application [WARN] unhandled window/showMessage: ShowMessageParams { typ: Warning, message: "Failed to run build scripts of some packages.\n\ncargo check failed to start: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(25856))):\n Blocking waiting for file lock on package cache\n Compiling pgrx-pg-sys v0.12.4 (/home/jubilee/pgrx/pgrx-pg-sys)\nerror: failed to run custom build command for `pgrx-pg-sys v0.12.4 (/home/jubilee/pgrx/pgrx-pg-sys)`\nnote: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.\n\nCaused by:\n process didn't exit successfully: `/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-e9ce897a4e3bfa12/build-script-bindgen` (exit status: 1)\n --- stdout\n cargo:rerun-if-env-changed=PGRX_BUILD_VERBOSE\n cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE\n cargo:rerun-if-env-changed=PGRX_PG_CONFIG_PATH\n cargo:rerun-if-env-changed=PGRX_PG_CONFIG_AS_ENV\n cargo:rerun-if-env-changed=LLVM_CONFIG_PATH\n cargo:rerun-if-env-changed=LIBCLANG_PATH\n cargo:rerun-if-env-changed=LIBCLANG_STATIC_PATH\n cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS\n cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu\n cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu\n cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE\n cargo:rerun-if-changed=include\n cargo:rerun-if-changed=cshim\n cargo:rerun-if-changed=/home/jubilee/.pgrx/config.toml\n\n --- stderr\n build_paths=BuildPaths { manifest_dir: \"/home/jubilee/pgrx/pgrx-pg-sys\", out_dir: \"/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-007c978f6847dc03/out\", src_dir: \"/home/jubilee/pgrx/pgrx-pg-sys/src/include\", shim_src: \"/home/jubilee/pgrx/pgrx-pg-sys/cshim\", shim_dst: \"/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-007c978f6847dc03/out/cshim\" }\n Error: Did not find `pg$VERSION` feature. `pgrx-pg-sys` requires one of `pg12`, `pg13`, `pg14`, `pg15`, `pg16`, `pg17` to be set\n\n Location:\n pgrx-bindgen/src/build.rs:192:28\nwarning: build failed, waiting for other jobs to finish..." }
2024-09-18T00:06:10.611 helix_term::application [WARN] unhandled window/showMessage: ShowMessageParams { typ: Warning, message: "Failed to run build scripts of some packages.\n\ncargo check failed to start: Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(25856))):\n Blocking waiting for file lock on package cache\n Compiling pgrx-pg-sys v0.12.4 (/home/jubilee/pgrx/pgrx-pg-sys)\nerror: failed to run custom build command for `pgrx-pg-sys v0.12.4 (/home/jubilee/pgrx/pgrx-pg-sys)`\nnote: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.\n\nCaused by:\n process didn't exit successfully: `/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-e9ce897a4e3bfa12/build-script-bindgen` (exit status: 1)\n --- stdout\n cargo:rerun-if-env-changed=PGRX_BUILD_VERBOSE\n cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE\n cargo:rerun-if-env-changed=PGRX_PG_CONFIG_PATH\n cargo:rerun-if-env-changed=PGRX_PG_CONFIG_AS_ENV\n cargo:rerun-if-env-changed=LLVM_CONFIG_PATH\n cargo:rerun-if-env-changed=LIBCLANG_PATH\n cargo:rerun-if-env-changed=LIBCLANG_STATIC_PATH\n cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS\n cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu\n cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu\n cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE\n cargo:rerun-if-changed=include\n cargo:rerun-if-changed=cshim\n cargo:rerun-if-changed=/home/jubilee/.pgrx/config.toml\n\n --- stderr\n build_paths=BuildPaths { manifest_dir: \"/home/jubilee/pgrx/pgrx-pg-sys\", out_dir: \"/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-007c978f6847dc03/out\", src_dir: \"/home/jubilee/pgrx/pgrx-pg-sys/src/include\", shim_src: \"/home/jubilee/pgrx/pgrx-pg-sys/cshim\", shim_dst: \"/home/jubilee/pgrx/target/debug/build/pgrx-pg-sys-007c978f6847dc03/out/cshim\" }\n Error: Did not find `pg$VERSION` feature. `pgrx-pg-sys` requires one of `pg12`, `pg13`, `pg14`, `pg15`, `pg16`, `pg17` to be set\n\n Location:\n pgrx-bindgen/src/build.rs:192:28\nwarning: build failed, waiting for other jobs to finish..." }
2024-09-18T00:06:10.797 helix_lsp::transport [ERROR] rust-analyzer err <- "2024-09-18T07:06:10.797338Z ERROR flycheck: Flycheck failed to run the following command: CommandHandle { program: \"/usr/bin/cargo\", arguments: [\"check\", \"--workspace\", \"--message-format=json\", \"--manifest-path\", \"/home/jubilee/pgrx/Cargo.toml\", \"--keep-going\", \"--all-targets\"], current_dir: Some(\"/home/jubilee/pgrx\") }, error=Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(unix_wait_status(25856))):\n"
2024-09-18T00:06:10.797 helix_lsp::transport [ERROR] rust-analyzer err <- " Compiling pgrx-pg-sys v0.12.4 (/home/jubilee/pgrx/pgrx-pg-sys)\n"
Platform
Linux
Terminal Emulator
konsole 24.05.1
Installation Method
pacman
Helix Version
helix 24.3