From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#41242: Port feature/native-comp to Windows Date: Sat, 16 May 2020 09:22:11 +0300 Message-ID: <837dxcv1po.fsf@gnu.org> References: <834ksi60zn.fsf@gnu.org> <83k11e4a0s.fsf@gnu.org> <83blmp4tob.fsf@gnu.org> <83o8qp1hfr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="29656"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41242@debbugs.gnu.org, akrl@sdf.org To: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 16 08:23:11 2020 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 1jZqE2-0007bW-6Y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 May 2020 08:23:10 +0200 Original-Received: from localhost ([::1]:42542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZqE0-0002us-Rg for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 May 2020 02:23:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZqDu-0002tu-LE for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 02:23:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56292) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZqDu-0005RY-B8 for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 02:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZqDu-00008r-6k for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 02: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: Sat, 16 May 2020 06:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41242 X-GNU-PR-Package: emacs Original-Received: via spool by 41242-submit@debbugs.gnu.org id=B41242.1589610151488 (code B ref 41242); Sat, 16 May 2020 06:23:02 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 16 May 2020 06:22:31 +0000 Original-Received: from localhost ([127.0.0.1]:39605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZqDP-00007o-Bx for submit@debbugs.gnu.org; Sat, 16 May 2020 02:22:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZqDN-00007W-3u for 41242@debbugs.gnu.org; Sat, 16 May 2020 02:22:29 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59930) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZqDG-0005Kg-Kb; Sat, 16 May 2020 02:22:22 -0400 Original-Received: from [176.228.60.248] (port=3783 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jZqDG-0007T7-11; Sat, 16 May 2020 02:22:22 -0400 In-Reply-To: (message from Nicolas =?UTF-8?Q?B=C3=A9rtolo?= on Fri, 15 May 2020 16:44:04 -0300) 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:180372 Archived-At: > From: Nicolas BĂ©rtolo > Date: Fri, 15 May 2020 16:44:04 -0300 > Cc: Andrea Corallo , 41242@debbugs.gnu.org > > To summarize: > > The best idea seems to be to rename the .eln file when removing the package or > recompiling. We need to reach a consensus on where to put the old .eln file, > though. > > There are two options: > > - Put it in the same folder as the original .eln file. This means that > `package-delete` will not be able to delete the directory. Additionally, it > will be tricky to handle left over files from an instance of Emacs that > crashes. > > - Another option is to move them to `package-user-dir`. This option means that > `package-delete` will be able to delete the directory. > > What option do you prefer? I'm not sure I understand why we are talking only about package.el. Wouldn't the same problem happen if the user recompiles a .el file for which a .eln file already exists and is loaded into the session? And similarly when Emacs is being built and all the *.el files are being compiled or recompiled, sometimes by several Emacs processes running in parallel via "make -jN"? I think the solution should handle all of these use cases, not just that of package.el upgrading a package. Do you agree? > - `package-delete` iterates over the .eln files in the package directory. It > tries to delete it, if it fails it is moved to somewhere (see point above). > > - When Emacs GCs a native compilation unit it should check if it has been > renamed (need to check if GetModuleFileNameA is fit for this). If it has, it > tries to delete it. If it fails, then some other Emacs instance must be using > it. > > - The last step before calling exit() should FreeLibrary() all remaining .eln > files and run the equivalent of `rm $package_user_dir/*.eln.old`. Sounds OK to me, I don't think we came up with anything better during the discussion till now.