From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#60830: 30.0.50; The *Compilation* buffer does not recognize Lua errors Date: Fri, 6 Oct 2023 13:38:37 +0200 Message-ID: <4996E536-72CE-4E6A-9C75-CF7307A82469@gmail.com> References: <909EF5E1-6F30-4A35-84E8-2EF4333115FD@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) 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="18540"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60830@debbugs.gnu.org, Stefan Kangas , Stefan Monnier To: Rudolf =?UTF-8?Q?Adamkovi=C4=8D?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 06 13:40:50 2023 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 1qojCL-0004du-JM for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 06 Oct 2023 13:40:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qojBJ-0002px-NT; Fri, 06 Oct 2023 07:39: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 1qojBH-0002Vv-Kf for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2023 07:39:43 -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 1qojBH-0000j0-AX for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2023 07:39:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qojBZ-0006rC-Pe for bug-gnu-emacs@gnu.org; Fri, 06 Oct 2023 07:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Oct 2023 11:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60830 X-GNU-PR-Package: emacs Original-Received: via spool by 60830-submit@debbugs.gnu.org id=B60830.169659235226282 (code B ref 60830); Fri, 06 Oct 2023 11:40:01 +0000 Original-Received: (at 60830) by debbugs.gnu.org; 6 Oct 2023 11:39:12 +0000 Original-Received: from localhost ([127.0.0.1]:49333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qojAm-0006po-5X for submit@debbugs.gnu.org; Fri, 06 Oct 2023 07:39:12 -0400 Original-Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:48233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qojAe-0006pD-4j for 60830@debbugs.gnu.org; Fri, 06 Oct 2023 07:39:11 -0400 Original-Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2c28e35752cso25351701fa.0 for <60830@debbugs.gnu.org>; Fri, 06 Oct 2023 04:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696592319; x=1697197119; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=TAixaPe7AuDo2fQLDHiEe5UyK4AFWVO/X8rmhfDqlxs=; b=I7kwAuwcexqiyt7wk+h/4RBfIOcuGM7tEE/vx6ksgh5X+ll7mm9sx4UJ02l4XWIVR5 17Y8F8gE86yY41+R602oO3bpeZ475VjtWOWSleiR1e4M3lq4n9M1B+aaXJ1ZLf1jXesC CEgDst2kMN7QyGw5e2B3d9hb5q9WgUKTGR38NZp5D+s6md0Pg0rBVk8o7bmyZsYv5Tz7 VEm8pqx+wmopy3HSZMNpxBBRJZWyX0hOl7nycE0w45X8mWJpjo/g13G0mNEezseEcQsB 8h/KcXY9BbnN59E1jupQeV16S2J4Pc0hPMpL6fMT7Gf0WynM3CgGUDfM09YPwLGXdbyZ Q4zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696592319; x=1697197119; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TAixaPe7AuDo2fQLDHiEe5UyK4AFWVO/X8rmhfDqlxs=; b=BTEp136FouqWafPYspQ+9kJNbypx6zKJjCSMQQUHd/6patkXfb9wvHaqRYaUqi6FPI fCnlYnqEDYEtNmq1FGIpJOYDOYQ+R4wS6IZy+5sOacMb5u7iADrKyAlYsFQAILFEtfod iLEZpu3KYpJDWLIvdaBxUY3aqHm35BjEO7PQiefnswcFh6HSUjlarIuvEPA23ZrUev02 4xy3H18+kIyohJx5Vmyph8XxxgL8MEYaaCxzcGJVVKm2xhJzivO6vUOE2hg2YdCjmJur K59DQXn64zqYgm7WKSG039yy9GAe2yhf783leWM2ThScDR1aW6Vjc5x/ivVKXeML3Wyt 0TOw== X-Gm-Message-State: AOJu0YwSDEy+DduoQy9occ9TPP3H5RRoBA+ddw0S8qucOfxyMUnPdK5C owgwxD8VXXD/6cUqoczdtUw= X-Google-Smtp-Source: AGHT+IESOEmm4+Rs1zCbAhcoBtWEX5j8OLQM3JtayNq1mRyKH+SNAFhNhVU2h7IqAyG5wq57mpZtTw== X-Received: by 2002:a19:7b03:0:b0:500:aed0:cb1b with SMTP id w3-20020a197b03000000b00500aed0cb1bmr6632684lfc.24.1696592318896; Fri, 06 Oct 2023 04:38:38 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id z14-20020ac25dee000000b004f755ceafbcsm267430lfq.217.2023.10.06.04.38.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Oct 2023 04:38:37 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) 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:271939 Archived-At: 5 okt. 2023 kl. 18.21 skrev Rudolf Adamkovi=C4=8D : > So, I studied 'luaL_traceback' in 'lauxlib.c' in Lua and > made the regular expression more precise. No more mis-classification! That's the spirit! > /usr/bin/lua: database.lua:31: assertion failed! > stack traceback: > [C]: in function 'assert' > database.lua:31: in field 'statement' > database.lua:42: in field 'table' > database.lua:55: in field 'row' > database.lua:63: in field 'value' > database.lua:68: in main chunk > [C]: in ? Your rules incorrectly match "[C]" as a file name. This isn't just a = matter of aesthetics; the user must be able to step through matches = without tripping. As to your implementation: > (lua > "^[^:\n\t]+: \\([^: \n\t]+\\):\\([0-9]+\\): .*?\nstack = traceback:\n\t" > 1 2 nil 2 1) > (lua-stack > "^\t\\([^:\n\t]+\\):\\(\\([0-9]+\\):\\)? in " > 1 3 nil 0 1) I see no reason for the non-greedy match in the first regexp, do you? We try to make rules work with Windows file names (or names containing = spaces, which are also somewhat common on Windows) where relevant and = practical. Your patterns don't; can you argue that it's not useful for = Lua or not possible to do so? Don't keep capture groups that you don't use. (If you use rx then you = don't have to think about it. If you don't, I'm probably going to = translate your regexp to rx anyway.) I'm still erring on having these rules disabled by default because they = seem very close to unrelated compiler output. Would that be a major = inconvenience? > While on it, I also added support for stack frames with no line > number, as per Lua source code. That doesn't result in anything useful as far as I can tell. > Lastly, I added a NEWS entry, as well > as, improved the commit message a bit. Please include an addition to etc/compilation.txt as well.