emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tree-sitter introduction documentation


From: Danny Freeman
Subject: Re: Tree-sitter introduction documentation
Date: Wed, 28 Dec 2022 09:41:15 -0500

Lynn Winebarger <owinebar@gmail.com> writes:
>
> The problem is that the "cli" written in Rust is the parser generator.  I
> looked into trying tree-sitter last summer, but gave up when I discovered
> the Rust tool chain isn't available for cygwin.
> A cursory inspection doesn't show me why the author goes to the length of
> using JavaScript and nodejs, since all the real work appears to be in
> Rust.
> I suspect that Stefan and Eli would prefer a solution that decoupled the
> use of libtreesitter from the tool that generates the shared library with
> the parser tables (and whatever else is required) that the tree sitter
> library loads.
>
> Generating GLR automata is well-understood, but tree-sitter appears to have
> some additional functionality in its parser generation.  How much of that
> is required for libtreesitter to function is another question that would
> need to be understood.
>
> This is where the culture of free software, where the process of building
> software is expected to be inclusive of the user-developer's local system,
> and corporate open-source, which requires repeatable processes and
> controlled build environments, are at logger heads.  Chromium (and its
> component projects) is not encumbered by a software license, but it's build
> process is a nightmare for any individual that wants to validate or
> control, at least in principle, all software running on their system.  I'm
> only using Chromium as an example with which I'm somewhat familiar.  It
> sounds like Rust incorporates some bias towards "continuous integration"
> builds as well.
>
> Lynn


Something I haven't seen mentioned here that might be relevant to the
conversation is the tree-sitter 1.0 checklist from last year:
https://github.com/tree-sitter/tree-sitter/issues/930

It's not been updated in a while, so I'm not sure what the status is,
but one of the items on the list is:

> - Mergeable Git Repos - Make it easier to collaborate on grammars by removing 
> generated files from version control.

which means anyone cloning the repository with the intention of
installing it would be required to have more than just a C compiler to
get started. They would need tree-sitter-cli and it's dependencies
installed to make things work.

I'm assuming that tree-sitter maintainers will work their way through
this checklist one day, so maybe it's best to operate under the
assumption that this change is coming to the grammar repos in the near
future.


Also, nixos packages tree-sitter grammars, and their distribution of the
Emacs master branch uses these successfully. As an end user, I find it 
convenient to have the distro provide these.
https://search.nixos.org/packages?query=tree-sitter-grammars
Although I might be worried about breaking changes to the grammars
and distros getting out of sync with what the treesitter major modes
expect.

-- 
Danny Freeman



reply via email to

[Prev in Thread] Current Thread [Next in Thread]