From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter api Date: Mon, 06 Sep 2021 08:33:23 +0300 Message-ID: <83tuiys1y4.fsf@gnu.org> References: <83r1f7hydn.fsf@gnu.org> <95F37923-5BF9-4D81-B361-267CF119FBCA@gmail.com> <735AF34C-FD18-4A6A-A99D-E5D8EB4DE4F3@gmail.com> <40611F1F-7B5C-4885-A2CA-CE709ED8D22B@gmail.com> <4E876354-10D1-46B3-8124-CAE916261F08@gmail.com> <0A3F5464-B90D-4D47-BBDD-CCA26D877F43@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9910"; mail-complaints-to="usenet@ciao.gmane.io" Cc: ubolonton@gmail.com, theo@thornhill.no, cpitclaudel@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, stephen_leake@stephe-leake.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 06 07:34:09 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mN7Gi-0002KK-42 for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Sep 2021 07:34:08 +0200 Original-Received: from localhost ([::1]:44356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mN7Gh-0006ox-1W for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Sep 2021 01:34:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mN7G2-0005au-G2 for emacs-devel@gnu.org; Mon, 06 Sep 2021 01:33:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55786) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mN7Fz-0001Yx-1J; Mon, 06 Sep 2021 01:33:23 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3670 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mN7Fw-000367-5P; Mon, 06 Sep 2021 01:33:21 -0400 In-Reply-To: <0A3F5464-B90D-4D47-BBDD-CCA26D877F43@gmail.com> (message from Yuan Fu on Sun, 5 Sep 2021 17:23:33 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:274071 Archived-At: > From: Yuan Fu > Date: Sun, 5 Sep 2021 17:23:33 -0700 > Cc: Theodor Thornhill , > Stephen Leake , > Eli Zaretskii , > Clément Pit-Claudel , > Stefan Monnier , > emacs-devel > > 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.