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: Thu, 14 May 2020 13:45:20 +0300 Message-ID: References: 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="70522"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android To: 41242@debbugs.gnu.org, akrl@sdf.org, nicolasbertolo@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 14 12:46:30 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 1jZBNl-000IGP-Lx for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 May 2020 12:46:29 +0200 Original-Received: from localhost ([::1]:57482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZBNk-0000jl-Kt for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 May 2020 06:46:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZBNK-0000em-TX for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 06:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZBNK-0006Et-Hc for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 06:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZBNK-0002SK-EF for bug-gnu-emacs@gnu.org; Thu, 14 May 2020 06:46: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: Thu, 14 May 2020 10:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41242 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, Andrea Corallo , Nicolas =?UTF-8?Q?B=C3=A9rtolo?= X-Debbugs-Original-Cc: 41242@debbugs.gnu.org Original-Received: via spool by 41242-submit@debbugs.gnu.org id=B41242.15894531359379 (code B ref 41242); Thu, 14 May 2020 10:46:02 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 14 May 2020 10:45:35 +0000 Original-Received: from localhost ([127.0.0.1]:60430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZBMs-0002RC-JJ for submit@debbugs.gnu.org; Thu, 14 May 2020 06:45:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37088) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZBMp-0002QV-Lp for 41242@debbugs.gnu.org; Thu, 14 May 2020 06:45:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58190) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZBMk-000610-1S; Thu, 14 May 2020 06:45:26 -0400 Original-Received: from [176.12.137.152] (port=33656 helo=[10.212.174.103]) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1jZBMj-0004gI-B8; Thu, 14 May 2020 06:45:25 -0400 In-Reply-To: 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:180200 Archived-At: On May 14, 2020 1:18:26 PM GMT+03:00, Andrea Corallo wrote= : > Nicolas B=C3=A9rtolo writes: >=20 > > * `package-delete` fails because it tries to delete the =2Eeln file > via > > `delete-file`=2E This is impossible in Windows because it's > generally impossible > > to delete files that have an open HANDLE in the system=2E > > > > Three solutions have crossed my mind: > > > > - Edit `package-delete` to put the eln on a list of files that > should be > > deleted when Emacs is closed=2E > > > > - Implement an unloading mechanism for native-compiled files=2E > > > > - Copy eln files to temporary files and load those temporary files > instead=2E > > This means that deleting the original eln file is possible=2E > > > > I'd prefer the second option, but I have a semi-working patch for > the third > > option=2E >=20 > I don't think the second is an option=2E The unload machanism is > already > in place but is GC driven, I don't see how else it could work=2E Windows doesn't let you delete a shared library that's loaded by a process= , but it does let you rename it=2E So I think the solution would be to ren= ame the =2Eeln file to something like =2Eeln=2Eold, and then let the GC dri= ven unload machinery to delete that old file=2E Btw, what happens if more than one Emacs session have the same =2Eeln file= loaded, and one of them wants to recompile it?