From af0ce62d3b8a1507aa8a56708d668f8c162da7dd Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 21 Feb 2022 17:28:55 +0100 Subject: [PATCH] Remove rust-analyzer smoke test Co-Authored-By: Nathan Sobo --- .github/workflows/ci.yml | 10 +------ crates/lsp/src/lsp.rs | 60 ---------------------------------------- 2 files changed, 1 insertion(+), 69 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01665afc39..35d20cc525 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,11 +34,6 @@ jobs: with: clean: false - - name: Download rust-analyzer - run: | - script/download-rust-analyzer - echo "$PWD/vendor/bin" >> $GITHUB_PATH - - name: Run tests run: cargo test --workspace --no-fail-fast @@ -69,14 +64,11 @@ jobs: uses: actions/checkout@v2 with: clean: false - + - name: Validate version if: ${{ startsWith(github.ref, 'refs/tags/v') }} run: script/validate-version - - name: Download rust-analyzer - run: script/download-rust-analyzer - - name: Create app bundle run: script/bundle diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index 0281e8cd8b..b05befedf8 100644 --- a/crates/lsp/src/lsp.rs +++ b/crates/lsp/src/lsp.rs @@ -700,8 +700,6 @@ impl FakeLanguageServer { mod tests { use super::*; use gpui::TestAppContext; - use unindent::Unindent; - use util::test::temp_tree; #[ctor::ctor] fn init_logger() { @@ -710,64 +708,6 @@ mod tests { } } - #[gpui::test] - async fn test_rust_analyzer(cx: TestAppContext) { - let lib_source = r#" - fn fun() { - let hello = "world"; - } - "# - .unindent(); - let root_dir = temp_tree(json!({ - "Cargo.toml": r#" - [package] - name = "temp" - version = "0.1.0" - edition = "2018" - "#.unindent(), - "src": { - "lib.rs": &lib_source - } - })); - let lib_file_uri = Url::from_file_path(root_dir.path().join("src/lib.rs")).unwrap(); - - let server = - LanguageServer::new(Path::new("rust-analyzer"), root_dir.path(), cx.background()) - .unwrap(); - server.next_idle_notification().await; - - server - .notify::(DidOpenTextDocumentParams { - text_document: TextDocumentItem::new( - lib_file_uri.clone(), - "rust".to_string(), - 0, - lib_source, - ), - }) - .await - .unwrap(); - - let hover = server - .request::(HoverParams { - text_document_position_params: TextDocumentPositionParams { - text_document: TextDocumentIdentifier::new(lib_file_uri), - position: Position::new(1, 21), - }, - work_done_progress_params: Default::default(), - }) - .await - .unwrap() - .unwrap(); - assert_eq!( - hover.contents, - HoverContents::Markup(MarkupContent { - kind: MarkupKind::PlainText, - value: "&str".to_string() - }) - ); - } - #[gpui::test] async fn test_fake(cx: TestAppContext) { let (server, mut fake) = LanguageServer::fake(cx.background());