* emacs 29.1: Errors with java-ts-mode on Windows
@ 2023-10-31 11:31 Pascal Quesseveur
2023-10-31 12:23 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Pascal Quesseveur @ 2023-10-31 11:31 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I have installed Emacs 29.1 on Windows from:
- emacs-29.1_2-no-deps,
- emacs-29-2023-08-10-deps,
- compiled libraries for treesitter from
https://github.com/emacs-tree-sitter/tree-sitter-langs/releases. I
use the latest available version: 0.12.73.
I use major-mode-remap-alist to declare the treesitter modes I want to
use:
(setq major-mode-remap-alist
'((c-mode . c-ts-mode)
(cpp-mode . cpp-ts-mode)
(java-mode . java-ts-mode)))
It's working fine for c and c++ modes, but I get the following error
when loading a java source file:
Error during redisplay: (jit-lock-function 1) signaled
(treesit-query-error "Node type error at" 382 "(annotation_type_declaration
name: (identifier) @font-lock-type-face) (interface_declaration
name: (identifier) @font-lock-type-face) (class_declaration
name: (identifier) @font-lock-type-face) (record_declaration
name: (identifier) @font-lock-type-face) (enum_declaration
name: (identifier)
@font-lock-type-face) (constructor_declaration
name: (identifier)
@font-lock-type-face) (compact_constructor_declaration
name: (identifier) @font-lock-type-face) (field_access
object: (identifier)
@font-lock-type-face) (method_reference (identifier)
@font-lock-type-face) (scoped_identifier (identifier)
@font-lock-constant-face) ((scoped_identifier name: (identifier)
@font-lock-type-face) (#match \"\\\\`[A-Z]\"
@font-lock-type-face)) (type_identifier) @font-lock-type-face
[(boolean_type) (integral_type) (floating_point_type) (void_type)]
@font-lock-type-face" "Debug the query with `treesit-query-validate'")
I tried with emacs -Q and declaring only java-ts-mode in
major-mode-remap-alist, and I get the same error.
Did I miss something?
--
Pascal Quesseveur
pquessev@gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-10-31 11:31 emacs 29.1: Errors with java-ts-mode on Windows Pascal Quesseveur
@ 2023-10-31 12:23 ` Eli Zaretskii
2023-10-31 14:22 ` Pascal Quesseveur
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Eli Zaretskii @ 2023-10-31 12:23 UTC (permalink / raw)
To: help-gnu-emacs
> From: Pascal Quesseveur <pquessev@gmail.com>
> Date: Tue, 31 Oct 2023 12:31:36 +0100
>
> I have installed Emacs 29.1 on Windows from:
>
> - emacs-29.1_2-no-deps,
> - emacs-29-2023-08-10-deps,
>
> - compiled libraries for treesitter from
> https://github.com/emacs-tree-sitter/tree-sitter-langs/releases. I
> use the latest available version: 0.12.73.
>
> I use major-mode-remap-alist to declare the treesitter modes I want to
> use:
>
> (setq major-mode-remap-alist
> '((c-mode . c-ts-mode)
> (cpp-mode . cpp-ts-mode)
> (java-mode . java-ts-mode)))
>
> It's working fine for c and c++ modes, but I get the following error
> when loading a java source file:
And if you don't use major-mode-remap-alist, but instead load
jave-ts-mode manually and visit the same source file, this problem
doesn't happen?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-10-31 12:23 ` Eli Zaretskii
@ 2023-10-31 14:22 ` Pascal Quesseveur
2023-10-31 14:52 ` Eli Zaretskii
2023-11-06 10:13 ` Pascal Quesseveur
2023-11-13 9:24 ` Pascal Quesseveur
2 siblings, 1 reply; 13+ messages in thread
From: Pascal Quesseveur @ 2023-10-31 14:22 UTC (permalink / raw)
To: help-gnu-emacs
>"EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> And if you don't use major-mode-remap-alist, but instead load
EZ> jave-ts-mode manually and visit the same source file, this problem
EZ> doesn't happen?
I have set java-ts-mode for java files in auto-mode-alist, opened a
java source file and I get the same error.
--
Pascal Quesseveur
pquessev@gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-10-31 14:22 ` Pascal Quesseveur
@ 2023-10-31 14:52 ` Eli Zaretskii
2023-10-31 16:28 ` Pascal Quesseveur
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2023-10-31 14:52 UTC (permalink / raw)
To: help-gnu-emacs
> From: Pascal Quesseveur <pquessev@gmail.com>
> Date: Tue, 31 Oct 2023 15:22:43 +0100
>
> >"EZ" == Eli Zaretskii <eliz@gnu.org> writes:
>
> EZ> And if you don't use major-mode-remap-alist, but instead load
> EZ> jave-ts-mode manually and visit the same source file, this problem
> EZ> doesn't happen?
>
> I have set java-ts-mode for java files in auto-mode-alist, opened a
> java source file and I get the same error.
Then I cannot reproduce this, not with some random Java source file I
tried. Maybe this happens only for some Java source files? Can you
post the file you used when you saw this problem?
There could also be another problem: I use the latest grammar library
from their Git (https://github.com/tree-sitter/tree-sitter-java), not
from https://github.com/emacs-tree-sitter/tree-sitter-langs/releases
repository. If you can compile the grammar library yourself, perhaps
try the latest one?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-10-31 14:52 ` Eli Zaretskii
@ 2023-10-31 16:28 ` Pascal Quesseveur
0 siblings, 0 replies; 13+ messages in thread
From: Pascal Quesseveur @ 2023-10-31 16:28 UTC (permalink / raw)
To: help-gnu-emacs
>"EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> Then I cannot reproduce this, not with some random Java source file I
EZ> tried. Maybe this happens only for some Java source files? Can you
EZ> post the file you used when you saw this problem?
It happens for all the java source files I have checked. They are very
simple Java source files, so I don't think it comes from that.
EZ> repository. If you can compile the grammar library yourself, perhaps
EZ> try the latest one?
Unfortunately I did not have the tools in place to compile. I'll have
to wait for a new release of the compiled grammars.
--
Pascal Quesseveur
pquessev@gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-10-31 12:23 ` Eli Zaretskii
2023-10-31 14:22 ` Pascal Quesseveur
@ 2023-11-06 10:13 ` Pascal Quesseveur
2023-11-13 9:24 ` Pascal Quesseveur
2 siblings, 0 replies; 13+ messages in thread
From: Pascal Quesseveur @ 2023-11-06 10:13 UTC (permalink / raw)
To: help-gnu-emacs
I just tried with tree-sitter-grammars-windows-0.12.77 compiled from
yesterday and I get the same error with java source files.
--
Pascal Quesseveur
pquessev@gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-10-31 12:23 ` Eli Zaretskii
2023-10-31 14:22 ` Pascal Quesseveur
2023-11-06 10:13 ` Pascal Quesseveur
@ 2023-11-13 9:24 ` Pascal Quesseveur
2023-11-13 14:24 ` Eli Zaretskii
2 siblings, 1 reply; 13+ messages in thread
From: Pascal Quesseveur @ 2023-11-13 9:24 UTC (permalink / raw)
To: help-gnu-emacs
I reported the problem on emacs-tree-sitter and the answer is: as I
use treesit.el from builtin, the problem concerns the Emacs devel.
This answer seems to indicate that there would be an icompatibility
between the libraries available on emacs-tree-sitter and the version
of tree-sitter in emacs 29.1. Except c-ts-mode and cpp-ts-mode work
correctly and you said the tree-sitter-java library compiled form
sources is ok.
Did I miss something?
--
Pascal Quesseveur
pquessev@gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-11-13 9:24 ` Pascal Quesseveur
@ 2023-11-13 14:24 ` Eli Zaretskii
2023-11-13 14:47 ` Pascal Quesseveur
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2023-11-13 14:24 UTC (permalink / raw)
To: help-gnu-emacs
> From: Pascal Quesseveur <pquessev@gmail.com>
> Date: Mon, 13 Nov 2023 10:24:26 +0100
>
> I reported the problem on emacs-tree-sitter and the answer is: as I
> use treesit.el from builtin, the problem concerns the Emacs devel.
>
> This answer seems to indicate that there would be an icompatibility
> between the libraries available on emacs-tree-sitter and the version
> of tree-sitter in emacs 29.1. Except c-ts-mode and cpp-ts-mode work
> correctly and you said the tree-sitter-java library compiled form
> sources is ok.
>
> Did I miss something?
What is emacs-tree-sitter?
And what do you mean by "the version of tree-sitter in emacs 29.1"?
Emacs doesn't come with a tree-sitter library; instead, you need to
download and install it yourself on the machine where you run Emacs.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-11-13 14:24 ` Eli Zaretskii
@ 2023-11-13 14:47 ` Pascal Quesseveur
2023-11-13 15:08 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Pascal Quesseveur @ 2023-11-13 14:47 UTC (permalink / raw)
To: help-gnu-emacs
>"EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> What is emacs-tree-sitter?
https://github.com/emacs-tree-sitter/tree-sitter-langs
EZ> And what do you mean by "the version of tree-sitter in emacs 29.1"?
EZ> Emacs doesn't come with a tree-sitter library; instead, you need to
EZ> download and install it yourself on the machine where you run Emacs.
The answer I got seems to mean that there may be incompatibilities
between language bundles in tree-sitter-langs and the builtin
treesitter.el.
As I have said I have downloaded windows binaries from releases
directory on https://github.com/emacs-tree-sitter/tree-sitter-langs.
--
Pascal Quesseveur
pquessev@gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-11-13 14:47 ` Pascal Quesseveur
@ 2023-11-13 15:08 ` Eli Zaretskii
2023-11-13 15:54 ` Pascal Quesseveur
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2023-11-13 15:08 UTC (permalink / raw)
To: help-gnu-emacs
> From: Pascal Quesseveur <pquessev@gmail.com>
> Date: Mon, 13 Nov 2023 15:47:49 +0100
>
> >"EZ" == Eli Zaretskii <eliz@gnu.org> writes:
>
> EZ> What is emacs-tree-sitter?
>
> https://github.com/emacs-tree-sitter/tree-sitter-langs
>
> EZ> And what do you mean by "the version of tree-sitter in emacs 29.1"?
> EZ> Emacs doesn't come with a tree-sitter library; instead, you need to
> EZ> download and install it yourself on the machine where you run Emacs.
>
> The answer I got seems to mean that there may be incompatibilities
> between language bundles in tree-sitter-langs and the builtin
> treesitter.el.
What kinds of incompatibilities, and how could they arise? Unless
that site comes with a modified Emacs or a modified treesit.el, I
don't see how that can be the case.
I do see that the commands used by them to compile the language
grammar libraries don't seem to link against the tree-sitter library
itself, which I think is a must on MS-Windows. But maybe I'm missing
something.
And that is all I can tell you. I compile the tree-sitter grammar
libraries myself, and never had any problems.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-11-13 15:08 ` Eli Zaretskii
@ 2023-11-13 15:54 ` Pascal Quesseveur
2023-11-13 16:48 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Pascal Quesseveur @ 2023-11-13 15:54 UTC (permalink / raw)
To: help-gnu-emacs
>"EZ" == Eli Zaretskii <eliz@gnu.org> writes:
EZ> What kinds of incompatibilities, and how could they arise?
I don't know. Here is the answer:
You are using the built-in treesit.el, and not this package. You
should report this bug to the Emacs devel and not here!
EZ> And that is all I can tell you. I compile the tree-sitter
EZ> grammar libraries myself, and never had any problems.
I would have liked to be able to test the new modes, but I will have
to wait either for a new binary version to work with emacs 29, or to
be able to compile the grammars myself...
--
Pascal Quesseveur
pquessev@gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-11-13 15:54 ` Pascal Quesseveur
@ 2023-11-13 16:48 ` Eli Zaretskii
2023-11-13 16:58 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2023-11-13 16:48 UTC (permalink / raw)
To: help-gnu-emacs
> From: Pascal Quesseveur <pquessev@gmail.com>
> Date: Mon, 13 Nov 2023 16:54:01 +0100
>
> >"EZ" == Eli Zaretskii <eliz@gnu.org> writes:
>
> EZ> What kinds of incompatibilities, and how could they arise?
>
> I don't know. Here is the answer:
>
> You are using the built-in treesit.el, and not this package. You
> should report this bug to the Emacs devel and not here!
I posted a question there, let's see what they answer.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: emacs 29.1: Errors with java-ts-mode on Windows
2023-11-13 16:48 ` Eli Zaretskii
@ 2023-11-13 16:58 ` Eli Zaretskii
0 siblings, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2023-11-13 16:58 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Mon, 13 Nov 2023 18:48:58 +0200
> From: Eli Zaretskii <eliz@gnu.org>
>
> > From: Pascal Quesseveur <pquessev@gmail.com>
> > Date: Mon, 13 Nov 2023 16:54:01 +0100
> >
> > >"EZ" == Eli Zaretskii <eliz@gnu.org> writes:
> >
> > EZ> What kinds of incompatibilities, and how could they arise?
> >
> > I don't know. Here is the answer:
> >
> > You are using the built-in treesit.el, and not this package. You
> > should report this bug to the Emacs devel and not here!
>
> I posted a question there, let's see what they answer.
I think I can guess what they want to say: they don't want to deal
with any problems related to use of the language grammars with Emacs's
built-in modes. they want to hear only about the tree-sitter mode
that they support, which is a third-part package. That package is
based on the same tree-sitter library as the one used by Emacs, but
Emacs uses the library differently.
I don't see how this could be relevant, and the Java grammar library I
built myself doesn't show the problem you reported. So I really have
no idea what is going on with that binary library you downloaded from
there. Maybe try to find another site which distributes Windows DLLs
of these grammar libraries?
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-11-13 16:58 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-31 11:31 emacs 29.1: Errors with java-ts-mode on Windows Pascal Quesseveur
2023-10-31 12:23 ` Eli Zaretskii
2023-10-31 14:22 ` Pascal Quesseveur
2023-10-31 14:52 ` Eli Zaretskii
2023-10-31 16:28 ` Pascal Quesseveur
2023-11-06 10:13 ` Pascal Quesseveur
2023-11-13 9:24 ` Pascal Quesseveur
2023-11-13 14:24 ` Eli Zaretskii
2023-11-13 14:47 ` Pascal Quesseveur
2023-11-13 15:08 ` Eli Zaretskii
2023-11-13 15:54 ` Pascal Quesseveur
2023-11-13 16:48 ` Eli Zaretskii
2023-11-13 16:58 ` Eli Zaretskii
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).