From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= Newsgroups: gmane.emacs.bugs Subject: bug#70797: [PATCH] Make the Compilation mode recognize non-legacy Kotlin/Gradle errors Date: Mon, 06 May 2024 00:14:04 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10735"; mail-complaints-to="usenet@ciao.gmane.io" To: 70797@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 06 09:11:45 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1s3sVk-0002bQ-5F for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 May 2024 09:11:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3sVa-0000Me-Hr; Mon, 06 May 2024 03:11:34 -0400 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 1s3sUh-0000AG-Sa for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 03:10:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s3sUh-0006jV-Ab for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 03:10:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3sV4-0005W8-8N for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 03:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2024 07:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171497943921187 (code B ref -1); Mon, 06 May 2024 07:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 May 2024 07:10:39 +0000 Original-Received: from localhost ([127.0.0.1]:36178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3sUd-0005Vc-Tm for submit@debbugs.gnu.org; Mon, 06 May 2024 03:10:39 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:51398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3k84-0008An-3H for submit@debbugs.gnu.org; Sun, 05 May 2024 18:14:45 -0400 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 1s3k7Z-0007zm-Mb for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 18:14:14 -0400 Original-Received: from wfout4-smtp.messagingengine.com ([64.147.123.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3k7X-0008Ds-EV for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 18:14:13 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.west.internal (Postfix) with ESMTP id 538401C0010D for ; Sun, 5 May 2024 18:14:08 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 05 May 2024 18:14:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamkovic.org; h=cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm1; t=1714947247; x=1715033647; bh=OOvKICg5qQryx1KnkMdtfMmadQCnwnDD pLRxhzf2X38=; b=d6yrlSJkD6olwL7PsZsAIbaJGOGcttcUAntH87qNxxuvineT 8KKoFHB3Av40br5nYiMyROYInJ3XJ/Uz+uazePSyfG9LixJHA/zpEQVn8kF32lfm JEF8f9/xKvvoEMKcUob8ytvCHk4WoybTm3mrtCU2y32SHzIhiKZNs52vAjTS8uIM +SC3tN7BM7mBc2wvrCJOeLANACJXmp5foSDYedHKV0djD16zFsJjsGaydJVwvPdr EwWavEGqBdY+aZsg0/bW8MnnGPa9uMqDGFhGGMWXGUjyyOcAGnqCfuXfqtDzzZER YqMYhcubuAmu6gZqpRpnbwTrcalKVgUpBX5JCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1714947247; x=1715033647; bh=OOvKICg5qQryx1KnkMdtfMmadQCnwnDDpLR xhzf2X38=; b=PzyC7krUI2Kr2VdEZTHwiFmjkeYdEaqmMw9oVfKFK/2Oo8VoU+M PiQ5x39A+7UvktsUHY2Rf+Zz+HlXr/pwvKtRpY/ENQSF12A4eqUOlOok+ixXOTTA sfqaJu/x0oCmDclTYqS1/x/EA1XrplR/XDh+zM62tMy3bZ9G3oqSrDd/YD6sZ2y2 dQMrENvVoNUafRCqBbojHiaXOY6obUwOLykOJ33+ar/2rRhkojC/Fq7yQWhzZImL eqRSqCEge+eMsVO4jRzdONoGFgwih40EyXg52eE3qX935dnMBTqdGkdqF4DbWUGa gGAS8u9SaxJ7z2c/pcA1OOReHj45wKIsHnA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvhedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehmtderredttd ejnecuhfhrohhmpeftuhguohhlfhcutegurghmkhhovhhitgcuoehruhguohhlfhesrggu rghmkhhovhhitgdrohhrgheqnecuggftrfgrthhtvghrnhepffekfeeuudeftdekveejje evteffudetjeetgedtffduuedvjeekvdejueeiveffnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprhhuugholhhfsegruggrmhhkohhvihgtrd horhhg X-ME-Proxy: Feedback-ID: i88214938:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 5 May 2024 18:14:07 -0400 (EDT) Received-SPF: pass client-ip=64.147.123.147; envelope-from=rudolf@adamkovic.org; helo=wfout4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 06 May 2024 03:10:34 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284563 Archived-At: --=-=-= Content-Type: text/plain Tags: patch --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Make-the-Compilation-mode-recognize-non-legacy-Kotli.patch >From 8ff95a02a321d730e2c3171b18ddb55f3a554d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= Date: Thu, 2 May 2024 19:06:11 +0200 Subject: [PATCH] Make the Compilation mode recognize non-legacy Kotlin/Gradle errors The Compilation mode recognizes Kotlin/Gradle errors but only in the old format. The new format, which has been in wide use for about a year, is not supported. This patch adds support for the new format. * etc/compilation.txt: (symbols): Add a non-legacy Kotlin/Gradle warning and error. * lisp/progmodes/compile.el: (compilation-error-regexp-alist-alist): Rename 'gradle-kotlin' to 'gradle-kotlin-legacy' and add 'grade-kotlin' that matches errors and warnings outputted by non-legacy Kotlin/Gradle. --- etc/compilation.txt | 13 +++++++++++-- lisp/progmodes/compile.el | 20 +++++++++++++++++--- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/etc/compilation.txt b/etc/compilation.txt index 05f0829864c..e4e361ecfc7 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -186,13 +186,22 @@ Warning near line 10 file arrayclash.f: Module contains no executable Nonportable usage near line 31 col 9 file assign.f: mixed default and explicit -* Gradle with kotlin-gradle-plugin +* Gradle with Kotlin plugin -symbol: gradle-kotlin +symbol: grade-kotlin + +e: file:///src/Test.kt:267:5 foo: bar +w: file:///src/Test.kt:267:5 foo: bar + + +* Gradle with Kotlin plugin (legacy) + +symbol: gradle-kotlin-legacy e: /src/Test.kt: (34, 15): foo: bar w: /src/Test.kt: (34, 15): foo: bar + * Gradle Android resource linking symbol: gradle-android diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index b18eb81fee1..76a89bea4fc 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -258,10 +258,24 @@ compilation-error-regexp-alist-alist "\\(^Warning .*\\)? line[ \n]\\([0-9]+\\)[ \n]\\(?:col \\([0-9]+\\)[ \n]\\)?file \\([^ :;\n]+\\)" 4 2 3 (1)) - ;; Gradle with kotlin-gradle-plugin (see - ;; GradleStyleMessagerRenderer.kt in kotlin sources, see - ;; https://youtrack.jetbrains.com/issue/KT-34683). (gradle-kotlin + ,(rx bol + (| (group "w") ; 1: warning + (group (in "iv")) ; 2: info + "e") ; error + ": " + "file://" + (group ; 3: file + (? (in "A-Za-z") ":") + (+ (not (in "\n:")))) + ":" + (group (+ digit)) ; 4: line + ":" + (group (+ digit)) ; 5: column + " ") + 3 4 5 (1 . 2)) + + (gradle-kotlin-legacy ,(rx bol (| (group "w") ; 1: warning (group (in "iv")) ; 2: info -- 2.39.3 (Apple Git-146) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 "All you have to do is write one true sentence. Write the truest sentence that you know." --- Ernest Miller Hemingway (1899-1961) Rudolf Adamkovi=C4=8D [he/him] Studenohorsk=C3=A1 25, 84103 Bratislava, Slovakia, European Union --=-=-=--