From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sOa+E2A94mPiRgEAbAwnHQ (envelope-from ) for ; Tue, 07 Feb 2023 13:00:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EEqXE2A94mN2CwAAauVa8A (envelope-from ) for ; Tue, 07 Feb 2023 13:00:32 +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 0844D10F09 for ; Tue, 7 Feb 2023 13:00:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPMdn-0001CU-Vo; Tue, 07 Feb 2023 07:00:04 -0500 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 1pPMdm-0001By-Ld for guix-patches@gnu.org; Tue, 07 Feb 2023 07:00:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPMdm-0001Kw-CW for guix-patches@gnu.org; Tue, 07 Feb 2023 07:00:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pPMdm-0003Ap-88 for guix-patches@gnu.org; Tue, 07 Feb 2023 07:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#49946] [PATCH 00/31] Tree-sitter, node-gyp addon support and emacs-tree-sitter Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Feb 2023 12:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49946 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Pierre Langlois Cc: 49946@debbugs.gnu.org Received: via spool by 49946-submit@debbugs.gnu.org id=B49946.167577114312093 (code B ref 49946); Tue, 07 Feb 2023 12:00:02 +0000 Received: (at 49946) by debbugs.gnu.org; 7 Feb 2023 11:59:03 +0000 Received: from localhost ([127.0.0.1]:51386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPMco-00038t-NC for submit@debbugs.gnu.org; Tue, 07 Feb 2023 06:59:03 -0500 Received: from mail-wm1-f45.google.com ([209.85.128.45]:45869) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPMcm-00038H-6U for 49946@debbugs.gnu.org; Tue, 07 Feb 2023 06:59:01 -0500 Received: by mail-wm1-f45.google.com with SMTP id m16-20020a05600c3b1000b003dc4050c94aso11249546wms.4 for <49946@debbugs.gnu.org>; Tue, 07 Feb 2023 03:59:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=l40FpR9KUNOlCoVZN6+Vo7LY7W8lf04JRbvtLofe7tg=; b=Gii7gYBLhFM1yTC7X7ciAnSwKhFXmqGBmOE/NNaxs55PefhrSax4PprXue6p/ld7oH a9YoGAIeXyepWrTzX+ODfJeGHFKUuPcQUm8pwXQDq2mQ4VCxnyj0Aja1fliqgR1ECHCx 9JQCwDklhMK/5f6RzHUi1z/gQbj2skcAsvocPN6kKaiOiVBkeraCT+cSiuVVmbo4N3B4 R9e1wEY5CPGP4BTWaIWBSQilOHK/ppisN4g/1KDIT3jThe/I5GSg+wSgJUYt3VXMbP/N 7UD/76h+b3S5KgHuuQOPC4Szohi1f0jEYfysOJ46l4oG0Ji5CK5Zl59MaRBrKhHNshil sWGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=l40FpR9KUNOlCoVZN6+Vo7LY7W8lf04JRbvtLofe7tg=; b=6f9YFhw2tGmhY8uvcLROolHsajQjHEBDC4TuH7cJ9NnjrGYQsHn5hm3rHJLoNXBNSb 8IwsfKg4Ac2p32KsWsnjOexky3uiZYmkEiXCeoOHuBMhetWQlquWNTjv280y2km+t5dM bVKHCG59zpHHzNo3t+XBcoDLvR9N9F+UXelB5YgS5VieZWnt17nBMffoZiGcfiyt07+1 LhuXEB+55xIxEhqVd5VlaI4urtSjQ/Zup1H1N1gxAPY5ma2tuPgsE4AStOEY215/6oLJ 29hqJEM6ha+jQSCNi7qT4b//XURFpITVLi977/OQBAoJ1quddalmnfcWLgoOdXiEys7Y xMhQ== X-Gm-Message-State: AO0yUKWrTpwI2dHLmlmlCb3FUyaFHyJsoqiKJXXB8f5ItdWhaxC428bT w1QZhYT8WqZNhK0wHaE8zKfYdSHDDMhY5Q== X-Google-Smtp-Source: AK7set/SZcY6D+BVXf8TqWRkOJARvhL5aTPZMgiRkH3SELwEtfkH9v4xvlVQTHm8CbfdjiN8MACT+A== X-Received: by 2002:a05:600c:511c:b0:3dc:3398:cf65 with SMTP id o28-20020a05600c511c00b003dc3398cf65mr3518085wms.2.1675771134268; Tue, 07 Feb 2023 03:58:54 -0800 (PST) Received: from lili ([81.255.72.129]) by smtp.gmail.com with ESMTPSA id l20-20020a05600c089400b003dc41a9836esm13235434wmp.43.2023.02.07.03.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 03:58:53 -0800 (PST) From: zimoun References: <87mtfi63ut.fsf@gmx.com> <20221125012142.22579-1-pierre.langlois@gmx.com> <20221125012142.22579-7-pierre.langlois@gmx.com> <87r0xrcpei.fsf@gmx.com> Date: Tue, 07 Feb 2023 12:25:50 +0100 In-Reply-To: <87r0xrcpei.fsf@gmx.com> (Pierre Langlois's message of "Fri, 25 Nov 2022 01:57:21 +0000") Message-ID: <864jrxogxt.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Gii7gYBL; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675771232; a=rsa-sha256; cv=none; b=dKAYwsIVgOp+Yo6fdrIEwNvHUNG38wA8TcMckyebRjUEJA8wis2PHW0F8iLF8cd0j6jVHk sfcrXXeneAfMDxA/SPgdGiJDkBZgbEtFAxcjVXIgGeqhgLRBZIQz3/SxQ3pS8TE/LRdTuX 3svG09Jw09nj2UfwRd46o1xjzOsmIlyxIhSDohrmiIXRpm3t/mDUNOcU1YwCUd7gmHU7yD VVHEe3nj9Xt0vWxNK1+zwrbKqorpCy6rMRjR9oRtW5linWzUwK3O1TlbeNzajSkpScwnMC jCaQpwoPHcrok+TfjPU68d58qJfQ5GSIMVRm6p/FuV+j7kQg3o/BnegXZhP3Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675771232; 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=l40FpR9KUNOlCoVZN6+Vo7LY7W8lf04JRbvtLofe7tg=; b=YsoytrxKjDaowIsS/n7Mj34nQ+d84aZknNNDX9o/EdEJj1hrOP0gvLGl5B6FxRjeYubXVM x8q3iin+L6gtkrfMEe7Nw5nyLCN3H8IolC7NnT+4LgmUIvACVulhTv+Z2qzOUuMMni8r8f yZJRobKN7wd4c+JxnNJmt25FvcA0hm7butubI99AeRkzj+5mSA9nLv5/UgvauM0HT3UFLM C8iWQOJshC1C0mVv51NhhPFmTCYZZFjdk6fdjmMel8Mpd+WDCmgJLRZdONxZeLdHkXQhws uHl2qdpM8a8FOgFoA58uZoMMfL/DtjUkE+8dehQw/JJqZwr+FUccBAImO7pw/Q== X-Migadu-Spam-Score: -1.99 X-Spam-Score: -1.99 X-Migadu-Queue-Id: 0844D10F09 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Gii7gYBL; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-TUID: ZWPU5XBq8MbF Hi, Sorry, I have totally overlooked this tree-sitter story. :-) And I have not read all the patch versions and thread yet. On Fri, 25 Nov 2022 at 01:57, Pierre Langlois wro= te: > +(define* (install #:key target grammar-directories outputs #:allow-other= -keys) > + (let ((lib (string-append (assoc-ref outputs "out") > + "/lib/tree-sitter"))) > + (mkdir-p lib) > + (define (compile-language dir) > + (with-directory-excursion dir > + (let ((lang (assoc-ref (call-with-input-file "src/grammar.json" > + read-json) > + "name")) > + (source-file (lambda (path) > + (if (file-exists? path) > + path > + #f)))) > + (apply invoke > + `(,(if target > + (string-append target "-g++") > + "g++") Why is g++ required? Is gcc not enough? I thought from Tree-sitter documentation that it was only using C files and not C++; but=E2=80=A6 > + "-shared" > + "-fPIC" > + "-fno-exceptions" > + "-O2" > + "-g" > + "-o" ,(string-append lib "/" lang ".so") > + ;; An additional `scanner.{c,cc}' file is sometimes > + ;; provided. > + ,@(cond > + ((source-file "src/scanner.c") > + =3D> (lambda (file) (list "-xc" "-std=3Dc99" file= ))) > + ((source-file "src/scanner.cc") =E2=80=A6apparently not. Cheers, simon