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 introduction documentation Date: Sat, 31 Dec 2022 17:18:53 -0800 Message-ID: <1A915096-5785-42F7-BEFE-34FA03434F3F@gmail.com> References: <87tu1vxs3a.fsf@ledu-giraud.fr> <831qozjob7.fsf@gnu.org> <87cz8jxoat.fsf@ledu-giraud.fr> <83wn6ri7pn.fsf@gnu.org> <5e0a3185-de82-b339-0fa2-956779e63d6f@cornell.edu> <868rj6vfep.fsf@gmail.com> <4895891b-e5ea-9c37-f51b-df2e479ee758@yandex.ru> <83y1qt11xq.fsf@gnu.org> <9eb013da-d0fc-8e17-c6e3-1e8f913aebfa@yandex.ru> <83pmc50xxc.fsf@gnu.org> <71cfe4e8-3bb8-b0a6-9be5-8c0a6d92cfab@yandex.ru> <83h6xg29z3.fsf@gnu.org> <87wn6cyey5.fsf@posteo.net> <787B1EB4-1925-4679-8747-449DCD685432@gmail.com> <83y1qo6h7a.fsf@gnu.org> <874jtc99b0.fsf@posteo.net> <5E14F981-7F40-40A7-8762-EEB7A6C7E8F2@gmail.com> <87k02877ov.fsf@posteo.net> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.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="40471"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , monnier@iro.umontreal.ca, dgutov@yandex.ru, theophilusx@gmail.com, emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 01 02:19:30 2023 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 1pBn0b-000AGq-W4 for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Jan 2023 02:19:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBn09-0000gl-4z; Sat, 31 Dec 2022 20:19:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBn07-0000gZ-7R for emacs-devel@gnu.org; Sat, 31 Dec 2022 20:18:59 -0500 Original-Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBn05-0005LU-BD; Sat, 31 Dec 2022 20:18:58 -0500 Original-Received: by mail-pj1-x102b.google.com with SMTP id n12so13451433pjp.1; Sat, 31 Dec 2022 17:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vZKfS8gYlRYco6fE+xroesNvHOr0cruCTb4SS3uBviA=; b=ZoDcD3ecUtyBDyOt0b6yFU2IADy/vXEZXkx8PUn+ciN1dq3KovDwpHAmWpAMHSN7Y5 674UEMX9KlGCCMOYLLAOhw8KKGYOp2u/L9VvvpC2VsAyUs6neI7Q1hS3TCKGDk63QzL2 gN2oxA5zVP/ahmc7V6hGRWHyX/TDs8lZt6G8KA3v6Ftsd+8fb82bhbK+moxOQ2SiUp12 z5qFLPdMupqmnyDNuE76r7wUMzFZ0/eP6+xV7IXtqoRYBLIo8lUBgFNrIyVPeXKLE6He Uma3CU8CoHZAbzVoiXiyuj94i/wwgDpiRpSt3PK5J7YtOQsLHSUjOSmhWzm+ThoJABQ1 HGqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vZKfS8gYlRYco6fE+xroesNvHOr0cruCTb4SS3uBviA=; b=tdGkuo5UZEjbHNvlpzi/vHsMHgRFdwshdXUrJOjA1p3njb8czv8JzYtMT/orRs1hbP 2FPAnSn0VS5yMxssswXHscZOc5PhPOhE8bhTOAmJMF8k7OcUSMkvQVEI+FGeahBZqQJK KX6cnG9vLRpoEW2ivx54HyV++lEvudWt1s0Xf9kSnCJtOkgnzDy0SOTWZtMIcHpDvRVK 6Z8v8JjuuZ2izKINk43ge8BvbtoRAueUZYBaqcORjOABKmLesRlAgfaxSFEaoiF1cTmA cjXv7aVMsi0npuxL3fwdh5TY79e3hg2mJZje6MJztVCkfty1cKdnudCUpgOyJ81jSseg oaAA== X-Gm-Message-State: AFqh2kpXnGdSmDh507ZTY1aVgqrSwshPMVFVL6tn3mnRRvLjWE2BzO9R v2JCLu3bPWIEaUrNPNvb28A= X-Google-Smtp-Source: AMrXdXvgA8pL8sU67EgB3L09fAmjfmTYKYi54ClkNyA/v6spmyG2L7bADBotjZScFbciZtD+/f05tw== X-Received: by 2002:a17:90b:2291:b0:226:43ba:54af with SMTP id kx17-20020a17090b229100b0022643ba54afmr6671150pjb.2.1672535935586; Sat, 31 Dec 2022 17:18:55 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id mm2-20020a17090b358200b0021937b2118bsm17683463pjb.54.2022.12.31.17.18.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Dec 2022 17:18:55 -0800 (PST) In-Reply-To: <87k02877ov.fsf@posteo.net> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=casouri@gmail.com; helo=mail-pj1-x102b.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.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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302168 Archived-At: > On Dec 30, 2022, at 4:12 PM, Philip Kaludercic = wrote: >=20 > Yuan Fu writes: >=20 >>> On Dec 30, 2022, at 7:54 AM, Philip Kaludercic = wrote: >>>=20 >>> Eli Zaretskii writes: >>>=20 >>>> (message "Cloning repository") >>>> ;; git clone xxx --depth 1 --quiet workdir >>>> (treesit--call-process-signal >>>> "git" nil t nil "clone" url "--depth" "1" "--quiet" >>>> workdir) >>>>=20 >>>> Why "--depth 1"? This should be a defcustom, and the default = should >>>> be to clone the full repository, IMO. Also, what about updating = the >>>> library when it is already installed, and the Git repository = already >>>> exists for it? Or are we going to clone anew each time and them >>>> remove the repository? that could make its cloning be slow in some >>>> cases. >>>=20 >>> I have proposed just downloading a tarball. GitHub provides these = for >>> each tag, and the tree-sitter developers appear to tag versions on a >>> regular basis. The file could then be downloaded via url.el instead = of >>> using Git. >>>=20 >>> = https://github.com/tree-sitter/tree-sitter-c/archive/refs/tags/v0.20.2.tar= .gz >>=20 >> Not all language grammars would bother to make a release[1]. The = fallback method better support as many cases as possible. >>=20 >> [1] https://github.com/elixir-lang/tree-sitter-elixir >=20 > That doesn't have to be a blocker. We can download a tarball for each > commit, if an explicit release is missing. >=20 > = https://codeload.github.com/elixir-lang/tree-sitter-elixir/tar.gz/b20eaa75= 565243c50be5e35e253d8beb58f45d56 The command already requires a C/C++ compiler, in that case I don=E2=80=99= t think Git is too much to ask. The git url is much simpler for the user = to figure out IMO. Yuan=