From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6GJ0LC3VL2JNyAAAgWs5BA (envelope-from ) for ; Tue, 15 Mar 2022 00:52:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cDMpKS3VL2J2AgEAauVa8A (envelope-from ) for ; Tue, 15 Mar 2022 00:52:13 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 563093F252 for ; Tue, 15 Mar 2022 00:52:13 +0100 (CET) Received: from localhost ([::1]:55084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nTuTz-0006dF-U5 for larch@yhetil.org; Mon, 14 Mar 2022 19:52:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54922) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTuTq-0006cz-TD for guix-patches@gnu.org; Mon, 14 Mar 2022 19:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nTuTq-000566-Kx for guix-patches@gnu.org; Mon, 14 Mar 2022 19:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nTuTq-0000Ik-F3 for guix-patches@gnu.org; Mon, 14 Mar 2022 19:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#53523] [PATCH v3 1/2] gnu: Add tree-sitter. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 14 Mar 2022 23:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53523 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Luis Henrique Gomes Higino Cc: 53523@debbugs.gnu.org X-Debbugs-Original-Cc: guix-patches@gnu.org, 53523@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16473018971121 (code B ref -1); Mon, 14 Mar 2022 23:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Mar 2022 23:51:37 +0000 Received: from localhost ([127.0.0.1]:46981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTuTE-0000Hk-FH for submit@debbugs.gnu.org; Mon, 14 Mar 2022 19:51:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:60762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nTuTC-0000Hb-On for submit@debbugs.gnu.org; Mon, 14 Mar 2022 19:51:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTuTC-0006ae-Hj for guix-patches@gnu.org; Mon, 14 Mar 2022 19:51:22 -0400 Received: from mout.gmx.net ([212.227.17.20]:54561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nTuTA-0004yH-EQ for guix-patches@gnu.org; Mon, 14 Mar 2022 19:51:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647301869; bh=Lv7+U67f+7uvS+J1E+tXZiRVQg88lpaxHkofG3KCgg4=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=N/NsVGDfeN1k3iVb3+EKtfpl1jRbEoA7s9ugTBCH8X4hvDrpEjCuOcrBYxOjfLbtB Pj3XhW3tApdhFJamYpY7gqfV5NXL1GJR1kyFFVhxLMA4Rdmv7IyqHL9esWFm/Ui4rA I0if7RV6dTgT0q5gqj/r+TZTjNObwYFoSkyAMSPQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Mlf4c-1ntelL2nf0-00ik6M; Tue, 15 Mar 2022 00:51:09 +0100 References: <98a6180737981490316bca8c03c787289dbddcb6.1643120885.git.luishenriquegh2701@gmail.com> <78ed09339d88b859d34798faff950ea7a2d4d6c9.1647300645.git.luishenriquegh2701@gmail.com> User-agent: mu4e 1.6.10; emacs 27.2 From: Pierre Langlois Date: Mon, 14 Mar 2022 23:43:20 +0000 In-reply-to: <78ed09339d88b859d34798faff950ea7a2d4d6c9.1647300645.git.luishenriquegh2701@gmail.com> Message-ID: <87lexcjdoz.fsf@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:naN7v+aWst6PAunq3W3Kyb4GBgcGGMOHz2x8azu5HTwkQRNesfP 5yfFzpNZgbhqjmazDVUyzhVqvJQU7CEmlHZoHaSt8SVuiZ/l9AktGJkidMJurm5tmBKhetM 2ijP5lrXd/zah11U8SyFN0Q4ZRU7hl6PCWpTztxj4Ba2yEs9Ae7V+zh8JsWlnQYpTuF2uA/ 1B6OMF8MisodEF330a7Ow== X-UI-Out-Filterresults: notjunk:1;V03:K0:Dai8KvIt1BU=:79pDnRA7CrEf3w9tMlpHjh UlH29LpU6CI2uw/Z8fVeyV44MLqXX7e5JBEHB5rSC6zOldmljUyi267E3XqsTbNkFSDLq+5F9 33svwpcOLTC3XH96FFGXdG16BxccKbuuk+l45cTWrIkkjwHuF01xSEo7IB4lodGgyXrh/WdrO Iho4IqJTRuwpB8ewzebCeeWZqxOn5PYfZ3ASa30zYMLvrpc/jANd2YsxKN0ifXMAH3O2/6fg+ K3hRcgv0vKhU4OARkALMY0QUIqzZ2Kdk35n7FZkQV2CHawvHw5cxSuvSrMv423b1I2xuooadb OwTZedlB0VqwF7HeTXJRWn4IaGKwyzulHH9U4XvU19YmCTL3XGk5h6xjvUu+ecQtOrmcPFT4/ 12NVQGoHRYfkd3yVolZ5OfyK22VTKvRqAFL/Ic2WglWx8KEIxMTlHCy2/76gksEM0yuU9+a24 KwPGxcBuUrF2lXYakEgGijiVE2v7C/xlbkimjXFysxfWjDOYJe20ZVSxp0M58hZ/OHr8LeVYz o06UJvc+aIe+6r9Rvi8nKpnKZBJY+bmAPORdjMbyFfCK6kePkC4Wq+0AvmIt3OaMwfwTY0PfJ 9nxuxa6MtEnSk9pEg+Ypiu8UI8iszAXaowvLhYOOfRKxirX+kuQwjug81xe97k/PtD3ES9cf5 jOo/ffC1xmFJu6GLUFoKC14bBBNV+BQ3Apo7Mqk8TgYWlCIDqz0V1viyRM+bq38VyoC9FNICs od+edyHU9TKT0kP65xQEyWJk1JmVyow0XqucuQFZ7WehhSCIZCZqGzH7p4qXNm3WZ1BjnXu9o PPMkGCwQOto4w0iqNa+qAG1BIHz+/zc2n93UduUX3KLaWRFVWpYUySs2WtiLYlJDCThmnHq/a FHBXF0tiuoqfWcAQC+W8xmJKXAwCugsByBF5Ulqs0dU4u1endEPCU6+P1LA/Q+cXPNlifNENc xaKAfjhv4SBEW4DMrjhpUd5pgzL2ul3CSqR204Qmoja4iWvVKEWrA2dvNEqar+k/bXFt9Bw0w 0TFMJnpbLBUOITNbqdPpLZu0FWbh3PqY9s4QB0lCEUKaqUQeUrUucp0EESTRRJBMy+kS2xpzT tU7qQFBYvDK/iM= Received-SPF: pass client-ip=212.227.17.20; envelope-from=pierre.langlois@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647301933; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+qSp1hg1mvMftmVjYp7BmPple8JGmtSZOfZPopdQyYA=; b=DOGFOSVXgqDAXViyfCR+rTiwNz+Ms0L6i6wNkyaXtYjUgXqtYCJzFPzmlCtkyqWJ/8I5c4 rQGhq/qd6E5uRVehSsWPJuV9K69OhAmggc7XmXoG1YMV2/DeDakZ1E5pI0RTmL7tnnecWC nnwXsfspWP73hOgYab5ypGFVCxdAANjh9SOnmoR3sdDWPLb3Knn+GRMI1loZGQcfm+upyL yUrYomnNQ0HOIEYXdGiaIpkxDUmFQVF4/w1U46rxK6Q5hBYorIuHkpJL0OU4fRDMiHOl4o LNfr/yTzO+NK6lgXRlF9x9vnU3i0WYsdCWyFRBweKYRrAKXpSiFDlvkG8BRbpg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647301933; a=rsa-sha256; cv=none; b=NYhDBfojuwIJjpqHHgMpkokrOu1D43MV47daoXAhXL4uVVQ94YOBtbxlL0APCjqV4IlwPa vRola0gHoDv2zweVQcirluSgWWM2FD7oyAQrmntqtsYONrgTJCgG73BEiR/MhpZl6n3q9S crhcf8naDHJk9hCuXxcwlwgX4j+7nG9PgMHChVLE6A65T5+jxBI6YHT8ArwdWsol5yt979 rLPkHFf9T+Q6BY8fnVL3BSAKoNS+ntAMB2wxFnwzcsvUuwfsXfsDA1JtNosbacVxGnAjAD dzQvrUmuLjkUl5CCuNtdSZxCD8eXjik21Ov/hHsYKKf4v/opu7aV2jhRKzLX5w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="N/NsVGDf"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="N/NsVGDf"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 563093F252 X-Spam-Score: 5.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3ZrX09yRDSMJ Hi Luis, Luis Henrique Gomes Higino writes: > * gnu/packages/text-editors.scm (tree-sitter): New variable. I'm not a maintainer, but the patch looks good to me with just a minor comment! As mentioned before, I'll rebase on top of this after its merged, I still have a bit more work to do on the emacs support for tree-sitter. > --- > gnu/packages/text-editors.scm | 54 +++++++++++++++++++++++++++++++++++ > 1 file changed, 54 insertions(+) > > diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm > index 2c5f5de719..d333d78e22 100644 > --- a/gnu/packages/text-editors.scm > +++ b/gnu/packages/text-editors.scm > @@ -17,6 +17,7 @@ > ;;; Copyright =C2=A9 2021 Leo Famulari > ;;; Copyright =C2=A9 2021 Pierre Langlois > ;;; Copyright =C2=A9 2021 Calum Irwin > +;;; Copyright =C2=A9 2022 Luis Henrique Gomes Higino > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -39,6 +40,7 @@ (define-module (gnu packages text-editors) > #:use-module (guix gexp) > #:use-module (guix git-download) > #:use-module (guix utils) > + #:use-module (guix build utils) > #:use-module (guix build-system cargo) > #:use-module (guix build-system cmake) > #:use-module (guix build-system gnu) > @@ -61,6 +63,7 @@ (define-module (gnu packages text-editors) > #:use-module (gnu packages gtk) > #:use-module (gnu packages guile) > #:use-module (gnu packages haskell-xyz) > + #:use-module (gnu packages icu4c) > #:use-module (gnu packages image) > #:use-module (gnu packages libbsd) > #:use-module (gnu packages libreoffice) > @@ -1165,3 +1168,54 @@ (define-public virtaal > provided by the Translate Toolkit, including XLIFF and PO.") > (home-page "https://virtaal.translatehouse.org/") > (license license:gpl2+))) > + > +(define-public tree-sitter > + (package > + (name "tree-sitter") > + (version "0.20.6") > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/tree-sitter/tree-sitter") > + (commit (string-append "v" version)))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "1z20518snyg0zp75qgs5bxmzjqws4dd19vnp6sya494za3qp5b6d")) > + (modules '((guix build utils))) > + (snippet '(begin > + ;; Remove bundled ICU parts > + (delete-file-recursively "lib/src/unicode") > + #t)))) > + (build-system gnu-build-system) > + (inputs (list icu4c)) > + (arguments > + (list #:phases > + '(modify-phases %standard-phases > + (delete 'configure)) > + #:tests? #f It might be nice to add a short comment to say that there are no tests for the runtime library itself. A "; no check target." comment might suffice, we do that often. > + #:make-flags > + #~(list (string-append "PREFIX=3D" > + #$output) > + (string-append "CC=3D" > + #$(cc-for-target))))) > + (home-page "https://tree-sitter.github.io/tree-sitter/") > + (synopsis "Incremental parsing system for programming tools") > + (description > + "Tree-sitter is a parser generator tool and an incremental parsing > +library. It can build a concrete syntax tree for a source file and effi= ciently > +update the syntax tree as the source file is edited. > + > +Tree-sitter aims to be: > + > +@itemize > +@item General enough to parse any programming language > +@item Fast enough to parse on every keystroke in a text editor > +@item Robust enough to provide useful results even in the presence of sy= ntax errors > +@item Dependency-free so that the runtime library (which is written in p= ure C) > +can be embedded in any application > +@end itemize > + > +This package includes the @code{libtree-sitter} runtime library. > +") > + (license license:expat))) Thanks, Pierre