huggingface / llm-ls

LSP server leveraging LLMs for code completion (and more?)
Apache License 2.0
553 stars 43 forks source link

Cannot build testbed on Windows #54

Open noahbald opened 7 months ago

noahbald commented 7 months ago

https://github.com/huggingface/llm-ls/blob/2a433cdf75dc0a225e95753256f2601161bc6747/crates/testbed/src/main.rs#L346C24-L346C24

The linked statement results in the following error.

error[E0425]: cannot find function `symlink` in module `fs`
   --> crates\testbed\src\main.rs:346:21
    |
346 |                 fs::symlink(link_target, dst_path.clone()).await?;
    |                     ^^^^^^^ not found in `fs`
    |
note: found an item that was configured out
   --> C:\Users\noahw\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.32.0\src\fs\mod.rs:114:9
    |
114 |     mod symlink;
    |         ^^^^^^^
note: found an item that was configured out
   --> C:\Users\noahw\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.32.0\src\fs\mod.rs:115:28
    |
115 |     pub use self::symlink::symlink;
    |

This is available in unix only https://docs.rs/tokio/latest/tokio/fs/fn.symlink.html

McPatate commented 6 months ago

Ah, will have to use #[cfg()] macros & symlink_dir / symlink_file

dsisnero commented 3 months ago

same issue