From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#56614: two problems with `package--reload-previously-loaded' Date: Sun, 17 Jul 2022 14:42:47 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000057534105e3ff9793" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26263"; mail-complaints-to="usenet@ciao.gmane.io" To: 56614@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 17 14:44:13 2022 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 1oD3d7-0006fa-L3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jul 2022 14:44:13 +0200 Original-Received: from localhost ([::1]:53288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oD3d5-0000j8-V1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jul 2022 08:44:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD3cw-0000j0-HG for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 08:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49091) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oD3cw-0007XI-8c for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 08:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oD3cw-0006TH-2l for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 08:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jul 2022 12:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56614 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165806178724804 (code B ref -1); Sun, 17 Jul 2022 12:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jul 2022 12:43:07 +0000 Original-Received: from localhost ([127.0.0.1]:46850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oD3c3-0006Rz-0W for submit@debbugs.gnu.org; Sun, 17 Jul 2022 08:43:07 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:40594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oD3c1-0006Rs-FR for submit@debbugs.gnu.org; Sun, 17 Jul 2022 08:43:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oD3bz-0000gI-Up for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 08:43:05 -0400 Original-Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]:42574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oD3bw-0007TJ-KS for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2022 08:43:03 -0400 Original-Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-2ef5380669cso84404527b3.9 for ; Sun, 17 Jul 2022 05:42:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=IH32Fmjj2GBtlFzBUPGCDGQMGn0tOXCQkTysQ/OJTaY=; b=efXctosli3iqivm8rzErrmCEUr6NMLT0QRFa4AIYz9FgZ836VSRHVcJWJlS1s8/Mlk Aae9WBVaMbXmQPhxPjUiHWJmAjUX6wIaSCYqPHOQAp7n1bHIFThW3xjdoYuIUEN2EdIp mEoT2pbMYA3zzl+JCteffRB/QDC2N8l/3rqNuJ3krg3Zwzcak2cSoGB5HHcvWinX5GaR eFz/vZmn+CisTc08otKW7ZVacSRVW603fQf/vTcu1cotswnrXAvign/SVyc2QdwOEtuQ du+Z9dg1sV2+8a0sqmbUHr2Koc1Zg1Tc2eVZlRh2cJxU5vLSBfhgL7BGFM0wBAv6Qeyc 3XVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=IH32Fmjj2GBtlFzBUPGCDGQMGn0tOXCQkTysQ/OJTaY=; b=xiII1WCrQxk+lwQN93AWD1eMoIuXRMavWxh76SCB4yyCZ8MAppClm8+mEI5g5omzf8 5L3rPJTHVBAH3/4ynDSAponys7reA2ksJnI4MvGQIt3l8SR0O1Aa6mjdfBsOFJlzRrPa xWA11Fm215R0FNnQ6nHA4fbVAA/dW5hS0D7Dm+tAslTcwnqBkja4pzTNBdBBfK/cvUbG pzrzpjDAMNCzBj12xCYTlLqQ8jGp2WDe35uYSjKqLPqdFG4suTprT/RY5VpmHicNenfH TWsCyrG4+y3A7UYb7mPIO/HJH3qLQUKw+ljXrwZkipRSuir4cUmmbNQlR3IlJJGZPn9D oUIQ== X-Gm-Message-State: AJIora+e+3Jz9ZezQJ6NtA/v8/6QshESAGMVuSVJAoPeI2J3O85zqqzT 6I/bYfvdCZmsC1KyWMoed6sUrk6cCg192IdjIVahjfQo0Q== X-Google-Smtp-Source: AGRyM1uQz+piWavaI6gKKpDar8dnM+9TUq6RQ4hk+74ASRFCqiqC+CiHRZSpGVqE7dhatACFcdUDxBRewUVSYGZaLWg= X-Received: by 2002:a81:6105:0:b0:317:daca:fa5c with SMTP id v5-20020a816105000000b00317dacafa5cmr25317075ywb.76.1658061778799; Sun, 17 Jul 2022 05:42:58 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::1135; envelope-from=pogonyshev@gmail.com; helo=mail-yw1-x1135.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, HTML_MESSAGE=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" Xref: news.gmane.io gmane.emacs.bugs:237260 Archived-At: --00000000000057534105e3ff9793 Content-Type: text/plain; charset="UTF-8" Commit 9dfd945a2c added function `package--reload-previously-loaded'. Previously package library would just always reload all package files (except its autoloads), new function tries to be smart and avoid reloading unneeded things, presumably for performance reasons. However, this has created at least two problems for Eldev ( https://github.com/doublep/eldev), Elisp development tool. 1. Function excludes package's current directory, see variable `load-path-sans-dir'. This is problematic if a package is reinstalled from the same directory after changes have been made. I know this is not how things usually work, but it seems to create problems for no reason: if the same directory is never used, why bother about it here? Normal usecases are not affected at all, why "special" usecases that reuse the same directory suffer. 2. When searching in `load-history', the function ignores changes from byte-compiled to source and vice versa, i.e. `.el' -> `.elc' and `.elc' -> `.el'. In other words, if you replace a byte-compiled file with a non-compiled (or vice versa), it never gets reloaded. A simple fix (having zero effect in normal usecases) would be e.g. this: (truename (file-truename canonical)) (found (or (member truename history) (member (if (string-suffix-p ".el" truename) (replace-regexp-in-string (rx ".el" eos) ".elc" truename t) (replace-regexp-in-string (rx ".elc" eos) ".el" truename t)) history))) Paul --00000000000057534105e3ff9793 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Commit=C2=A09dfd945a2c added function `package--reload-pre= viously-loaded'. Previously package library would just always reload al= l package files (except its autoloads), new function tries to be smart and = avoid reloading unneeded things, presumably for performance reasons.
However, this has created at least two problems for Eldev (https://github.com/doublep/eldev<= /a>), Elisp development tool.




--00000000000057534105e3ff9793--