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: Tue, 29 Mar 2022 17:49:55 -0700 Message-ID: <32CE637B-B9A6-4E1A-A6C5-B6A930D34299@gmail.com> References: <9C5A86D6-0E7D-4DDF-B211-278EF9AC7E01@gmail.com> <87a6gq5mxl.fsf@gmail.com> <877dbu5mgj.fsf@gmail.com> <0BB906F7-BD3A-41CC-9783-19AA16934497@gmail.com> <83pmplq9f3.fsf@gnu.org> <5B304D80-2969-4F59-9A90-412D0A284912@gmail.com> <83ilvbpsvl.fsf@gnu.org> <4A6F417A-EF74-40B6-9517-6C0947AB87A6@gmail.com> <83wnjmiork.fsf@gnu.org> <6D1CD758-2C6F-4843-9739-F2A5D5591648@gmail.com> <67183EAB-5D98-4211-B71B-4618D6266A15@gmail.com> <83lews90ft.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) 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="24560"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Yoav Marco , ubolonton@gmail.com, Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 30 02:51:10 2022 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 1nZMYI-0006HF-RF for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Mar 2022 02:51:10 +0200 Original-Received: from localhost ([::1]:38866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZMYH-00069K-CU for ged-emacs-devel@m.gmane-mx.org; Tue, 29 Mar 2022 20:51:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZMXA-0005ST-Lp for emacs-devel@gnu.org; Tue, 29 Mar 2022 20:50:02 -0400 Original-Received: from [2607:f8b0:4864:20::633] (port=35726 helo=mail-pl1-x633.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZMX9-0002YX-4m; Tue, 29 Mar 2022 20:50:00 -0400 Original-Received: by mail-pl1-x633.google.com with SMTP id y6so16580828plg.2; Tue, 29 Mar 2022 17:49:58 -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=CUkkH12nwun7Jfa3IRfoM8T68TWxQ7xJttWXHE0mISc=; b=Ibp9DGrROngtVVfRXcZmYJQkmp+7LsAP6jgRqJuZ8DYtlA5LmeAJsB88Sr8yC7h1bo 7/cgRCChVDtPsFk+BK2PHhqR50nJ6/0MlbKf0WodHmOvrzlUL+1l2sG8LS3ho+shjLsV UlJoWNlFOH6ZRAcAAHUXRilzRbfp2vvZQUpWjUqY6EhjLRhwA1grFGOpv/owBf6Rdd38 ncLOc4i+7PERVjybCbSiPvUIT10lTlaYBYMjKfsuVEkoegCVLRG1YKog1Qq9Z10tDKB9 F47565G2n8qFjtYz4Mop1F00CTGuCJAoLgLdGmUB8Oe0kTcc5DsxnXyED9YP0nTdklrV 4Yzg== 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=CUkkH12nwun7Jfa3IRfoM8T68TWxQ7xJttWXHE0mISc=; b=ZdRCUKSErnSNaFc/BTOQkQP+grQzWzTy+dJw7QoOCvjOlc3y7cbwR/y57mTqtJTl2n xMqpTOlWQbTdIi3OCNYiIXA97NyYyRVQRyxzun0Ne33MhljP9h4HoYTsGHhw5CI43ngk ozoxDUw4pU5LOL+fW224LWD3DljD35Z5xKtCU3tZ6IXIs8NC9WT2Z+k36lus2kyaP0jf sp9yM41vdCji+4PhIdE8NXLLq3QqA7W8cgBNOkrXyDhovLQ+wCuNrl+l0mLeaDd+3tCf hLUhYCrkJnE+L/BmjQFPYLZhQQwJtWSup9AT6bU6QPQquGOuvBQnWNr6vaKUxBIBqVwQ 3Tsg== X-Gm-Message-State: AOAM532954peY9E9VGMQMDAOJnHGvCLA6JwGXCCkbr36KPtC7xl+qPBN /8Nfpa9xiwJSww/9S28fuwOnKoFynJIPKA== X-Google-Smtp-Source: ABdhPJxXRtvybWrIoh7YLN+/Bu8inkgitAoRt5vpH8wHGr5n6/UoDyxDB4AKCVravf9ks3IBppAFXQ== X-Received: by 2002:a17:90b:3697:b0:1c9:a980:3af2 with SMTP id mj23-20020a17090b369700b001c9a9803af2mr1915967pjb.217.1648601396717; Tue, 29 Mar 2022 17:49:56 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:a837:d5f7:9339:94dc]) by smtp.gmail.com with ESMTPSA id d6-20020a056a00244600b004f701135460sm21547846pfj.146.2022.03.29.17.49.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Mar 2022 17:49:56 -0700 (PDT) In-Reply-To: <83lews90ft.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::633 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=casouri@gmail.com; helo=mail-pl1-x633.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:287574 Archived-At: >=20 > Thanks. I skimmed this, and it looks in sufficiently good shape. Do > you consider this feature-complete enough to make one more step > towards merging it? If so, I'd like first to have this on a feature > branch in our repository, so that people could build it and try it. > Then we could land it on master after some time. Yes. I can do that once we figure out the namespace and new load path. >=20 > One thing that we should consider right now is the name-space. You > used tree-sitter-* names for all the symbols, and I'm asking whether > we don't want something shorter, like ts-*. This is a decision we > must make now, because once we start using the code, there will be no > way back. Lars, WDYT? As Po said, there is a package already using the ts prefix and that = package is popular enough. Maybe tsr? Anyway, I=E2=80=99d love a shorter = prefix other than tree-sitter, it is a real pain to type this long = prefix. >=20 > One other thing that I don't think I have a clear idea about is the > deployment. Do we expect end-users (or downstream package > maintainers) to download and install the language definition libraries > they need? If so, I think we should have our own load-path for these > libraries; relying on the standard LD_LIBRARY_PATH etc. is not good > enough (although we should support that as well). I envision that at > least in some cases users will not want to have these libraries in the > public places, or maybe even won't have the requisite access rights to > do so. We should provide Emacs-style alternatives, like some > subdirectory of ~/.emacs.d/ and/or under ${prefix}/lib/ (similar to > *.eln files). We expect end-users/maintainers to distribute language definitions. = Because the language library must be in the same version as the = tree-sitter library, and we expect them to distribute tree-sitter. I = don=E2=80=99t have an opinion on where the load path should be. Yuan=