From 820747042b97ff6b3312742771d790db7f4dec8f Mon Sep 17 00:00:00 2001 From: jonathanrainer Date: Thu, 19 Dec 2024 14:03:10 +0000 Subject: [PATCH] ROVER-245 Upgrade to language-server 0.3.3 --- Cargo.lock | 27 ++++++++++++++++++--------- Cargo.toml | 2 +- src/command/lsp/mod.rs | 10 +++++++++- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e8fbf91ea..c13fff208 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -154,9 +154,9 @@ checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" [[package]] name = "apollo-compiler" -version = "1.0.0-beta.23" +version = "1.0.0-beta.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875f39060728ac3e775fc3fe5421225d6df92c4d5155a9524cdb198f05006d36" +checksum = "71153ad85c85f7aa63f0e0a5868912c220bb48e4c764556f5841d37fc17b0103" dependencies = [ "ahash 0.8.11", "apollo-parser 0.8.2", @@ -173,9 +173,9 @@ dependencies = [ [[package]] name = "apollo-composition" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6864cf58167a074ac909b387cebdbc0a6957d7eb95b6e4cdaf7df8c9cd46108a" +checksum = "01d82be69fce8ac07544017fe8cd52befc61d4548d3233bd1757984d56c53804" dependencies = [ "apollo-compiler", "apollo-federation", @@ -195,9 +195,9 @@ dependencies = [ [[package]] name = "apollo-federation" -version = "2.0.0-alpha.7" +version = "2.0.0-preview.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b327840a1c216f7a1e6ac1a4fee347a9dee4fe7e3db94f5f9756337f5754969c" +checksum = "3c87a5a622646520e2e7df15ed33de1558e9d6eaaa7834eeafd02a8378cd73d2" dependencies = [ "apollo-compiler", "derive_more", @@ -206,10 +206,13 @@ dependencies = [ "indexmap 2.5.0", "itertools 0.13.0", "lazy_static", + "line-col", "multimap", "nom", "nom_locate", + "once_cell", "petgraph", + "regex", "serde", "serde_json", "serde_json_bytes", @@ -240,9 +243,9 @@ dependencies = [ [[package]] name = "apollo-language-server" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e82651825f3f99089803394c0f68b573fe6195993892099bf2fa6387ba4438a" +checksum = "e30875b30bc668b8d10a57436ad26888183245a367403ad708d5f3fd52d7b351" dependencies = [ "apollo-compiler", "apollo-composition", @@ -2761,7 +2764,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -3483,6 +3486,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "line-col" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e69cdf6b85b5c8dce514f694089a2cf8b1a702f6cd28607bcb3cf296c9778db" + [[package]] name = "linked-hash-map" version = "0.5.6" diff --git a/Cargo.toml b/Cargo.toml index 88441239a..6c835e99c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,7 +73,7 @@ apollo-encoder = "0.8" # https://github.com/apollographql/federation-rs apollo-federation-types = "0.14.1" -apollo-language-server = { version = "0.3.0", default-features = false, features = ["tokio"] } +apollo-language-server = { version = "0.3.3", default-features = false, features = ["tokio"] } # crates.io dependencies diff --git a/src/command/lsp/mod.rs b/src/command/lsp/mod.rs index a7ebb89ee..d411f5064 100644 --- a/src/command/lsp/mod.rs +++ b/src/command/lsp/mod.rs @@ -6,7 +6,7 @@ use std::io::stdin; use anyhow::Error; use apollo_federation_types::config::FederationVersion::LatestFedTwo; -use apollo_language_server::{ApolloLanguageServer, Config}; +use apollo_language_server::{ApolloLanguageServer, Config, MaxSpecVersions}; use camino::Utf8PathBuf; use clap::Parser; use futures::StreamExt; @@ -95,6 +95,10 @@ async fn run_lsp(client_config: StudioClientConfig, lsp_opts: LspOpts) -> RoverR enable_auto_composition: false, force_federation: false, disable_telemetry: false, + max_spec_versions: MaxSpecVersions { + connect: None, + federation: None, + }, }, HashMap::new(), ); @@ -118,6 +122,10 @@ async fn run_lsp(client_config: StudioClientConfig, lsp_opts: LspOpts) -> RoverR enable_auto_composition: false, force_federation: false, disable_telemetry: false, + max_spec_versions: MaxSpecVersions { + connect: None, + federation: None, + }, }, HashMap::from_iter( lazily_resolved_supergraph_config