From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#41242: Port feature/native-comp to Windows Date: Sat, 16 May 2020 07:12:47 +0000 Message-ID: References: <834ksi60zn.fsf@gnu.org> <83k11e4a0s.fsf@gnu.org> <83blmp4tob.fsf@gnu.org> <83o8qp1hfr.fsf@gnu.org> <837dxcv1po.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="98175"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= , 41242@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 16 09:13: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 1jZr0Q-000PPM-3E for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 May 2020 09:13:10 +0200 Original-Received: from localhost ([::1]:41228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZr0P-0001RR-5t for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 May 2020 03:13:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZr0I-0001Q7-A0 for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 03:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZr0I-0001oa-0t for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 03:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZr0H-0001L1-Qu for bug-gnu-emacs@gnu.org; Sat, 16 May 2020 03:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 May 2020 07:13:01 +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.15896131715121 (code B ref 41242); Sat, 16 May 2020 07:13:01 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 16 May 2020 07:12:51 +0000 Original-Received: from localhost ([127.0.0.1]:39652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZr06-0001KX-UU for submit@debbugs.gnu.org; Sat, 16 May 2020 03:12:51 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:53207) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZr05-0001KP-8N for 41242@debbugs.gnu.org; Sat, 16 May 2020 03:12:50 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04G7CmI8021637 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 16 May 2020 07:12:48 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 04G7ClAK009487; Sat, 16 May 2020 07:12:47 GMT In-Reply-To: <837dxcv1po.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 May 2020 09:22:11 +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:180376 Archived-At: Eli Zaretskii writes: >> From: Nicolas B=C3=A9rtolo >> Date: Fri, 15 May 2020 16:44:04 -0300 >> Cc: Andrea Corallo , 41242@debbugs.gnu.org >>=20 >> To summarize: >>=20 >> The best idea seems to be to rename the .eln file when removing the pack= age or >> recompiling. We need to reach a consensus on where to put the old .eln f= ile, >> though. >>=20 >> There are two options: >>=20 >> - Put it in the same folder as the original .eln file. This means that >> `package-delete` will not be able to delete the directory. Additionall= y, it >> will be tricky to handle left over files from an instance of Emacs that >> crashes. >>=20 >> - Another option is to move them to `package-user-dir`. This option mean= s that >> `package-delete` will be able to delete the directory. >>=20 >> 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? IIUC the complication of package.el that makes it different from the general cases you have described is that the eln-... sub-directory has to be removed to be able to clean-up entirely the package. > 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 ab= ove). >>=20 >> - 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 h= as, it >> tries to delete it. If it fails, then some other Emacs instance must b= e using >> it. >>=20 >> - 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. > --=20 akrl@sdf.org