Thanks for that :-) 
It's a first step. However, the *-ts-mode.el files still go through the .el compilation, yielding error messages during the compilation. 
Additionally, they get installed in the binary distribution:

emacs-29 ➤ find Emacs.app -name \*-ts-\*
Emacs.app/Contents/Resources/lisp/progmodes/c-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/progmodes/c-ts-mode.elc
Emacs.app/Contents/Resources/lisp/progmodes/cmake-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/progmodes/cmake-ts-mode.elc
Emacs.app/Contents/Resources/lisp/progmodes/dockerfile-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/progmodes/dockerfile-ts-mode.elc
Emacs.app/Contents/Resources/lisp/progmodes/go-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/progmodes/go-ts-mode.elc
Emacs.app/Contents/Resources/lisp/progmodes/java-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/progmodes/java-ts-mode.elc
Emacs.app/Contents/Resources/lisp/progmodes/json-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/progmodes/json-ts-mode.elc
Emacs.app/Contents/Resources/lisp/progmodes/ruby-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/progmodes/ruby-ts-mode.elc
Emacs.app/Contents/Resources/lisp/progmodes/rust-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/progmodes/rust-ts-mode.elc
Emacs.app/Contents/Resources/lisp/progmodes/typescript-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/progmodes/typescript-ts-mode.elc
Emacs.app/Contents/Resources/lisp/textmodes/toml-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/textmodes/toml-ts-mode.elc
Emacs.app/Contents/Resources/lisp/textmodes/yaml-ts-mode.el.gz
Emacs.app/Contents/Resources/lisp/textmodes/yaml-ts-mode.elc

That may be a source of confusion ...

Just my .02cents, /PA

On Fri, 20 Jan 2023 at 09:30, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> Date: Thu, 19 Jan 2023 17:53:06 +0100
>
> Now: My experience in the last couple of weeks is that there are tree-sitter modes in the Emacs tree that
> have non-ts counterparts in MELPA only. And that's been frustrating. Basically because I don't compile ts
> support and despite that, the treesit .el files are installed and used. Example: dockerfile-mode is in MELPA
> only. So when I recently opened a Dockerfile, I got an error saying that Dockerfile-ts-mode couldn't start
> because my emacs hasn't ts support compiled in.
>
> I would have prefered to see the dockerfile opened in text mode with no errors. And then, when I install the
> Dockerfile-mode package from MELPA, start working with all the goodies I got from installing the package
> from MELPA.
>
> My gut feeling is that if I don't have treesit support compiled in Emacs, I don't want *-ts-*.el files in my elisp
> tree nor any side effects related to these files. Sorry to say, but I feel that the enthusiasm about treesit some
> have is a bit pushing for me. And I feel uncomfortable when pushed.

Please try the latest emacs-29 branch, where the tree-sitter based
modes have been made entirely optional.


--
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run a leader-deposed hook here, but we can't yet