[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot b90d2f3925: Unbreak CI tests, use new jtdls for E
From: |
ELPA Syncer |
Subject: |
[elpa] externals/eglot b90d2f3925: Unbreak CI tests, use new jtdls for Eclipse JDT (per #863, #864, #868) |
Date: |
Fri, 11 Mar 2022 08:57:38 -0500 (EST) |
branch: externals/eglot
commit b90d2f39259c9f6e7ec4cd964f3608a52a0f335b
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Unbreak CI tests, use new jtdls for Eclipse JDT (per #863, #864, #868)
* .github/workflows/test.yml (Install Python): tweak Python version
(Install Eclipse JDT): Tweak $GITHUB_PATH
* eglot-tests.el (eclipse-workspace-folders): Remove.
(eglot--have-eclipse-jdt-ls-p): Remove.
(eclipse-connect): Simplify.
---
.github/workflows/test.yml | 4 ++--
eglot-tests.el | 36 +-----------------------------------
2 files changed, 3 insertions(+), 37 deletions(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index e7344bd7c8..43f3c73b44 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -23,7 +23,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v2
with:
- python-version: "3.6"
+ python-version: "3.9"
architecture: "x64"
- name: Install Rust
@@ -38,6 +38,7 @@ jobs:
curl -fSL
https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz
-o eclipse.tar.gz
mkdir eclipse.jdt.ls
tar -C eclipse.jdt.ls -xzf eclipse.tar.gz
+ echo "$GITHUB_WORKSPACE/eclipse.jdt.ls/bin" >> $GITHUB_PATH
- name: Install other depedencies
run: |
@@ -49,5 +50,4 @@ jobs:
- name: Test eglot
run: |
- export CLASSPATH=$(pwd)/$(find eclipse.jdt.ls/ -regex
eclipse.jdt.ls/plugins/org.eclipse.equinox.launcher_.*.jar):${CLASSPATH}
make eglot-check
diff --git a/eglot-tests.el b/eglot-tests.el
index 255072f7d7..55967a4977 100644
--- a/eglot-tests.el
+++ b/eglot-tests.el
@@ -37,13 +37,6 @@
;;; Helpers
-(defun eglot--have-eclipse-jdt-ls-p ()
- (and (getenv "CLASSPATH")
- (cl-some
- (lambda (x)
- (string-match-p "org\\.eclipse\\.equinox\\.launcher_.*\\.jar$" x))
- (split-string (getenv "CLASSPATH") ":"))))
-
(defmacro eglot--with-fixture (fixture &rest body)
"Setup FIXTURE, call BODY, teardown FIXTURE.
FIXTURE is a list. Its elements are of the form (FILE . CONTENT)
@@ -274,7 +267,7 @@ Pass TIMEOUT to `eglot--with-timeout'."
(ert-deftest eclipse-connect ()
"Connect to eclipse.jdt.ls server."
- (skip-unless (eglot--have-eclipse-jdt-ls-p))
+ (skip-unless (executable-find "jdtls"))
(eglot--with-fixture
'(("project/src/main/java/foo" . (("Main.java" . "")))
("project/.git/" . nil))
@@ -286,33 +279,6 @@ Pass TIMEOUT to `eglot--with-timeout'."
(&key _id method &allow-other-keys)
(string= method "language/status"))))))
-(ert-deftest eclipse-workspace-folders ()
- "Check eclipse connection with multi-root projects."
- (skip-unless (eglot--have-eclipse-jdt-ls-p))
- (eglot--with-fixture
- '(("project/main/src/main/java/foo" . (("Main.java" . "")))
- ("project/sub1/" . (("pom.xml" . "")))
- ("project/sub2/" . (("build.gradle" . "")))
- ("project/sub3/" . (("a.txt" . "")))
- ("project/.git/" . nil))
- (let ((root (file-name-as-directory default-directory)))
- (with-current-buffer
- (eglot--find-file-noselect
"project/main/src/main/java/foo/Main.java")
- (eglot--sniffing (:client-requests c-reqs)
- (should (eglot--tests-connect 10))
- (eglot--wait-for (c-reqs 10)
- (&key _id method params &allow-other-keys)
- (when (string= method "initialize")
- (let ((folders (plist-get
- (plist-get params :initializationOptions)
- :workspaceFolders))
- (default-directory root))
- (and
- (cl-find (eglot--path-to-uri "project/") folders :test
#'equal)
- (cl-find (eglot--path-to-uri "project/sub1/") folders :test
#'equal)
- (cl-find (eglot--path-to-uri "project/sub2/") folders :test
#'equal)
- (= 3 (length folders)))))))))))
-
(defun eglot-tests--auto-detect-running-server-1 ()
(let (server)
(eglot--with-fixture
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/eglot b90d2f3925: Unbreak CI tests, use new jtdls for Eclipse JDT (per #863, #864, #868),
ELPA Syncer <=