From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter api Date: Fri, 10 Sep 2021 21:11:52 -0700 Message-ID: <2A8BD2EC-7420-4FD7-BF63-A5E6715B51AA@gmail.com> 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> <83tuiys1y4.fsf@gnu.org> <835yvcpdip.fsf@gnu.org> <7B1F90DE-A992-4F51-B391-0A4E5A598780@gmail.com> <3E8CA8E4-E623-4051-A76D-508C6CF94B6A@gmail.com> <837dfpj5yf.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Cl=C3=A9ment_Pit-Claudel?= , Theodor Thornhill , emacs-devel , Stefan Monnier , Eli Zaretskii , Stephen Leake To: =?utf-8?B?VHXhuqVuLUFuaCBOZ3V54buFbg==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 11 06:12:42 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 1mOuNe-0004qp-Lt for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Sep 2021 06:12:42 +0200 Original-Received: from localhost ([::1]:33778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOuNd-0001lD-8O for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Sep 2021 00:12:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOuMv-0000rP-UZ for emacs-devel@gnu.org; Sat, 11 Sep 2021 00:11:58 -0400 Original-Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:37434) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOuMu-0005vs-Ek; Sat, 11 Sep 2021 00:11:57 -0400 Original-Received: by mail-qk1-x72d.google.com with SMTP id w78so4381761qkb.4; Fri, 10 Sep 2021 21:11:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=L8itqSBWW32m3p2D8auq2x2xDT/75z5rkqMbf3epQHA=; b=hodaZl4tFmxQaaKZZD/WITzVfh+5GSnO/X+I2XOdBJID08vS+S6jX5/DSDnhG3NWKa F9r09Io7vnVBMxbVsRKrmGwF66ohmTpZrPOU4ER/8aDttazFdjBud+nxbE7RHmd3YCJ/ TissJ6ZpjoQlPqVlNds+bLnyYEw+jNRJV9k2xyzBn5E3fCqNyMiUkIKqm8DR3sqTBDo1 onXe/Ry8Ibbug+0S0fW4K7VMPex0RygK9bfvHpCFKqoMQY00F8Rp6pul++STE6IzLuhJ ZVVtsKlp1AjIaHFFNXC8Hd5gHT+1v+yA1zyFaoanqzURqgIZ3/KI/TFhs4QH9mSwTr2+ Quhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=L8itqSBWW32m3p2D8auq2x2xDT/75z5rkqMbf3epQHA=; b=VR09MQJUQ5miNhYsYjSjf6JdJeQp9Xg0HvZ/M//Gp3agZ8P1mmV9FeW3OXUSp8XyOC 0zwbKP7Fk+VJ7eITOT1wOPEoW+bH5ujPPLzbA+w9YadsWD7CIbPfWGazYK0qk/X4I7Y4 pXanEiiwhV8nQOEVTLVA4LPFyyTcuvafre2Zbq+uR/rAqEgDJb9Ggu8da8P5CjCkU2mK QGEPoATrK9X+ZqTcnjgWPpI8A6iedv0L/rcvtRu6t6thGCSAOW4yYL3SjPiAo0UxJEGK pBewOsIz9135d7he/dqfqxYJy47vx1sJvWmTi5ZVUPCT8+Ym545MsajLu2NXlkGnkD34 rPdQ== X-Gm-Message-State: AOAM533HoLcsbap3jc4ONEPGzjYQQY8XpoW/0WJea3NorGX5RS1oqmwh yxdVnK8che7uXrrrTJ0dK5Q= X-Google-Smtp-Source: ABdhPJyUtJPMb9seVgB7x/5ih2uCkx5VW41rerf2D3ftys+r7Vf5FtJC8/eWxcSBG6Oq+q0KmL8l4A== X-Received: by 2002:a05:620a:bc5:: with SMTP id s5mr637307qki.47.1631333514708; Fri, 10 Sep 2021 21:11:54 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c9f:a158:bbab:fca1:1f4e]) by smtp.gmail.com with ESMTPSA id w6sm468171qkf.95.2021.09.10.21.11.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Sep 2021 21:11:54 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=casouri@gmail.com; helo=mail-qk1-x72d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:274535 Archived-At: > On Sep 10, 2021, at 8:41 PM, Tu=E1=BA=A5n-Anh Nguy=E1=BB=85n = wrote: >=20 >> Just realized another problem, how do we make sure the loaded library = is GPL-compatible? >=20 > This question is rather non-technical, so I can't provide any = comments. >=20 >> There certainly won=E2=80=99t be =E2=80=9Cplugin_is_GPL_compatible=E2=80= =9D symbol in them=E2=80=A6 And IIUC Emacs cannot load GPL-incompatible = dynamic libraries? >=20 > That's one of the reasons for using `dynlib.h` APIs directly. The = check for > that symbol is at the level of `emacs-module.c`. Let's not = conceptually > conflate a "shared library" and an "Emacs dynamic module=E2=80=9D. I think you have it backwards. IIUC the reason why every Emacs dynamic = module declares =E2=80=9Cplugin_is_GPL_compatible=E2=80=9D is that every = shared library that links with Emacs must be GPL compatible, and an = Emacs dynamic module is a shared library. But that=E2=80=99s just my = understanding, of course. I=E2=80=99m happy to be corrected. Yuan