From 82f033c2b63490d43868e7f05e8d3f903374d758 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Tue, 3 Oct 2023 15:40:41 +0300 Subject: [PATCH 1/5] fix: #25 --- .cargo/config.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 8628170..80be290 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,5 @@ [alias] xtask = "run --package xtask --bin xtask --" + +[target.x86_64-unknown-linux-gnu] +rustflags = ["-C", "target-feature=+crt-static"] From 056d8bf1d6e3a3063af4d1e94f6daa6f8de9a400 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Tue, 3 Oct 2023 16:26:24 +0300 Subject: [PATCH 2/5] fix: #25 --- .cargo/config.toml | 2 +- .github/workflows/release.yml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 80be290..d7edd8b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,5 @@ [alias] xtask = "run --package xtask --bin xtask --" -[target.x86_64-unknown-linux-gnu] +[target.x86_64-pc-windows-msvc] rustflags = ["-C", "target-feature=+crt-static"] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a15e612..5faada6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,9 @@ jobs: - os: ubuntu-22.04 target: x86_64-unknown-linux-gnu code-target: linux-x64 + - os: ubuntu-22.04 + target: x86_64-unknown-linux-musl + code-target: linux-x64 - os: ubuntu-22.04 target: aarch64-unknown-linux-gnu code-target: linux-arm64 @@ -86,7 +89,7 @@ jobs: name: dist-${{ matrix.target }} path: ./dist - dist-x86_64-unknown-linux-musl: + dist-x86_64-unknown-alpine-musl: name: dist (x86_64-unknown-linux-musl) runs-on: ubuntu-latest env: From b46bb458a79fa4dfd297f5423d402a5d5ec921cd Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Tue, 3 Oct 2023 16:38:54 +0300 Subject: [PATCH 3/5] fix: #25 --- .github/workflows/release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5faada6..7f1aae9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,7 +90,7 @@ jobs: path: ./dist dist-x86_64-unknown-alpine-musl: - name: dist (x86_64-unknown-linux-musl) + name: dist (x86_64-unknown-alpine-musl) runs-on: ubuntu-latest env: LLM_LS_TARGET: x86_64-unknown-linux-musl @@ -116,13 +116,13 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v1 with: - name: dist-x86_64-unknown-linux-musl + name: dist-x86_64-unknown-alpine-musl path: ./dist publish: name: publish runs-on: ubuntu-latest - needs: ["dist", "dist-x86_64-unknown-linux-musl"] + needs: ["dist", "dist-x86_64-unknown-alpine-musl"] steps: - name: Checkout repository uses: actions/checkout@v3 @@ -154,6 +154,10 @@ jobs: with: name: dist-x86_64-unknown-linux-musl path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-x86_64-unknown-alpine-musl + path: dist - uses: actions/download-artifact@v1 with: name: dist-aarch64-unknown-linux-gnu From c7c0e8b243559585f6add331d687505c3ba13cb4 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Tue, 3 Oct 2023 17:40:39 +0300 Subject: [PATCH 4/5] fix: #25 --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f1aae9..cb6ae43 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -154,10 +154,10 @@ jobs: with: name: dist-x86_64-unknown-linux-musl path: dist - - uses: actions/download-artifact@v1 - with: - name: dist-x86_64-unknown-alpine-musl - path: dist + # - uses: actions/download-artifact@v1 + # with: + # name: dist-x86_64-unknown-alpine-musl + # path: dist - uses: actions/download-artifact@v1 with: name: dist-aarch64-unknown-linux-gnu From 8a5066979a1ac712ea36f5bdb7792d65f087d81b Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Fri, 13 Oct 2023 16:48:53 +0300 Subject: [PATCH 5/5] fix: decouple artifact name and target --- .cargo/config.toml | 3 --- .github/workflows/release.yml | 17 +++++++++-------- Cargo.lock | 19 +++---------------- crates/llm-ls/Cargo.toml | 5 ++--- crates/llm-ls/src/document.rs | 8 +------- xtask/src/dist.rs | 5 ++++- 6 files changed, 19 insertions(+), 38 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index d7edd8b..8628170 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,2 @@ [alias] xtask = "run --package xtask --bin xtask --" - -[target.x86_64-pc-windows-msvc] -rustflags = ["-C", "target-feature=+crt-static"] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a9bf5dd..96d2f29 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,11 +89,12 @@ jobs: name: dist-${{ matrix.target }} path: ./dist - dist-x86_64-unknown-alpine-musl: - name: dist (x86_64-unknown-alpine-musl) + dist-x86_64-alpine-linux-musl: + name: dist (x86_64-alpine-linux-musl) runs-on: ubuntu-latest env: LLM_LS_TARGET: x86_64-unknown-linux-musl + LLM_LS_ARTIFACT: x86_64-alpine-linux-musl # For some reason `-crt-static` is not working for clang without lld RUSTFLAGS: "-C link-arg=-fuse-ld=lld -C target-feature=-crt-static" container: @@ -116,13 +117,13 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v1 with: - name: dist-x86_64-unknown-alpine-musl + name: dist-x86_64-alpine-linux-musl path: ./dist publish: name: publish runs-on: ubuntu-latest - needs: ["dist", "dist-x86_64-unknown-alpine-musl"] + needs: ["dist", "dist-x86_64-alpine-linux-musl"] steps: - name: Checkout repository uses: actions/checkout@v3 @@ -154,10 +155,10 @@ jobs: with: name: dist-x86_64-unknown-linux-musl path: dist - # - uses: actions/download-artifact@v1 - # with: - # name: dist-x86_64-unknown-alpine-musl - # path: dist + - uses: actions/download-artifact@v1 + with: + name: dist-x86_64-alpine-linux-musl + path: dist - uses: actions/download-artifact@v1 with: name: dist-aarch64-unknown-linux-gnu diff --git a/Cargo.lock b/Cargo.lock index 7148385..9b829e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -688,7 +688,6 @@ dependencies = [ "tree-sitter-objc", "tree-sitter-python", "tree-sitter-r", - "tree-sitter-ruby", "tree-sitter-rust", "tree-sitter-scala", "tree-sitter-swift", @@ -1806,8 +1805,7 @@ dependencies = [ [[package]] name = "tree-sitter-elixir" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9916f3e1c80b3c8aab8582604e97e8720cb9b893489b347cf999f80f9d469e" +source = "git+https://github.com/elixir-lang/tree-sitter-elixir.git?rev=a2861e88a730287a60c11ea9299c033c7d076e30#a2861e88a730287a60c11ea9299c033c7d076e30" dependencies = [ "cc", "tree-sitter", @@ -1835,9 +1833,8 @@ dependencies = [ [[package]] name = "tree-sitter-html" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "184e6b77953a354303dc87bf5fe36558c83569ce92606e7b382a0dc1b7443443" +version = "0.20.0" +source = "git+https://github.com/tree-sitter/tree-sitter-html.git?rev=d742025fa2d8e6100f134a6ea990443aa1f074b3#d742025fa2d8e6100f134a6ea990443aa1f074b3" dependencies = [ "cc", "tree-sitter", @@ -1923,16 +1920,6 @@ dependencies = [ "tree-sitter", ] -[[package]] -name = "tree-sitter-ruby" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ac30cbb1560363ae76e1ccde543d6d99087421e228cc47afcec004b86bb711a" -dependencies = [ - "cc", - "tree-sitter", -] - [[package]] name = "tree-sitter-rust" version = "0.20.4" diff --git a/crates/llm-ls/Cargo.toml b/crates/llm-ls/Cargo.toml index f4683d4..45ec3e9 100644 --- a/crates/llm-ls/Cargo.toml +++ b/crates/llm-ls/Cargo.toml @@ -22,10 +22,10 @@ tree-sitter-bash = "0.20" tree-sitter-c = "0.20" tree-sitter-cpp = "0.20" tree-sitter-c-sharp = "0.20" -tree-sitter-elixir = "0.1" +tree-sitter-elixir = { git = "https://github.com/elixir-lang/tree-sitter-elixir.git", rev = "a2861e88a730287a60c11ea9299c033c7d076e30", version = "0.1.0" } tree-sitter-erlang = "0.2" tree-sitter-go = "0.20" -tree-sitter-html = "0.19" +tree-sitter-html = { git = "https://github.com/tree-sitter/tree-sitter-html.git", rev = "d742025fa2d8e6100f134a6ea990443aa1f074b3", version = "0.20.0" } tree-sitter-java = "0.20" tree-sitter-javascript = "0.20" tree-sitter-json = "0.20" @@ -34,7 +34,6 @@ tree-sitter-md = "0.1" tree-sitter-objc = "3" tree-sitter-python = "0.20" tree-sitter-r = "0.19" -tree-sitter-ruby = "0.20" tree-sitter-rust = "0.20" tree-sitter-scala = "0.20" tree-sitter-swift = "0.3" diff --git a/crates/llm-ls/src/document.rs b/crates/llm-ls/src/document.rs index 2ee1544..9c9d179 100644 --- a/crates/llm-ls/src/document.rs +++ b/crates/llm-ls/src/document.rs @@ -119,13 +119,7 @@ fn get_parser(language_id: LanguageId) -> Result { .map_err(internal_error)?; Ok(parser) } - LanguageId::Ruby => { - let mut parser = Parser::new(); - parser - .set_language(tree_sitter_ruby::language()) - .map_err(internal_error)?; - Ok(parser) - } + LanguageId::Ruby => Ok(Parser::new()), LanguageId::Rust => { let mut parser = Parser::new(); parser diff --git a/xtask/src/dist.rs b/xtask/src/dist.rs index c35fb5f..447eaba 100644 --- a/xtask/src/dist.rs +++ b/xtask/src/dist.rs @@ -136,7 +136,10 @@ impl Target { (String::new(), None) }; let server_path = out_path.join(format!("llm-ls{exe_suffix}")); - let artifact_name = format!("llm-ls-{name}{exe_suffix}"); + let artifact_name = match env::var("LLM_LS_ARTIFACT") { + Ok(artifact) => format!("llm-ls-{artifact}{exe_suffix}"), + _ => format!("llm-ls-{name}{exe_suffix}") + }; Self { name, server_path,