From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#64985: 29.1; [PATCH] Byte-compilation of packages via package-vc doesn't correctly handle .elpaignore wildcards Date: Mon, 31 Jul 2023 23:20:21 -0700 Message-ID: <8e555eb8-529d-d11c-66c7-bd16f5d45be7@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------0YBeEpaFCClTbTacSBedp7LF" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3092"; mail-complaints-to="usenet@ciao.gmane.io" To: 64985@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 01 08:21:20 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 1qQiky-0000cs-29 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Aug 2023 08:21:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qQikh-0008HH-T1; Tue, 01 Aug 2023 02:21:03 -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 1qQikg-0008Gz-Sh for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 02:21:02 -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 1qQikg-0004B2-J3 for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 02:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qQikg-00057H-FC for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 02:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Aug 2023 06:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64985 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.169087083419615 (code B ref -1); Tue, 01 Aug 2023 06:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2023 06:20:34 +0000 Original-Received: from localhost ([127.0.0.1]:47013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQikE-00056J-Cz for submit@debbugs.gnu.org; Tue, 01 Aug 2023 02:20:34 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:53588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qQikD-000566-BQ for submit@debbugs.gnu.org; Tue, 01 Aug 2023 02:20:33 -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 1qQik8-0008BW-1E for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 02:20:28 -0400 Original-Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qQik6-000435-5z for bug-gnu-emacs@gnu.org; Tue, 01 Aug 2023 02:20:27 -0400 Original-Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-686bc261111so3771160b3a.3 for ; Mon, 31 Jul 2023 23:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690870824; x=1691475624; h=subject:from:to:content-language:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=oJc13hxy21DqKxvcuUZkjkJd+BudhGB/InGSFtXhU6Q=; b=CohrBo8b4KSWIRtSTvCEoKQqMGvfKPJnWGj5UioPoMvydGUKIKhJZJDVKkjo3luBq6 O+aEbr9jQfw8STItnB+dQplyrO1SB7Gd8qXGkN/KkHU3zRonrv8KqFbQwdlLBhHG4K3t BYOQnOkegFf5V4bkLFWd9ilmCr6bUwnpaUJJ5YGSldGnrRQKpJGccvTelAu7gk9cOIwU Zpm0pCMQ27zYDrdVJHwF9luVMOBBP+IuL3ToVTbR6TrX3OvKplC56N0LnTOSV+x5itpr njvzObqW6YgJlxfWpBLc5gt4eRZFDh2fuYXwgMk0hvrmqCIVwPL705U/EeAQ84rWkQiC kSkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690870824; x=1691475624; h=subject:from:to:content-language:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oJc13hxy21DqKxvcuUZkjkJd+BudhGB/InGSFtXhU6Q=; b=dV2TmVoWpvsTS0EwJlZMBo7mnPo+pjMONmO0sLiYR8lZEQxzNPYsFAJKQmh65acSCs gH/gkwKYCLHSckQGukDXM58it0aDmluooEUgdXTflyaujs/rWAFPEbUc99/h78OK1rZG 1WLvOlm0kBdzDW3GquH7OhaEr19ygu5EZd6jOXVTzs2glgzPyDjVrl4xbWKWAp7Q7cqp uoIOqKZwMHxiwXamcfo/1pCeZ85Vbw+hGgQYJXYw95MlvPecFj0GLlhu37wMzr83S/Db G0hS4q+qrR11JJWu3IiyTWXSsYsG1jhmBKGbew7vM/E3JNTkN9o72vNXmIrYInCTs+Ai ysUA== X-Gm-Message-State: ABy/qLbJO0KcUdOmepBX2slDUgwuRkw5Km+8bWkGw+5kcwcIaFPG6/Ul gPbZRsbu2F3KGxj0H0JT73UqXBwImcM= X-Google-Smtp-Source: APBJJlGh6mMbJ+ht2dhI5D2f1RXF5W1IUdKDR8I4ZvhRPSQcE2UC+Cm9aC0DIUHgAN39jCf+FZHiwA== X-Received: by 2002:a05:6a21:3b4a:b0:137:9622:17b7 with SMTP id zy10-20020a056a213b4a00b00137962217b7mr11666784pzb.25.1690870824271; Mon, 31 Jul 2023 23:20:24 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id m14-20020a638c0e000000b0055fedbf1938sm9142827pgd.31.2023.07.31.23.20.23 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jul 2023 23:20:23 -0700 (PDT) X-Mozilla-News-Host: news://news.gmane.io:119 Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=jporterbugs@gmail.com; helo=mail-pf1-x435.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:266434 Archived-At: This is a multi-part message in MIME format. --------------0YBeEpaFCClTbTacSBedp7LF Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------0YBeEpaFCClTbTacSBedp7LF Content-Type: text/plain; charset=UTF-8; name="0001-Fix-handling-of-.elpaignore-file-when-compiling-pack.patch" Content-Disposition: attachment; filename*0="0001-Fix-handling-of-.elpaignore-file-when-compiling-pack.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSBlYzRlMTk4ZmI5Yzg3NjUzZDFlNjUyODg5NjliZWQxZmY1NDg2ODNjIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gUG9ydGVyIDxqcG9ydGVyYnVnc0BnbWFpbC5j b20+CkRhdGU6IE1vbiwgMzEgSnVsIDIwMjMgMjM6MTA6MDMgLTA3MDAKU3ViamVjdDogW1BB VENIXSBGaXggaGFuZGxpbmcgb2YgIi5lbHBhaWdub3JlIiBmaWxlIHdoZW4gY29tcGlsaW5n IHBhY2thZ2VzCgoqIGxpc3AvZW1hY3MtbGlzcC9ieXRlY29tcC5lbCAoYnl0ZS1yZWNvbXBp bGUtZGlyZWN0b3J5KTogVHJlYXQKJ2J5dGUtY29tcGlsZS1pZ25vcmUtZmlsZXMnIGFzIGEg bGlzdCBvZiByZWdleHBzIHBlciBpdHMgZG9jc3RyaW5nLgotLS0KIGxpc3AvZW1hY3MtbGlz cC9ieXRlY29tcC5lbCB8IDEwICsrKystLS0tLS0KIDEgZmlsZSBjaGFuZ2VkLCA0IGluc2Vy dGlvbnMoKyksIDYgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9lbWFjcy1saXNw L2J5dGVjb21wLmVsIGIvbGlzcC9lbWFjcy1saXNwL2J5dGVjb21wLmVsCmluZGV4IDViMWQ5 NThlNmMyLi5kMTIzZTY4YTA4OCAxMDA2NDQKLS0tIGEvbGlzcC9lbWFjcy1saXNwL2J5dGVj b21wLmVsCisrKyBiL2xpc3AvZW1hY3MtbGlzcC9ieXRlY29tcC5lbApAQCAtMTk5NSw5ICsx OTk1LDggQEAgYnl0ZS1yZWNvbXBpbGUtZGlyZWN0b3J5CiAJCSAgICAgIChvciAobnVsbCBh cmcpIChlcSAwIGFyZykKIAkJCSAgKHktb3Itbi1wIChjb25jYXQgIkNoZWNrICIgc291cmNl ICI/ICIpKSkKICAgICAgICAgICAgICAgICAgICAgICA7OyBEaXJlY3RvcnkgaXMgcmVxdWVz dGVkIHRvIGJlIGlnbm9yZWQKLSAgICAgICAgICAgICAgICAgICAgICAobm90IChzdHJpbmct bWF0Y2gtcAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIChyZWdleHAtb3B0IGJ5dGUt Y29tcGlsZS1pZ25vcmUtZmlsZXMpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgc291 cmNlKSkKKyAgICAgICAgICAgICAgICAgICAgICAobm90IChzZXEtc29tZSAobGFtYmRhIChl eCkgKHN0cmluZy1tYXRjaC1wIGV4IHNvdXJjZSkpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgYnl0ZS1jb21waWxlLWlnbm9yZS1maWxlcykpCiAgICAgICAgICAg ICAgICAgICAgICAgKHNldHEgZGlyZWN0b3JpZXMgKG5jb25jIGRpcmVjdG9yaWVzIChsaXN0 IHNvdXJjZSkpKSkKICAgICAgICAgICAgICAgIDs7IEl0IGlzIGFuIG9yZGluYXJ5IGZpbGUu ICBEZWNpZGUgd2hldGhlciB0byBjb21waWxlIGl0LgogICAgICAgICAgICAgICAgKGlmIChh bmQgKHN0cmluZy1tYXRjaCBlbWFjcy1saXNwLWZpbGUtcmVnZXhwIHNvdXJjZSkKQEAgLTIw MDcsOSArMjAwNiw4IEBAIGJ5dGUtcmVjb21waWxlLWRpcmVjdG9yeQogICAgICAgICAgICAg ICAgICAgICAgICAgKG5vdCAoYXV0by1zYXZlLWZpbGUtbmFtZS1wIHNvdXJjZSkpCiAgICAg ICAgICAgICAgICAgICAgICAgICAobm90IChtZW1iZXIgc291cmNlIChkaXItbG9jYWxzLS1h bGwtZmlsZXMgZGlyZWN0b3J5KSkpCiAgICAgICAgICAgICAgICAgICAgICAgICA7OyBGaWxl IGlzIHJlcXVlc3RlZCB0byBiZSBpZ25vcmVkCi0gICAgICAgICAgICAgICAgICAgICAgICAo bm90IChzdHJpbmctbWF0Y2gtcAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHJl Z2V4cC1vcHQgYnl0ZS1jb21waWxlLWlnbm9yZS1maWxlcykKLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHNvdXJjZSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAo c2VxLXNvbWUgKGxhbWJkYSAoZXgpIChzdHJpbmctbWF0Y2gtcCBleCBzb3VyY2UpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZS1jb21waWxlLWlnbm9y ZS1maWxlcykpKQogICAgICAgICAgICAgICAgICAgIChwcm9nbiAoY2wtaW5jZgogICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHBjYXNlIChieXRlLXJlY29tcGlsZS1maWxlIHNvdXJj ZSBmb3JjZSBhcmcpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgnbm8tYnl0ZS1j b21waWxlIHNraXAtY291bnQpCi0tIAoyLjI1LjEKCg== --------------0YBeEpaFCClTbTacSBedp7LF--