unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62741: 30.0.50; Eglot jdtls project test: pass on emacs-29, fail on master
@ 2023-04-09 17:46 Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-04-09 19:13 ` João Távora
  0 siblings, 1 reply; 8+ messages in thread
From: Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-04-09 17:46 UTC (permalink / raw)
  To: 62741; +Cc: João Távora, Dmitry Gutov

[-- Attachment #1: Type: text/plain, Size: 153 bytes --]

With the following JDT LS binary release:
https://download.eclipse.org/jdtls/milestones/1.21.0/

The test eglot-test-eclipse-connect passes on emacs-29:

[-- Attachment #2: emacs-29-check.txt --]
[-- Type: text/plain, Size: 3769 bytes --]

-*- mode: compilation; default-directory: "~/.local/src/emacs-29/" -*-
Compilation started at Sun Apr  9 18:24:01

make TEST_LOAD_EL=no TEST_BACKTRACE_LINE_LENGTH=120 SELECTOR='"eclipse"' test/eglot-tests
make -C test eglot-tests
make[1]: Entering directory '/home/bic/.local/src/emacs-29/test'
make[2]: Entering directory '/home/bic/.local/src/emacs-29/test'
  GEN      lisp/progmodes/eglot-tests.log
Running 1 tests (2023-04-09 18:24:01+0100, selector `"eclipse"')
[eglot] project 649b9e33-b84f-4a6f-9674-9e7c0d7bbf3f: \ 
[eglot] project 649b9e33-b84f-4a6f-9674-9e7c0d7bbf3f: | Refreshing Maven model Refreshing Maven model
[eglot] project 649b9e33-b84f-4a6f-9674-9e7c0d7bbf3f: /  Updating Maven Dependencies
[eglot] project 649b9e33-b84f-4a6f-9674-9e7c0d7bbf3f: \ 
[eglot] project 649b9e33-b84f-4a6f-9674-9e7c0d7bbf3f: | project jdt.ls-java-project Updating Maven Dependencies
[eglot] project 649b9e33-b84f-4a6f-9674-9e7c0d7bbf3f: /  Updating Maven Dependencies
[eglot] project c2a93e31-26af-433e-a8c3-9f605affe120: \ 
[eglot] project c2a93e31-26af-433e-a8c3-9f605affe120: | Initialize Workspace Initialize Workspace
[eglot] Connected! Server `EGLOT (project/(java-mode java-ts-mode))' now managing `(java-mode java-ts-mode)' buffers in project `project'.
[eglot] Event detected:
(:jsonrpc "2.0" :method "language/status" :params
	  (:type "Starting" :message "0% Starting Java Language Server"))

[eglot] Test body was OK
[eglot] Asking EGLOT (project/(java-mode java-ts-mode)) politely to terminate
[eglot] project 0a7b40e9-2cdd-4cfd-8e09-e1dea42e4280: \ 
[eglot] project 0a7b40e9-2cdd-4cfd-8e09-e1dea42e4280: | Repository registry initialization Repository registry initialization
[eglot] project 0a7b40e9-2cdd-4cfd-8e09-e1dea42e4280: /  Repository registry initialization
[eglot] project c2a93e31-26af-433e-a8c3-9f605affe120: /  Initialize Workspace
[eglot] project c2a93e31-26af-433e-a8c3-9f605affe120: -  Initialize Workspace
[eglot] project 3cb15c07-f157-482a-ada4-5186a38038cc: \ 
[eglot] project 3cb15c07-f157-482a-ada4-5186a38038cc: | Synchronizing projects Synchronizing projects
[eglot] project d6974c61-c657-4934-b1b4-33542dccd530: \ 
[eglot] project d6974c61-c657-4934-b1b4-33542dccd530: | Synchronizing projects Synchronizing projects
[eglot] project c2a93e31-26af-433e-a8c3-9f605affe120: \ 
[eglot] project c2a93e31-26af-433e-a8c3-9f605affe120: | Initialize Workspace Initialize Workspace
[eglot] project c2a93e31-26af-433e-a8c3-9f605affe120: /  Initialize Workspace
[eglot] project 3cb15c07-f157-482a-ada4-5186a38038cc: /  Synchronizing projects
[eglot] project 3cb15c07-f157-482a-ada4-5186a38038cc: \ 
[eglot] project 3cb15c07-f157-482a-ada4-5186a38038cc: | Synchronizing projects Synchronizing projects
[eglot] project 3cb15c07-f157-482a-ada4-5186a38038cc: /  Synchronizing projects
[eglot] project d6974c61-c657-4934-b1b4-33542dccd530: /  Synchronizing projects
[eglot] project d6974c61-c657-4934-b1b4-33542dccd530: \ 
[eglot] project d6974c61-c657-4934-b1b4-33542dccd530: | Synchronizing projects Synchronizing projects
[eglot] project d6974c61-c657-4934-b1b4-33542dccd530: /  Synchronizing projects
[eglot] (warning) Server tried to register unsupported capability `workspace/didChangeWorkspaceFolders'
Warning (eglot): Server tried to register unsupported capability `workspace/didChangeWorkspaceFolders'
[jsonrpc] Server exited with status 9
[eglot] Killing (Main.java), wiping /tmp/eglot--fixtureIeG1kx, restoring nil
   passed  1/1  eglot-test-eclipse-connect (2.025192 sec)

