From unknown Sun Jun 22 15:27:04 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77213: go-ts-mode trying to treesit-ready-p gomod without quiet Resent-From: Gergely =?UTF-8?Q?Risk=C3=B3?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Mar 2025 17:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77213 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 77213@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174275195424845 (code B ref -1); Sun, 23 Mar 2025 17:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Mar 2025 17:45:54 +0000 Received: from localhost ([127.0.0.1]:52477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1twPOT-0006Se-Ao for submit@debbugs.gnu.org; Sun, 23 Mar 2025 13:45:53 -0400 Received: from lists.gnu.org ([2001:470:142::17]:43038) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1twNgv-0002js-1N for submit@debbugs.gnu.org; Sun, 23 Mar 2025 11:56:50 -0400 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 1twNgm-0006Lr-MF for bug-gnu-emacs@gnu.org; Sun, 23 Mar 2025 11:56:41 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1twNgk-0000AN-Bk for bug-gnu-emacs@gnu.org; Sun, 23 Mar 2025 11:56:40 -0400 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-3014cb646ecso4426245a91.1 for ; Sun, 23 Mar 2025 08:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742745396; x=1743350196; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=5YV7u4ArePgpkJODje11VFhSrkXCjtTRIZpy8A7shOY=; b=b3mKGtFhdWxel0+1yN6R4/cQ15Cyv3YpvwiLqdPOnRIDY7iSTsbWsdjMbuylwD8EY5 cgA8ABTxOfW659DtPCYnOt2wDIm8Iax4Jgqy+lfKLVEMY+j5qBgMcCxZam5yjiSE0wUc QwcyRqTSOTJ91/jPGJSxWAAQ73CdJkDuCbGwYQKqVUbfxfs2ca+HKPpHkRDoPPrSK2JY W6XAf9xs05W6sR/1vI9obh8GxC6kNhSwePvpGCAetFceunHOomZB/2u8i1hS2lHgdHGU PoPI8V/7VY6xwhwi4xldtFgEfyAchDt9f/L1gewz0CuOsbs9ysAq1miKvalIP9Cgi8kI Yxaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742745396; x=1743350196; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5YV7u4ArePgpkJODje11VFhSrkXCjtTRIZpy8A7shOY=; b=u453X9EMgTCcqKIjWcjWGr/O9n0yIp/LK0VDmJWmma6wkh6j4EE14RdKn0kVtfuTLt NGKXHo5SrAgxC+QJU3uanwW3Hy7cDiOlHToFSF499HzIsaLuoHoFonCqG9JewbWNcdWg tFehXt6ZamiXwxkCYg+rn0QtRwIIUr6+zHpEdaze8oHvYOqbdlLvJygLdJtUlskL13Df cidjm6yfRu1kdJRgvVa0xYa2J4EQNZHnq5+gJx720FHESqxDCje+U3+nHE63MN91rDyc ZeYLAX/XLKu5LjDIZScNgogonSsQzSRaOPAwClKw13msnAEw/YxaFWgfRVaCzZ+JhArh H4UA== X-Gm-Message-State: AOJu0Yy96AsFUfKU8ApP2htrMsL4s+Ei4ZK33AxVDYbG8ApLYjFsbSno kDX0RuF3ZOauSjmllHsKKjKIlu16rsbZ3Vp1nA1/+B93k+sSWmCjk/3g7gElezn/TJxpyasWkP7 VeqYFkKeYjLXwmHSDA9cB8s6tjWgzMtj5 X-Gm-Gg: ASbGnctk5qC8vwGdS3Qgw1ZXd+z7alnIHTYlR3k9tsX5KxxMNi7Z8hdFvSHSSLjIYnS UQ7QrP1RtcDM4ah+0jicYXRn2wKz0Q4PQ5rbr7bLzWwn08aQRVugE3XTb/PfpdQpJtar00eb3U+ tzw1llYXuJsrIH3YDsTdWu/Kjij2x2gQ== X-Google-Smtp-Source: AGHT+IE1Z9n6bg6Y4XlsC5BSxzTN1d0Ar3uYvXrd404Dct0O/uN/gftuR0ag8MGbfHZ9+XTRB2C8Y9E4lqJ0nsTiH0E= X-Received: by 2002:a17:90b:1a87:b0:2ee:ed1c:e451 with SMTP id 98e67ed59e1d1-3030fe94750mr16244274a91.15.1742745395608; Sun, 23 Mar 2025 08:56:35 -0700 (PDT) MIME-Version: 1.0 From: Gergely =?UTF-8?Q?Risk=C3=B3?= Date: Sun, 23 Mar 2025 16:56:24 +0100 X-Gm-Features: AQ5f1Jolka6QD8QCb_u9PMEsiy55RRv6fbmynbiGUL3Mn8fQn5MvX5trPYu4tf4 Message-ID: Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=gergely.risko@gmail.com; helo=mail-pj1-x102a.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-Spam-Score: 1.0 (+) X-Mailman-Approved-At: Sun, 23 Mar 2025 13:45:52 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hey, In the last 2 lines of go-ts-mode.el we have this: (if (treesit-ready-p 'gomod) (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode))) This is problematic, because the treesitter go shared library can be available when the gomod shared library is not. (E.g. the official treesit bundle behaves like that.) Now, this call to treesit-ready-p without the quiet flag causes a warning, that might frighten the user and might send the message that even their go configuration is somehow broken (and it's not). The easy fix would be to just add the quiet flag here, and I think that should be done as soon a possible. But conceptually speaking, I'm not 100% sure that it's a good idea that gomod and go are so tightly coupled in the same file. Editing go files is much more frequent while programming than editing gomod files. If there are any issues with gomod (like now), it would be cool to be able to just turn it off (e.g. removing from auto-mode-alist), instead of it being force-loaded just because it's the same file as go-mode. Cheers, Gergely From unknown Sun Jun 22 15:27:04 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Gergely =?UTF-8?Q?Risk=C3=B3?= Subject: bug#77213: closed (Re: bug#77213: go-ts-mode trying to treesit-ready-p gomod without quiet) Message-ID: References: <86jz8886ma.fsf@gnu.org> X-Gnu-PR-Message: they-closed 77213 X-Gnu-PR-Package: emacs Reply-To: 77213@debbugs.gnu.org Date: Sat, 29 Mar 2025 10:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1743244742-32442-1" This is a multi-part message in MIME format... ------------=_1743244742-32442-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #77213: go-ts-mode trying to treesit-ready-p gomod without quiet which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 77213@debbugs.gnu.org. --=20 77213: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77213 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1743244742-32442-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 77213-done) by debbugs.gnu.org; 29 Mar 2025 10:38:03 +0000 Received: from localhost ([127.0.0.1]:57070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tyTZi-0008Oy-9V for submit@debbugs.gnu.org; Sat, 29 Mar 2025 06:38:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34682) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tyTZf-0008OJ-KO for 77213-done@debbugs.gnu.org; Sat, 29 Mar 2025 06:38:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tyTZa-0006Z1-4J; Sat, 29 Mar 2025 06:37:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=2ppiVgLxga2W4BF/JRdGj9u7r5SNQuoUtrqdCZwL5Co=; b=K4KnkaHxp/+0PiDHyLNw ZVHDnVynG88BF/IcfelrxLZGHdhIYaaLjsbrDqN684hQtFUGxnNFJGL41jNP6p8Z2h03sa5AR51aA jwLvnHpFFc9juuvXJhHmMg4nSVFK/coLl9KXJTHJq6kF/xvLyxU22gdLbxal2Gm2oPzJHHchgeWxT y0yEkxfJ+5dc+Ci0r6AydWOpEyoDRPoOw8gm3DNaejDZvwySoCX2hHaEHUhy/HGQKgnx5GBucnrEl cC5zAMfx4C9FXWFcWxYuGDoAk8+Gg+l6Q6G+9b9s1gdvsR2qMCgwxohHnUajYfgCgyCuGadLkSUv3 7x4Xm1Vs6cz+LQ==; Date: Sat, 29 Mar 2025 13:37:49 +0300 Message-Id: <86jz8886ma.fsf@gnu.org> From: Eli Zaretskii To: Gergely =?utf-8?Q?Risk=C3=B3?= In-Reply-To: (message from Gergely =?utf-8?Q?Risk=C3=B3?= on Sun, 23 Mar 2025 16:56:24 +0100) Subject: Re: bug#77213: go-ts-mode trying to treesit-ready-p gomod without quiet References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77213-done Cc: 77213-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gergely Riskó > Date: Sun, 23 Mar 2025 16:56:24 +0100 > > Hey, > > In the last 2 lines of go-ts-mode.el we have this: > > (if (treesit-ready-p 'gomod) > (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode))) > > This is problematic, because the treesitter go shared library can be > available when the gomod shared library is not. (E.g. the official > treesit bundle behaves like that.) > > Now, this call to treesit-ready-p without the quiet flag causes a > warning, that might frighten the user and might send the message that > even their go configuration is somehow broken (and it's not). > > The easy fix would be to just add the quiet flag here, and I think > that should be done as soon a possible. Thanks, now done on the emacs-30 release branch. > But conceptually speaking, I'm not 100% sure that it's a good idea > that gomod and go are so tightly coupled in the same file. Editing go > files is much more frequent while programming than editing gomod > files. If there are any issues with gomod (like now), it would be > cool to be able to just turn it off (e.g. removing from > auto-mode-alist), instead of it being force-loaded just because it's > the same file as go-mode. I didn't do this part, because if the gomod library is available, I see no reason to disable it. ------------=_1743244742-32442-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Mar 2025 17:45:54 +0000 Received: from localhost ([127.0.0.1]:52477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1twPOT-0006Se-Ao for submit@debbugs.gnu.org; Sun, 23 Mar 2025 13:45:53 -0400 Received: from lists.gnu.org ([2001:470:142::17]:43038) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1twNgv-0002js-1N for submit@debbugs.gnu.org; Sun, 23 Mar 2025 11:56:50 -0400 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 1twNgm-0006Lr-MF for bug-gnu-emacs@gnu.org; Sun, 23 Mar 2025 11:56:41 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1twNgk-0000AN-Bk for bug-gnu-emacs@gnu.org; Sun, 23 Mar 2025 11:56:40 -0400 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-3014cb646ecso4426245a91.1 for ; Sun, 23 Mar 2025 08:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742745396; x=1743350196; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=5YV7u4ArePgpkJODje11VFhSrkXCjtTRIZpy8A7shOY=; b=b3mKGtFhdWxel0+1yN6R4/cQ15Cyv3YpvwiLqdPOnRIDY7iSTsbWsdjMbuylwD8EY5 cgA8ABTxOfW659DtPCYnOt2wDIm8Iax4Jgqy+lfKLVEMY+j5qBgMcCxZam5yjiSE0wUc QwcyRqTSOTJ91/jPGJSxWAAQ73CdJkDuCbGwYQKqVUbfxfs2ca+HKPpHkRDoPPrSK2JY W6XAf9xs05W6sR/1vI9obh8GxC6kNhSwePvpGCAetFceunHOomZB/2u8i1hS2lHgdHGU PoPI8V/7VY6xwhwi4xldtFgEfyAchDt9f/L1gewz0CuOsbs9ysAq1miKvalIP9Cgi8kI Yxaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742745396; x=1743350196; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5YV7u4ArePgpkJODje11VFhSrkXCjtTRIZpy8A7shOY=; b=u453X9EMgTCcqKIjWcjWGr/O9n0yIp/LK0VDmJWmma6wkh6j4EE14RdKn0kVtfuTLt NGKXHo5SrAgxC+QJU3uanwW3Hy7cDiOlHToFSF499HzIsaLuoHoFonCqG9JewbWNcdWg tFehXt6ZamiXwxkCYg+rn0QtRwIIUr6+zHpEdaze8oHvYOqbdlLvJygLdJtUlskL13Df cidjm6yfRu1kdJRgvVa0xYa2J4EQNZHnq5+gJx720FHESqxDCje+U3+nHE63MN91rDyc ZeYLAX/XLKu5LjDIZScNgogonSsQzSRaOPAwClKw13msnAEw/YxaFWgfRVaCzZ+JhArh H4UA== X-Gm-Message-State: AOJu0Yy96AsFUfKU8ApP2htrMsL4s+Ei4ZK33AxVDYbG8ApLYjFsbSno kDX0RuF3ZOauSjmllHsKKjKIlu16rsbZ3Vp1nA1/+B93k+sSWmCjk/3g7gElezn/TJxpyasWkP7 VeqYFkKeYjLXwmHSDA9cB8s6tjWgzMtj5 X-Gm-Gg: ASbGnctk5qC8vwGdS3Qgw1ZXd+z7alnIHTYlR3k9tsX5KxxMNi7Z8hdFvSHSSLjIYnS UQ7QrP1RtcDM4ah+0jicYXRn2wKz0Q4PQ5rbr7bLzWwn08aQRVugE3XTb/PfpdQpJtar00eb3U+ tzw1llYXuJsrIH3YDsTdWu/Kjij2x2gQ== X-Google-Smtp-Source: AGHT+IE1Z9n6bg6Y4XlsC5BSxzTN1d0Ar3uYvXrd404Dct0O/uN/gftuR0ag8MGbfHZ9+XTRB2C8Y9E4lqJ0nsTiH0E= X-Received: by 2002:a17:90b:1a87:b0:2ee:ed1c:e451 with SMTP id 98e67ed59e1d1-3030fe94750mr16244274a91.15.1742745395608; Sun, 23 Mar 2025 08:56:35 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?Q?Gergely_Risk=C3=B3?= Date: Sun, 23 Mar 2025 16:56:24 +0100 X-Gm-Features: AQ5f1Jolka6QD8QCb_u9PMEsiy55RRv6fbmynbiGUL3Mn8fQn5MvX5trPYu4tf4 Message-ID: Subject: go-ts-mode trying to treesit-ready-p gomod without quiet To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=gergely.risko@gmail.com; helo=mail-pj1-x102a.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-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 23 Mar 2025 13:45:52 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hey, In the last 2 lines of go-ts-mode.el we have this: (if (treesit-ready-p 'gomod) (add-to-list 'auto-mode-alist '("/go\\.mod\\'" . go-mod-ts-mode))) This is problematic, because the treesitter go shared library can be available when the gomod shared library is not. (E.g. the official treesit bundle behaves like that.) Now, this call to treesit-ready-p without the quiet flag causes a warning, that might frighten the user and might send the message that even their go configuration is somehow broken (and it's not). The easy fix would be to just add the quiet flag here, and I think that should be done as soon a possible. But conceptually speaking, I'm not 100% sure that it's a good idea that gomod and go are so tightly coupled in the same file. Editing go files is much more frequent while programming than editing gomod files. If there are any issues with gomod (like now), it would be cool to be able to just turn it off (e.g. removing from auto-mode-alist), instead of it being force-loaded just because it's the same file as go-mode. Cheers, Gergely ------------=_1743244742-32442-1--