emacs-devel
[Top][All Lists]
Advanced

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

Re: Tree-sitter api


From: Eli Zaretskii
Subject: Re: Tree-sitter api
Date: Mon, 06 Sep 2021 08:33:23 +0300

> From: Yuan Fu <casouri@gmail.com>
> Date: Sun, 5 Sep 2021 17:23:33 -0700
> Cc: Theodor Thornhill <theo@thornhill.no>,
>  Stephen Leake <stephen_leake@stephe-leake.org>,
>  Eli Zaretskii <eliz@gnu.org>,
>  Clément Pit-Claudel <cpitclaudel@gmail.com>,
>  Stefan Monnier <monnier@iro.umontreal.ca>,
>  emacs-devel <emacs-devel@gnu.org>
> 
> I see your point. If no one else object, I’ll change the code to use shared 
> libraries instead of dynamic modules. Thanks for the input :-)

Can we please stop for a moment and describe what exactly is required
for loading a language module?  I think it would be good to have that
documented in this discussion for posterity, and so that we make sure
we are all on the same page.

I understand that a language module gets compiled into a shared
library, either as part of building TS or separately.  But what should
Emacs do to "load" the module, and when should it do that?  And how do
we intend to handle the situation where a module is needed, but is not
available (i.e. its loading fails)?

Emacs has a load-on-demand infrastructure for shared libraries, but it
only exists on MS-Windows, where we support installations of Emacs
binaries without some of the optional libraries, and want to handle
that gracefully.  However, this doesn't seem to be a similar
situation; for starters, load-on-demand needs to know at Emacs build
time the names of entry points (functions and variables) we need to
import from each shared library.  So I guess we are talking about some
(slightly) different mechanism here?

Thanks.



reply via email to

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