From e394c658407ee337cf1ba0fbaa1a7c4b56468ed7 Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 26 May 2026 16:11:40 +0300 Subject: [PATCH 1/6] ci: fix publishing It tried to search for lsp folder like it was in SimplicityHL repo --- .github/workflows/publish-lsp.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/publish-lsp.yml b/.github/workflows/publish-lsp.yml index 5b4bf8d..4814924 100644 --- a/.github/workflows/publish-lsp.yml +++ b/.github/workflows/publish-lsp.yml @@ -22,11 +22,9 @@ jobs: components: clippy, rustfmt - name: Rustfmt check - working-directory: lsp run: cargo fmt --all -- --check - name: Clippy - working-directory: lsp run: cargo clippy --all-targets --all-features tests: @@ -40,7 +38,6 @@ jobs: uses: dtolnay/rust-toolchain@stable - name: Run tests - working-directory: lsp run: cargo test --all-features -- --nocapture publish: @@ -79,7 +76,6 @@ jobs: fi - name: Check package - working-directory: lsp run: cargo package - name: Authenticate with crates.io @@ -89,7 +85,6 @@ jobs: - name: Publish env: CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} - working-directory: lsp run: cargo publish From e996edf7aa6492c27094486317e85a19d8e794a9 Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 26 May 2026 16:13:49 +0300 Subject: [PATCH 2/6] ci: rename publish-lsp to publish It's already obvious what we are publishing in this repo --- .github/workflows/{publish-lsp.yml => publish.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{publish-lsp.yml => publish.yml} (100%) diff --git a/.github/workflows/publish-lsp.yml b/.github/workflows/publish.yml similarity index 100% rename from .github/workflows/publish-lsp.yml rename to .github/workflows/publish.yml From 025e12c620d56c11a77139b090eb81903050f103 Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 26 May 2026 16:43:21 +0300 Subject: [PATCH 3/6] cargo: whitelist duplicating dependencies --- Cargo.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 5957dc8..300494e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,3 +38,13 @@ pedantic = "warn" [workspace.metadata.rbmt.toolchains] nightly = "nightly-2025-08-23" stable = "1.95.0" + +[package.metadata.rbmt.lint] +allowed_duplicates = [ + # version mismatch (1.* and 2.*) within the dependencies of tower-lsp-server + "bitflags", + # version mismatch (0.14.* and 0.15.*) between tower-lsp-server and chumsky + "hashbrown", + # versions match, but are split across different dependency trees + "memchr", +] From dc274dfd688c20b9637fc93423fcb13e87770f1b Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 26 May 2026 16:43:43 +0300 Subject: [PATCH 4/6] cargo: bump MSRV to 1.85.0 This is necessary because tower-lsp-server requires the 2024 edition of Rust. Also, some of the packages were downgraded to match the versions on SimplicityHL and to avoid bumping the MSRV to 1.88.0 because of ar-archive-writer. --- Cargo.lock | 77 ++++++++++++------------------------------------------ Cargo.toml | 4 +-- 2 files changed, 19 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8c833c6..0ec3657 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aho-corasick" @@ -19,9 +19,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "anstream" -version = "1.0.0" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -40,9 +40,9 @@ checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" -version = "1.0.0" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] @@ -69,9 +69,9 @@ dependencies = [ [[package]] name = "ar_archive_writer" -version = "0.5.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b" +checksum = "f0c269894b6fe5e9d7ada0cf69b5bf847ff35bc25fc271f08e1d080fce80339a" dependencies = [ "object", ] @@ -220,18 +220,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.1" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.6.0" +version = "4.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" dependencies = [ "anstream", "anstyle", @@ -241,9 +241,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "1.1.0" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" [[package]] name = "colorchoice" @@ -295,7 +295,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" dependencies = [ "log", - "regex", ] [[package]] @@ -304,10 +303,7 @@ version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" dependencies = [ - "anstream", - "anstyle", "env_filter", - "jiff", "log", ] @@ -502,30 +498,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" -[[package]] -name = "jiff" -version = "0.2.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30457d51cb0e68ee18184b30cd9eb8e1602a20837c321f6ea9706b94f1c681c3" -dependencies = [ - "jiff-static", - "log", - "portable-atomic", - "portable-atomic-util", - "serde_core", -] - -[[package]] -name = "jiff-static" -version = "0.2.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f86e4f0326c61ae6c00b04d9009aaeda644d0b5bdfbf6c67247f492f42b3f3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "js-sys" version = "0.3.99" @@ -616,9 +588,9 @@ dependencies = [ [[package]] name = "object" -version = "0.37.3" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -670,21 +642,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" -[[package]] -name = "portable-atomic" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" - -[[package]] -name = "portable-atomic-util" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" -dependencies = [ - "portable-atomic", -] - [[package]] name = "ppv-lite86" version = "0.2.21" @@ -705,9 +662,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.31" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645dbe486e346d9b5de3ef16ede18c26e6c70ad97418f4874b8b1889d6e761ea" +checksum = "d11f2fedc3b7dafdc2851bc52f277377c5473d378859be234bc7ebb593144d01" dependencies = [ "ar_archive_writer", "cc", diff --git a/Cargo.toml b/Cargo.toml index 300494e..af76d3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "simplicityhl-lsp" version = "0.3.0" edition = "2021" -rust-version = "1.79.0" +rust-version = "1.85.0" description = "Language Server Protocol (LSP) server for SimplicityHL." license = "MIT OR Apache-2.0" repository = "https://github.com/BlockstreamResearch/SimplicityHL" @@ -16,7 +16,7 @@ tokio = { version = "1.47.1", features = ["full"] } serde_json = "1.0.143" tower-lsp-server = "0.22.1" -env_logger = "0.11.8" +env_logger = { version = "0.11.8", default-features = false } thiserror = "2.0.17" ropey = "1.6.1" From e277bf46a914966a700005809c8b290845291b80 Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 26 May 2026 17:25:32 +0300 Subject: [PATCH 5/6] replace lazy_static with std::sync::LazyLock --- src/completion/type_cast.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/completion/type_cast.rs b/src/completion/type_cast.rs index 77bca79..a72854c 100644 --- a/src/completion/type_cast.rs +++ b/src/completion/type_cast.rs @@ -1,9 +1,8 @@ -use lazy_static::lazy_static; use std::collections::HashMap; // Most basic type casts for integer types. -lazy_static! { - pub(crate) static ref TYPE_CASTS: HashMap<&'static str, &'static str> = { +pub(crate) static TYPE_CASTS: std::sync::LazyLock> = + std::sync::LazyLock::new(|| { HashMap::from([ ("u1", "bool"), ("u2", "(u1, u1)"), @@ -24,5 +23,4 @@ lazy_static! { ("(u64, u64)", "u128"), ("(u128, u128)", "u256"), ]) - }; -} + }); From f583dbadced22fd9c5fdf2043695a9e40a3ca2ba Mon Sep 17 00:00:00 2001 From: Volodymyr Herashchenko Date: Tue, 26 May 2026 17:25:43 +0300 Subject: [PATCH 6/6] remove lazy_static dependency --- Cargo.lock | 7 ------- Cargo.toml | 1 - 2 files changed, 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ec3657..c3cec35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -510,12 +510,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - [[package]] name = "libc" version = "0.2.186" @@ -958,7 +952,6 @@ name = "simplicityhl-lsp" version = "0.3.0" dependencies = [ "env_logger", - "lazy_static", "miniscript", "nom", "ropey", diff --git a/Cargo.toml b/Cargo.toml index af76d3d..f71166b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ ropey = "1.6.1" miniscript = "12.3.1" simplicityhl = "0.5.0" nom = "8.0.0" -lazy_static = "1.5.0" [lints.rust] unsafe_code = "deny"