From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Newsgroups: gmane.emacs.bugs Subject: bug#41242: Port feature/native-comp to Windows Date: Fri, 15 May 2020 16:44:04 -0300 Message-ID: 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" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="83015"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41242@debbugs.gnu.org, Andrea Corallo To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 15 21:45:15 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 1jZgGg-000LN2-8Z for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 21:45:14 +0200 Original-Received: from localhost ([::1]:55626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZgGf-0000Bj-8Y for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 May 2020 15:45:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZgGU-000094-GQ for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 15:45:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZgGU-0005FX-6H for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 15:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZgGU-0007gC-4N for bug-gnu-emacs@gnu.org; Fri, 15 May 2020 15:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 May 2020 19:45: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.158957186229449 (code B ref 41242); Fri, 15 May 2020 19:45:02 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 15 May 2020 19:44:22 +0000 Original-Received: from localhost ([127.0.0.1]:38809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZgFq-0007ev-Dc for submit@debbugs.gnu.org; Fri, 15 May 2020 15:44:22 -0400 Original-Received: from mail-ot1-f54.google.com ([209.85.210.54]:33583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZgFp-0007ej-Hy for 41242@debbugs.gnu.org; Fri, 15 May 2020 15:44:21 -0400 Original-Received: by mail-ot1-f54.google.com with SMTP id v17so2886920ote.0 for <41242@debbugs.gnu.org>; Fri, 15 May 2020 12:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9+JTtNCB1yqbSoWkeRclGjG04pIUEbiMPXjA85Fbhdg=; b=uNNRy3pKVWhurUJZbXu1hyGz4pGkCh61KX1xhFDIB3rkf6X6zT7OKUtRSTrbpuEXcB 0eTfaU3SxC0A+iZmlacsCeIsowuHwOltT32qYJ39fhBtx79WHUVV3SuobFLWXnQ3SQ/B 2dwlnU3qpb3KAWind8SdtjcqXGetaZAOyKkhU1GOLaDaLyETHQCLPfZIfI1soMN1JV7W j/MN1791ZpwpDPbbAflfjog/g5gLpB4TcwWq3dsx9YbU5Ab9cUOw0FSYaBlOYzhgDMTe X8ZaM0bOzEgXqViFi8viKxazkWaidE5Ed0rS/4DaMlaMGIqBd4OK9qKHz17nSjOyD5/L 8yEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9+JTtNCB1yqbSoWkeRclGjG04pIUEbiMPXjA85Fbhdg=; b=Zxlo19y3sT0KWms54b0Poi/pz9vLe8GLyLaM9pk5z++55MtzF0xKom/U2WbHlWac+5 4UTWaz9yWUA5Yiz84hltd4j9BeDxzOURcFfUbnajy+jhraPSyRosxH30z4IHwIMjFRcj wljgPFvA3PpXAo5C1fba69CRkTq/D/35T98yJoRoBQa8a8thXsxNpNFin6WEous3VMGs 9KjEIlxJcKUxXyiZZZhJfJZmItXbJRsYSEjIv8iHJ/BTNz7rusA95uAF/8o5O83n10Yt oBXTu3pZ8wzYQlRjqjon4AGaIClhbRRRKfJh97DXBmuqrSL+Drvwldn4FrxxOVqMZxIx vhRg== X-Gm-Message-State: AOAM533L8vgpFqLwcLcgN0ecO2cPAMhn45EN0x2JDOamNrJXO9MRrdmx ZJHi6Reo28gi7QuiYwXW1H9Y0o8ZNzhGUBjoXXc= X-Google-Smtp-Source: ABdhPJz/p6VoOcMaVI8zG/TMZPe2Eh8AnvtkTalps2akAyI7X52IPOsDrR/47IEQNVpIQBDYU0oTvsMv+KT487mHZpw= X-Received: by 2002:a9d:191:: with SMTP id e17mr3317915ote.193.1589571855621; Fri, 15 May 2020 12:44:15 -0700 (PDT) In-Reply-To: <83o8qp1hfr.fsf@gnu.org> 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:180358 Archived-At: 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? The implementation I have in mind is roughly like this: - `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`. I think this would work and should be simple to implement. If I get your OK I'll try to do it this weekend. Nicolas