From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Daniel_Mart=C3=ADn?= Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter integration on feature/tree-sitter Date: Sat, 14 May 2022 17:09:49 +0200 Message-ID: References: <9E6D13F6-7E50-44EE-A357-C971A11A3636@gmail.com> Mime-Version: 1.0 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="39687"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (darwin) Cc: Emacs Devel To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 14 17:11:24 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 1nptQQ-000A6H-9n for ged-emacs-devel@m.gmane-mx.org; Sat, 14 May 2022 17:11:24 +0200 Original-Received: from localhost ([::1]:37076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nptQM-0003pm-Um for ged-emacs-devel@m.gmane-mx.org; Sat, 14 May 2022 11:11:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nptP8-0002xi-5e for emacs-devel@gnu.org; Sat, 14 May 2022 11:10:02 -0400 Original-Received: from sonic314-19.consmr.mail.ir2.yahoo.com ([77.238.177.145]:41050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nptP2-0001E4-MY for emacs-devel@gnu.org; Sat, 14 May 2022 11:10:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1652540994; bh=qc4lNfOpVwvCCW1VVFzHuJonRsyd9k2G3Eg7RtQq9y4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=GrtSsLL8YXHqv6ZjcikAcZIkBoDmnLYYikUhSk8VzHHlC0uCpn5HP42DgwLy4ImmYiIiBADh3MdZww3+Grpo8y8mxivr7IjABGaA/yEnHZaosKIovxhZx6SpsXYuroos398zVcdJgjKnIIqOpvASQ7Mu0RrzHJ5QjMwOXNj8ScibQfNGI5mbSp2judTAOuD5VWvfT+uMg/DIAk/gt05p1/8WGl4gMCwx5st4yWbeSgfoagNhMhdVqTI+xgF9lTeNgSR4tEoUpNYcyUpmRaJK0mDh96o2XeMOX3YTb4pK94nFM1aEiRuyPTFnpfGAsAeHT1H/w6PmKN6p+SZblZqg0A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1652540994; bh=DuQkfAjbMnYU5dVzige3i+d0jNVhiWuk9HGXs9JCUOW=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=DuoHdrOgbWfkS4dQGHwuL0jsh6duxjOFLXG1tTI33M05C6QpT83mx6tbp27xbbqWQ9FqoKSHEV29VNIEFwHDcKvtqZwR5MolQjktVAJ+viZH1k1WuYCgtKlqotaE15jVZFRfY+rld7Ij6xrZdF145MKYvvEH8aItsNmWke2K6II4XRgN1Qi/F86XJnrA+a4XM/HgvpEEtu64seFVXxK/di9BnS2g/tHKrCf049k3xQLKJwP4DaZBhYMe+q+G2IZIM8JRCCKe075/t2dbNpJUQDHzqGO55PYvY426KAZqaI1zTl7f/Psy+0Xpk3a+TKLrKiQmvzIiyVCgxhGAV9P+4A== X-YMail-OSG: ypqyxIMVM1lSGeRvQK9Jn6._csPI2wm6qk2AA3dp3HMEYilgMJGpMUVjvS2gvPE veg108dHjQWN_aJ78BvrZ_ZvL2ijHG7fzdQxvjcWtVH7HWq8LzbvrSWeRv240L6XlIWcOVS2aZaj ylGK3bef2tz5XpWi..JaEVQAnXpZXaywi7QBM3YF4OmveK6loj_fgRrYy9b1Bn6d5j1nyd_L9u.P tleuHI5NvlJG5cyBWLlI5VE4TUXl5bmswsvgm_4yCZxJPY1LYwwhhZIaWvc_78ESCEWgNf6NzKGB Ey6V7iwrwL9QI6J.oYWYAYLBhLY5wbpQdI4kXDl.mLPsa3xdqPkZC_jbP.80Ny.Ej8rZpBjphfpy bIYkkN8HVNfWq_2KOzbLBRku1zlTREd5n90kMaQ3ZtdpGOVRkrF613HV7qKs1F0oBI0hak24dnLB Ntkk3O2cw6aLrwWCLhoEbGWa4ZnDXHSTRx4Qnvc0hU1BjL._HT7Tm3bs5NQMvJYDiY.fTQau7fFW miODpr2NoPDE1GwYoa_XRRfcN67ZXmgU_da2R9GA4c_HkmzvmgM9CCClQFeAmcMGZV0gi1b1IVp8 tiQC1HNwyKDuMMs5XjZFMsiV0V1EE4cloGj0HNEHQVkax1bwVvZESwj3cJv30WQ5ZNUflaFlsVq5 21Q5hnyYhqG7f64IihrAxzTaGmYevgCvKij3aBFKT8JkR_MaiReYVU9B..a1Rjf6j0JJP2_tujhj UtXdI0kkUpRKb5IboLYTxoPkvWydhEBhdyr56Oq9BiEUoC41gXrzWjoZS4uTgvsAOsraTkmXdums iipeZYUP.3qbNL9ddvH5ddQI2Cjrm6HsuDLlAznfSe X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Sat, 14 May 2022 15:09:54 +0000 Original-Received: by hermes--canary-production-ir2-695448f88c-ngx4d (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e51a9d21ba8fe0d4c6030913063b0a27; Sat, 14 May 2022 15:09:50 +0000 (UTC) In-Reply-To: <9E6D13F6-7E50-44EE-A357-C971A11A3636@gmail.com> (Yuan Fu's message of "Sat, 7 May 2022 01:29:17 -0700") X-Mailer: WebService/1.1.20188 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=77.238.177.145; envelope-from=mardani29@yahoo.es; helo=sonic314-19.consmr.mail.ir2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:289778 Archived-At: Yuan Fu writes: > Guys, > > I=E2=80=99ve pushed the tree-sitter integration to feature/tree-sitter. I= f anyone want to give it a try: > - get tree-sitter from GitHub (or your package manager, make sure the ver= sion is at least 0.20.2) > https://github.com/tree-sitter/tree-sitter > - pull and build the branch > - read (elisp)Parsing Program Source > - grab language definitions from https://github.com/casouri/tree-sitter-m= odule > You can either build with my script, or download the prebuilt ones > - play with it > > Also apologize in advance for that my response might be slow until like J= une :-) > > Yuan Thanks for working on this. What is the best way to report problems/contribute patches? I've tried to build the branch and got a "file not found" error when including (I have tree-sitter correctly installed via Homebrew on macOS). I've fixed the problem with the following patch: diff --git a/configure.ac b/configure.ac index bf97dd017c..5a82d47db3 100644 --- a/configure.ac +++ b/configure.ac @@ -3115,7 +3115,6 @@ AC_DEFUN [HAVE_TREE_SITTER=3Dyes], [HAVE_TREE_SITTER=3Dno]) if test "${HAVE_TREE_SITTER}" =3D yes; then AC_DEFINE(HAVE_TREE_SITTER, 1, [Define if using tree-sitter.]) - TREE_SITTER_LIBS=3D-ltree-sitter TREE_SITTER_OBJ=3D"treesit.o" fi fi diff --git a/src/Makefile.in b/src/Makefile.in index a21af42c0b..7533f25963 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -344,7 +344,7 @@ JSON_CFLAGS =3D JSON_OBJ =3D @JSON_OBJ@ =20 TREE_SITTER_LIBS =3D @TREE_SITTER_LIBS@ -TREE_SITTER_FLAGS =3D @TREE_SITTER_FLAGS@ +TREE_SITTER_CFLAGS =3D @TREE_SITTER_CFLAGS@ TREE_SITTER_OBJ =3D @TREE_SITTER_OBJ@ =20 INTERVALS_H =3D dispextern.h intervals.h composite.h I have already signed the FSF paperwork. Thanks.