GNU bug report logs -
#77213
go-ts-mode trying to treesit-ready-p gomod without quiet
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77213 in the body.
You can then email your comments to 77213 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77213
; Package
emacs
.
(Sun, 23 Mar 2025 17:46:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gergely Riskó <gergely.risko <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 23 Mar 2025 17:46:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hey,
In the last 2 lines of go-ts-mode.el we have this:
(if (treesit-ready-p 'gomod)
(add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
This is problematic, because the treesitter go shared library can be
available when the gomod shared library is not. (E.g. the official
treesit bundle behaves like that.)
Now, this call to treesit-ready-p without the quiet flag causes a
warning, that might frighten the user and might send the message that
even their go configuration is somehow broken (and it's not).
The easy fix would be to just add the quiet flag here, and I think
that should be done as soon a possible.
But conceptually speaking, I'm not 100% sure that it's a good idea
that gomod and go are so tightly coupled in the same file. Editing go
files is much more frequent while programming than editing gomod
files. If there are any issues with gomod (like now), it would be
cool to be able to just turn it off (e.g. removing from
auto-mode-alist), instead of it being force-loaded just because it's
the same file as go-mode.
Cheers,
Gergely
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 29 Mar 2025 10:39:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Gergely Riskó <gergely.risko <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 29 Mar 2025 10:39:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 77213-done <at> debbugs.gnu.org (full text, mbox):
> From: Gergely Riskó <gergely.risko <at> gmail.com>
> Date: Sun, 23 Mar 2025 16:56:24 +0100
>
> Hey,
>
> In the last 2 lines of go-ts-mode.el we have this:
>
> (if (treesit-ready-p 'gomod)
> (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode)))
>
> This is problematic, because the treesitter go shared library can be
> available when the gomod shared library is not. (E.g. the official
> treesit bundle behaves like that.)
>
> Now, this call to treesit-ready-p without the quiet flag causes a
> warning, that might frighten the user and might send the message that
> even their go configuration is somehow broken (and it's not).
>
> The easy fix would be to just add the quiet flag here, and I think
> that should be done as soon a possible.
Thanks, now done on the emacs-30 release branch.
> But conceptually speaking, I'm not 100% sure that it's a good idea
> that gomod and go are so tightly coupled in the same file. Editing go
> files is much more frequent while programming than editing gomod
> files. If there are any issues with gomod (like now), it would be
> cool to be able to just turn it off (e.g. removing from
> auto-mode-alist), instead of it being force-loaded just because it's
> the same file as go-mode.
I didn't do this part, because if the gomod library is available, I
see no reason to disable it.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 26 Apr 2025 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 57 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.