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#70794: 30.0.50; Add Rust compilation regex Date: Fri, 31 May 2024 19:15:52 +0200 Message-ID: <16667D6C-F897-4A85-8C7A-0FA2E803FAA6@gmail.com> References: <87y18nsp84.fsf@aol.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22094"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70794@debbugs.gnu.org, Eli Zaretskii To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 31 19:18:23 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 1sD5tW-0005eC-Fk for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 May 2024 19:18:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD5t5-0002ax-Gg; Fri, 31 May 2024 13:17:55 -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 1sD5t1-0002ae-V2 for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 13:17:54 -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 1sD5t1-0002xA-JO for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 13:17:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sD5tC-0002Ge-Bs for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 13:18:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87y18nsp84.fsf@aol.com> Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 May 2024 17:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70794 X-GNU-PR-Package: emacs Original-Received: via spool by 70794-submit@debbugs.gnu.org id=B70794.17171758388665 (code B ref 70794); Fri, 31 May 2024 17:18:02 +0000 Original-Received: (at 70794) by debbugs.gnu.org; 31 May 2024 17:17:18 +0000 Original-Received: from localhost ([127.0.0.1]:55290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD5sU-0002Fh-DE for submit@debbugs.gnu.org; Fri, 31 May 2024 13:17:18 -0400 Original-Received: from mail-lf1-f42.google.com ([209.85.167.42]:55795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD5sO-0002FQ-Bl for 70794@debbugs.gnu.org; Fri, 31 May 2024 13:17:16 -0400 Original-Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52b89fcdcc7so1198833e87.3 for <70794@debbugs.gnu.org>; Fri, 31 May 2024 10:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717175755; x=1717780555; darn=debbugs.gnu.org; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=wuPS8H0FO4Rq8AajehLe+ZmQGm0jMxMZOpKN2ZTsGZI=; b=P7msn7oWmWa5lsJLV7DFP9Rn0MEHeRMN0/1En4Gyvz1JTGI3Ye/V/MSRFd8xcIidbm IeO3G7L6CSbkUTAsbUjKgU7JqskgfxiN/x1BnuC+asHGNdOCKQFv/WSfyOlGtoASpuFj ts0CEI+I3EaaWgCqCyHQxV18gKRSUN/wHtzhbA/NA/nUZsDLny0Xr4tBNISfTasSYGdw fqpmk1b8XHSt4Yz0SChYPLaHej+DkEo+4xzlot4Nwbh6lHCWpA/jakY8FWWiSizsHNWw X7NATlokANyfaus852EVBKDaNI3DtpKdjmd6Ho9F5qfzRWhH6dx1AyG0boW9ykniAA3k x0xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717175755; x=1717780555; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wuPS8H0FO4Rq8AajehLe+ZmQGm0jMxMZOpKN2ZTsGZI=; b=JownxIhhtxs72YAj/MKWKVMb1k1MBR11ju4aSaApsKSutUArQJDSWbjFK3cG7eBtC9 ep3vVGscnTRS0Se6K5mqWbw7PZrlIqPTufbqSFZrbgVuGE2iFFNqSi+mYXVDAIVdYrNj HOL97ynEGBb+atPAAzw27ITg/fhlBTMeetpuFbp7p0C/XJhr5ho2uF9V8lvpIw8+6lp+ 0PArl5yWzje6/CjVivWNY5VJgd8x2BwztV1aBZ9LccYJIbFWk0Wb28MVxOZGCasS0QlA ecwRo2l5+aqMcsF3HNJPzLyYsxBh0kgceL3c96NQ0Zez9+l1JE/Q2C5dN58wzauX97oG kNwg== X-Forwarded-Encrypted: i=1; AJvYcCUNPWfbxOVQCRA9iZaDvb60Tsi5/PNZmPQvrssswJXFJGJoaE5jEvr1m5qZGX1Kpj98z/pnYGn1/Ppsb2YKSQyGqCsAVDE= X-Gm-Message-State: AOJu0YwGj5BN+puVcVyLaRfGKLxVnV1UXBRBgq0dkJ+HKqjT9W+mFTpT NmouU7EKcLwWdx0oBr19zRjtPGuvHYuMipM4rk9xnxM7cp8XyeFS X-Google-Smtp-Source: AGHT+IERhqysld48yYhXXgFsN9orWu9KIY5se8SNyv+pqKJM+uOHgcHrz8aMhO/UcX76cLmmuYAnAw== X-Received: by 2002:a19:f804:0:b0:524:68f8:9566 with SMTP id 2adb3069b0e04-52b89597ca4mr1661997e87.30.1717175754780; Fri, 31 May 2024 10:15:54 -0700 (PDT) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b84d802afsm382518e87.208.2024.05.31.10.15.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2024 10:15:54 -0700 (PDT) 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:286290 Archived-At: Ergus, thank you for your contribution! Some questions, if you don't = mind: * There aren't any tests. If you care anything at all about your pattern = working, and keep working, you should add some. We'll help you out, of course, but it's probably best if you give it a = go yourself first so that we know exactly what you want to match. Take a = look at compile-tests.el, `compile-tests--test-regexps-data`. You will = also need to increase the expected counts at the end of = `compile-test-error-regexps`. * The regexp doesn't match the variant with error code inside square = brackets, the error[E0425]: cannot find function `ruun` in module `broot::cli` kind of message. Surely you intended it to? Here is your regexp again, translated to rx and with line numbers for = ease of discussion: 1 (rx (| (group-n 4 "error") (group-n 5 "warning")) 2 ":" 3 (+? (not (in "\x00"))) 4 "--> " 5 (group-n 1 (+ (not (in ":")))) 6 ":" 7 (group-n 2 (+ digit)) 8 ":" 9 (group-n 3 (+ digit))) * (Line 1): =46rom the examples it appears that the messages start at = the beginning of a line. We very much prefer to anchor matches for = reasons of performance and to avoid collisions with other patterns. How = about we add a line-start anchor at the very beginning? * (Line 3): This is an open-ended expression which will merrily match = just about anything including newlines. This can become very expensive. = And where does that NUL come from? In the examples you supplied, the message is on the first line, and the = " --> " on the start of the second. Can we rely on that? If not, what = can we rely on? * (Line 5): This excludes Windows file names which can include colon or = do cargo messages have a special notation for those? In any case, it's = usually a good idea to exclude newline as well to prevent a runaway = repetition. * Both the rust-mode and rustic packages appear to include regexps that = match the same messages. How do they compare to yours? What is the effect of someone using those modes with your regexp in = Emacs?