postgres-language-server icon indicating copy to clipboard operation
postgres-language-server copied to clipboard

cargo xtask install command is not working

Open timurzdev opened this issue 1 year ago • 3 comments

Bug report

Describe the bug

cargo xtask install command is not working properly

To Reproduce

follow readme to install with cargo

➜  postgres_lsp git:(main) cargo xtask install
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/xtask install`
$ cargo install --path crates/postgres_lsp --locked --force
error: `/Users/tmogus/Desktop/code/postgres_lsp/crates/postgres_lsp` is not a directory. --path must point to a directory containing a Cargo.toml file.
Error: install server

Caused by:
    command exited with non-zero code `cargo install --path crates/postgres_lsp --locked --force`: 101

Expected behavior

successful installation

System information

macOS 14.5 23F79 arm64

Additional context

crates/postgres_lsp doesn't exists,

cargo install --path crates/pg_lsp --locked --force worked well

timurzdev avatar Aug 13 '24 12:08 timurzdev

hey! Thanks for opening the issue. It's because of a recent refactor where the lsp crate now has a different name.

I am currently working on a few improvements to the core logic to make it ready for an alpha release. Will look into xtask and the release process once that's done 🙏🏼

psteinroe avatar Aug 13 '24 20:08 psteinroe

Hi! I'm interested in contributing to this LSP, so looking forward to the alpha release :). For the time being, I was able to unblock myself here by following these steps:

  • Inside xtask/src/install.rs:142, replace postgres_lsp with pg_lsp
  • Have an available instance of postgres on port 5432 with credentials postgres:postgres when running cargo xtask install. The easiest way to do this is by spinning up a docker container via docker compose up.

ngynkvn avatar Aug 26 '24 13:08 ngynkvn

which commit is now stable?

➜  postgres_lsp git:(main) cargo xtask install --server
...
error[E0554]: `#![feature]` may not be used on the stable release channel
  --> crates/pg_base_db/src/lib.rs:14:1
   |
14 | #![feature(extract_if, test)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> crates/pg_schema_cache/src/lib.rs:4:1
  |
4 | #![feature(future_join)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0554`.
error: could not compile `pg_base_db` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `pg_schema_cache` (lib) due to 1 previous error
error: failed to compile `pg_lsp v0.0.0 (/Users/tej/postgres_lsp/crates/pg_lsp)`, intermediate artifacts can be found at `/Users/tej/postgres_lsp/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Error: install server

Tej12345 avatar Nov 29 '24 12:11 Tej12345

thanks for trying to get the early version to run! closing this issue since we are now available on the vscode marketplace.

psteinroe avatar Apr 06 '25 14:04 psteinroe