From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64985: 29.1; [PATCH] Byte-compilation of packages via package-vc doesn't correctly handle .elpaignore wildcards Date: Tue, 01 Aug 2023 14:21:59 +0300 Message-ID: <83sf930zzc.fsf@gnu.org> References: <8e555eb8-529d-d11c-66c7-bd16f5d45be7@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12400"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64985@debbugs.gnu.org To: Jim Porter , Philip Kaludercic , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 01 13:23:46 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 1qQnTe-0002zp-8x for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Aug 2023 13:23:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQnT1-0001fr-7E; Tue, 01 Aug 2023 07:23:07 -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 1qQnSx-0001fd-5S for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 07:23:03 -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 1qQnSw-0007YZ-T3 for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 07:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qQnSw-0004XE-OM for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 07:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Aug 2023 11:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64985 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64985-submit@debbugs.gnu.org id=B64985.169088892517347 (code B ref 64985); Tue, 01 Aug 2023 11:23:02 +0000 Original-Received: (at 64985) by debbugs.gnu.org; 1 Aug 2023 11:22:05 +0000 Original-Received: from localhost ([127.0.0.1]:47259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQnS1-0004Vi-AV for submit@debbugs.gnu.org; Tue, 01 Aug 2023 07:22:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQnRy-0004VB-VF for 64985@debbugs.gnu.org; Tue, 01 Aug 2023 07:22:03 -0400 Original-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 1qQnRs-0007Q4-MI; Tue, 01 Aug 2023 07:21:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qbgWeox0Q3y9qArklz5iJ+YtLYcChPuRBshmhHXODcc=; b=Ew3cOwWM5m+Q ZiOC9lORhTWzI/+oLaq6s/B2GPKSxxm+TM+ta2uoVqe4fYyBfeoY6spQ48snBI8KE/1PtAloLero6 yTkHLRUwqdxF2p6D4u2l7lUsJwDDN9av8aNlH+Gx0Cmn2K1E6Iczujo2HruKBSj/WzkoM1Hn0E6WV gvLEaxGtdCSKwMho8xIgiQ3TTPX6aeJ0Dx1VM5vsGV2XHFVXNWv7CMW2tJt5O6qVlC5EV5d5A1HkE JApSF7LrmfSZJLZRz+1AaCVYz11+s6QX/O4hfAy5TuNQjcKcCw3D9EQlvggiobuaG9/aGy4bXSfcd aKm/RBMjNQ/+LwmM9W48+w==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qQnRs-0000r7-4r; Tue, 01 Aug 2023 07:21:56 -0400 In-Reply-To: <8e555eb8-529d-d11c-66c7-bd16f5d45be7@gmail.com> (message from Jim Porter on Mon, 31 Jul 2023 23:20:21 -0700) 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:266442 Archived-At: > Date: Mon, 31 Jul 2023 23:20:21 -0700 > From: Jim Porter > > When using the various package-vc installation functions, Emacs > byte-compiles the source (good). However, it doesn't ignore sources that > match wildcards in ".elpaignore" (bad). That's because, even though > 'byte-compile-ignore-files' is documented to be a list of regexps, > 'byte-recompile-directory' treats it as a list of strings. > > To reproduce this, install a package via VC, for example via M-x > package-vc-install RET https://github.com/jimporter/urgrep.git RET. Then > notice how "urgrep-tests.el" got compiled, even though it matches a > wildcard in ".elpaignore". > > Patch attached to fix this. Eli, would this be safe enough for 29.2? > 'byte-compile-ignore-files' is a new feature in 29.1, so hopefully no > one else is relying on its current semantics just yet. If Philip and Stefan agree with the patch, I don't mind installing it on the release branch. byte-compile-ignore-files is (a) not documented anywhere except in its doc string, and (b) is a defvar, so kind-of internal. So who will tell us whether the doc string is right and the code wrong, or the other way around? Btw, do we have somewhere the documentation of all those features, including the .elpaignore file and what it can include? I don't see this documented anywhere, so it's a small wonder people make such mistakes (if they are mistakes).