Ran 1 tests, 1 results as expected, 0 unexpected (2023-04-09 18:24:03+0100, 2.025296 sec)

make[2]: Leaving directory '/home/bic/.local/src/emacs-29/test'
make[1]: Leaving directory '/home/bic/.local/src/emacs-29/test'

Compilation finished at Sun Apr  9 18:24:03

[-- Attachment #3: Type: text/plain, Size: 22 bytes --]


But fails on master:

[-- Attachment #4: emacs-check.txt --]
[-- Type: text/plain, Size: 5298 bytes --]

-*- mode: compilation; default-directory: "~/.local/src/emacs/" -*-
Compilation started at Sun Apr  9 18:23:12

make TEST_LOAD_EL=no TEST_BACKTRACE_LINE_LENGTH=120 SELECTOR='"eclipse"' test/eglot-tests
make -C test eglot-tests
make[1]: Entering directory '/home/bic/.local/src/emacs/test'
make[2]: Entering directory '/home/bic/.local/src/emacs/test'
  GEN      lisp/progmodes/eglot-tests.log
Loading project...
Loading eldoc...
Loading seq...
Loading flymake...
Loading xref...
Loading jsonrpc...
Loading external-completion...
Running 1 tests (2023-04-09 18:23:12+0100, selector `"eclipse"')
[eglot-tests] [eglot-test-eclipse-connect]: test start
[eglot] Connected! Server `EGLOT (project/(java-mode java-ts-mode))' now managing `(java-mode java-ts-mode)' buffers in project `project'.
[eglot-tests] waiting for `(string= method language/status)'
[eglot-tests] detected: language/status
[eglot-tests] [eglot-test-eclipse-connect]: OK
[eglot] Asking EGLOT (project/(java-mode java-ts-mode)) politely to terminate
[jsonrpc] Server exited with status 9
[eglot-tests] Killing (Main.java), wiping /tmp/eglot--fixture4dC9ZE, restoring nil
Test eglot-test-eclipse-connect backtrace:
  string-match("\0" nil 0)
  split-string(nil "\0" t)
  project--vc-list-files("/tmp/eglot--fixture4dC9ZE/project/" Git nil)
  #f(compiled-function (dir) #<bytecode -0x2db03190cab6406>)("/tmp/eglot--fixture4dC9ZE/project/")
  mapcan(#f(compiled-function (dir) #<bytecode -0x2db03190cab6406>) ("/tmp/eglot--fixture4dC9ZE/project/"))
  #f(compiled-function (project &optional dirs) #<bytecode 0x16fba1d2f813cab9>)((vc Git "/tmp/eglot--fixture4dC9ZE/proje
  apply(#f(compiled-function (project &optional dirs) #<bytecode 0x16fba1d2f813cab9>) (vc Git "/tmp/eglot--fixture4dC9ZE
  project-files((vc Git "/tmp/eglot--fixture4dC9ZE/project/"))
  #f(compiled-function (arg1 arg2 arg3 &rest rest) "Handle dynamic registration of workspace/didChangeWatchedFiles." #<b
  apply(#f(compiled-function (arg1 arg2 arg3 &rest rest) "Handle dynamic registration of workspace/didChangeWatchedFiles
  eglot-register-capability(#<eglot-lsp-server eglot-lsp-server-157d10109c86> workspace/didChangeWatchedFiles "50f10b8a-
  apply(eglot-register-capability #<eglot-lsp-server eglot-lsp-server-157d10109c86> workspace/didChangeWatchedFiles "50f
  eglot--register-unregister(#<eglot-lsp-server eglot-lsp-server-157d10109c86> [(:id "50f10b8a-3194-4cc6-bbf1-57160d2a51
  #f(compiled-function (arg1 arg2 &rest rest) "Handle server request client/registerCapability." #<bytecode 0xcd39a94e63
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Handle server request client/registerCapability." #<bytecode 0xcd39
  eglot-handle-request(#<eglot-lsp-server eglot-lsp-server-157d10109c86> client/registerCapability :registrations [(:id 
  apply(eglot-handle-request #<eglot-lsp-server eglot-lsp-server-157d10109c86> client/registerCapability (:registrations
  #f(compiled-function (server method params) #<bytecode -0xa39412486497b61>)(#<eglot-lsp-server eglot-lsp-server-157d10
  jsonrpc-connection-receive(#<eglot-lsp-server eglot-lsp-server-157d10109c86> (:jsonrpc "2.0" :id "1" :method "client/r
  jsonrpc--process-filter(#<process EGLOT (project/(java-mode java-ts-mode))> "Content-Length: 120\15\n\15\n{\"jsonrpc\"
  accept-process-output(nil 30)
  jsonrpc-request(#<eglot-lsp-server eglot-lsp-server-157d10109c86> :shutdown nil :timeout 3 :cancel-on-input nil :cance
  eglot--request(#<eglot-lsp-server eglot-lsp-server-157d10109c86> :shutdown nil :timeout 3)
  eglot-shutdown(#<eglot-lsp-server eglot-lsp-server-157d10109c86> nil 3 nil)
  #f(compiled-function () #<bytecode 0x1f0e58730483c7dc>)()
  eglot--call-with-fixture((("project/src/main/java/foo" ("Main.java" . "")) ("project/.git/")) #f(compiled-function () 
  #f(compiled-function () #<bytecode -0x1ca1b560e59ba4f0>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test :name eglot-test-eclipse-connect :documentation "
  ert-run-test(#s(ert-test :name eglot-test-eclipse-connect :documentation "Connect to eclipse.jdt.ls server..." :body #
  ert-run-or-rerun-test(#s(ert--stats :selector "eclipse" :tests ... :test-map #<hash-table eql 1/1 0x157d100e68ab> :tes
  ert-run-tests("eclipse" #f(compiled-function (event-type &rest event-args) #<bytecode -0x13d91a0b22d7ab7f>) nil)
  ert-run-tests-batch("eclipse")
  ert-run-tests-batch-and-exit("eclipse")
  eval((ert-run-tests-batch-and-exit '"eclipse") t)
  command-line-1(("-L" ":." "-l" "ert" "--eval" "(setq ert-batch-backtrace-right-margin 120)" "-l" "lisp/progmodes/eglot
  command-line()
  normal-top-level()
Test eglot-test-eclipse-connect condition:
    (wrong-type-argument stringp nil)
   FAILED  1/1  eglot-test-eclipse-connect (1.765819 sec) at lisp/progmodes/eglot-tests.el:324

Ran 1 tests, 0 results as expected, 1 unexpected (2023-04-09 18:23:14+0100, 1.827689 sec)

1 unexpected results:
   FAILED  eglot-test-eclipse-connect

make[2]: *** [Makefile:181: lisp/progmodes/eglot-tests.log] Error 1
make[2]: Leaving directory '/home/bic/.local/src/emacs/test'
make[1]: *** [Makefile:247: lisp/progmodes/eglot-tests] Error 2
make[1]: Leaving directory '/home/bic/.local/src/emacs/test'
make: *** [Makefile:1100: test/eglot-tests] Error 2

Compilation exited abnormally with code 2 at Sun Apr  9 18:23:14

[-- Attachment #5: Type: text/plain, Size: 53 bytes --]


The following change lets it pass on both branches:

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: eglot.diff --]
[-- Type: text/x-diff, Size: 675 bytes --]

diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el
index 62e04539ebf..041aafabe8e 100644
--- a/test/lisp/progmodes/eglot-tests.el
+++ b/test/lisp/progmodes/eglot-tests.el
@@ -325,8 +325,7 @@ eglot-test-eclipse-connect
   "Connect to eclipse.jdt.ls server."
   (skip-unless (executable-find "jdtls"))
   (eglot--with-fixture
-      '(("project/src/main/java/foo" . (("Main.java" . "")))
-        ("project/.git/" . nil))
+      '(("project/src/main/java/foo" . (("Main.java" . ""))))
     (with-current-buffer
         (eglot--find-file-noselect "project/src/main/java/foo/Main.java")
       (eglot--sniffing (:server-notifications s-notifs)

[-- Attachment #7: Type: text/plain, Size: 6791 bytes --]


Which I assume means that project-current picks up .git as a project
root marker, but project-files unexpectedly finds no registered files.

I'm not sure whether this is expected on either the project or eglot
side.  If I squint hard enough it kind of reminds me of bug#62735.

WDYT?

Thanks,

-- 
Basil

In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0, Xaw3d scroll bars) of 2023-04-09 built on blc
Repository revision: 57490fff6ecf3cc1de7d8d833d1b6c895330b762
Repository branch: wt/emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Ubuntu 22.04.2 LTS

Configured using:
 'configure CC=gcc-12 'CFLAGS=-Og -ggdb3' --prefix=/home/bic/.local
 --with-program-suffix=-29 --with-file-notification=yes --with-x
 --with-x-toolkit=lucid'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM XINPUT2 XPM
LUCID ZLIB

Important settings:
  value of $LC_MONETARY: en_IE.UTF-8
  value of $LC_NUMERIC: en_IE.UTF-8
  value of $LC_TIME: en_IE.UTF-8
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
xinput2 x multi-tty make-network-process emacs)

Memory information:
((conses 16 36570 7455)
 (symbols 48 5149 0)
 (strings 32 13868 1570)
 (string-bytes 1 379298)
 (vectors 16 9299)
 (vector-slots 8 148612 10553)
 (floats 8 23 25)
 (intervals 56 248 0)
 (buffers 984 10))

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0, Xaw3d scroll bars) of 2023-04-09 built on blc
Repository revision: c9e13048bb9b1b5fb156fb128b32030ae2f1003b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Ubuntu 22.04.2 LTS

Configured using:
 'configure CC=gcc-12 'CFLAGS=-Og -ggdb3' --prefix=/home/bic/.local
 --with-file-notification=yes --with-x --with-x-toolkit=lucid'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM XINPUT2 XPM
LUCID ZLIB

Important settings:
  value of $LC_MONETARY: en_IE.UTF-8
  value of $LC_NUMERIC: en_IE.UTF-8
  value of $LC_TIME: en_IE.UTF-8
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
xinput2 x multi-tty make-network-process emacs)

Memory information:
((conses 16 36595 9309)
 (symbols 48 5171 0)
 (strings 32 13872 1628)
 (string-bytes 1 377598)
 (vectors 16 9294)
 (vector-slots 8 148577 11099)
 (floats 8 23 25)
 (intervals 56 244 0)
 (buffers 984 10))

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-04-10 12:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-09 17:46 bug#62741: 30.0.50; Eglot jdtls project test: pass on emacs-29, fail on master Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-09 19:13 ` João Távora
2023-04-09 23:13   ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-10  8:17     ` João Távora
2023-04-10  9:11       ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-10  9:51         ` João Távora
2023-04-10 11:56       ` Dmitry Gutov
2023-04-10 12:00         ` João Távora

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).