all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Basil Contovounesios <contovob@tcd.ie>
Cc: Dmitry Gutov <dmitry@gutov.dev>, 62741@debbugs.gnu.org
Subject: bug#62741: 30.0.50; Eglot jdtls project test: pass on emacs-29, fail on master
Date: Mon, 10 Apr 2023 09:17:29 +0100	[thread overview]
Message-ID: <87r0ssm9ra.fsf@gmail.com> (raw)
In-Reply-To: <875ya4k5t6.fsf@tcd.ie> (Basil Contovounesios's message of "Mon,  10 Apr 2023 00:13:25 +0100")

Basil Contovounesios <contovob@tcd.ie> writes:

> João Távora [2023-04-09 20:13 +0100] wrote:
>
>> Basil Contovounesios <contovob@tcd.ie> writes:
>>
>>> 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)
>>>
>>>
>>> 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.
>>
>> I think the change is fine, please install it, and thanks.
>
> Done:
>
> Avoid Git project in eglot-test-eclipse-connect
> 6674ac17eb4 2023-04-09 23:32:14 +0100
> https://git.sv.gnu.org/cgit/emacs.git/commit/?id=6674ac17eb4
>
>> Let's hope it doesn't break on Emacs 26.3, 27 and 28
>>
>> (f you could test, it would be great, if not it's OK.  It'd involve
>> making a GitHub fork and using the GitHub actions scripts)
>
> Seems to work there too:
> https://github.com/basil-conto/eglot/commit/e915db94a6
> https://github.com/basil-conto/eglot/actions/runs/4652799056

Thanks!

>> A safer, but slightly slower route:
>>
>>    (should (zerop (shell-command "git init")))
>>
>> Some tests known to need project-files already do this.
>
> This continues to fail in the same way, both in emacs.git and eglot.git:
> https://github.com/basil-conto/eglot/commit/1b2d13eaf6
> https://github.com/basil-conto/eglot/actions/runs/4652805286

This is very odd then.  Why would project-files fail in the face of
(presumably) a perfectly well-behaved Git repository?

Pasting the backtrace here for Dmitry to have a look.

Test eglot-test-eclipse-connect backtrace:
  string-match("\0" nil 0)
  split-string(nil "\0" t)
  project--vc-list-files("/tmp/eglot--fixturernYTOR/project/" Git nil)
  #f(compiled-function (dir) #<bytecode -0xa5be45661654310>)("/tmp/eglot--fixturernYTOR/project/")
  mapcan(#f(compiled-function (dir) #<bytecode -0xa5be45661654310>) ("/tmp/eglot--fixturernYTOR/project/"))
  #f(compiled-function (project &optional dirs) #<bytecode 0x114f4cd06dfc2088>)((vc Git "/tmp/eglot--fixturernYTOR/project/"))
  apply(#f(compiled-function (project &optional dirs) #<bytecode 0x114f4cd06dfc2088>) (vc Git "/tmp/eglot--fixturernYTOR/project/") nil)
  project-files((vc Git "/tmp/eglot--fixturernYTOR/project/"))

It would seem that the problem here is there are no files versioned yet,
so this expression in project--vc-list-files

   (apply #'vc-git--run-command-string nil "ls-files" args)

Returns nil.  

But I cannot reproduce this locally.

I'll leave it up to you, Basil, to decide whether to close or leave this
bug open.

João





  reply	other threads:[~2023-04-10  8:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0ssm9ra.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=62741@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --cc=dmitry@gutov.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.