From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: master 2772ebe366: Do not prune native-compiled system directories (bug#59658) Date: Thu, 1 Dec 2022 02:05:21 +0100 Message-ID: References: <166965402487.18442.18379860639913355185@vcs2.savannah.gnu.org> <20221128164705.366A7C004B6@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e6ea7405eeb9d26c" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33196"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 01 02:07:01 2022 Return-path: Envelope-to: ged-emacs-devel@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 1p0Y2X-0008Sh-2l for ged-emacs-devel@m.gmane-mx.org; Thu, 01 Dec 2022 02:07:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0Y1h-0003jM-4U; Wed, 30 Nov 2022 20:06:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0Y1c-0003ik-VE for emacs-devel@gnu.org; Wed, 30 Nov 2022 20:06:05 -0500 Original-Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0Y1Z-0004rh-9I for emacs-devel@gnu.org; Wed, 30 Nov 2022 20:06:03 -0500 Original-Received: by mail-ed1-x52c.google.com with SMTP id m19so363517edj.8 for ; Wed, 30 Nov 2022 17:05:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=EIa6PXeNG/25c0fojgkdCffPTQYt0kpkQ10hcfkWsoc=; b=Ook8iePxqCop+ja9JcjNHuchHReMFQcXhyOzhIitmdZw0hvYoei6h2To50LDJBHray bFs2JQCuXUwjZkY/UhLzr2BPQ2sDdnOT4nkret5iNq9KIb6dSGyCXeipfrEgW2iVU2Vi iD1aGbq82pbu7aPSgAZmquRDwQhGbRz/zzeIcSdVZEzw62/uxJ6XkIE26eQvJBjVn4qO 5dXIqeWV62GFdsUJu///FFvki8ovprwfpI5tEg2O8j8Dms+YShaxVwuGYhnyzhN57x8v O6pWKTzqyxfPbGjkiZx7Bw7zYCF49Cjx23KvfiA/OclTd6stCKiGiRo9PTFdxEDTYy0u eHNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EIa6PXeNG/25c0fojgkdCffPTQYt0kpkQ10hcfkWsoc=; b=2Kh2lZs1Wi9CBCTG1JDEkivn1MpCyoKkX6AOlSRiXjN8JwzRU0Wf0qZcrwwl99XXim /Ehns/S4eOE8x6uFGAaQe2JseUqz66h+zHIc8eas0Q/8XdC3fokmJkQZ7QLtzxygNGtA UsBHBoRrWtK4LiChELe4wXhqRho71MtubNbdMI9MOzFx4IxtDRN/1JN1DcoBhfDZydes BEt0j0pF7Rqv73V1xLVdp4S3HxM24jG4mVvXA8brjjMGsL8p3vmbwJ25cSwuJC9kdKCV ogmItbUdqhs5IWOWLoXnTbyDq/WpRmv2TTqI8/wW0GC9k5h+AN3sp7swCnBNQD3VMbbn Ue2Q== X-Gm-Message-State: ANoB5pkN0vMLRQqnvsMvHG3viUNbkMAAAaouGJ4kfOUeIVHnVEN66tIm FQ1ibQlbUPqDcvmpDmN3fOyYbfiSa9+ZlQjuzLM= X-Google-Smtp-Source: AA0mqf7Ozh5SPqb9pRcGtsMQtpuvH1ocjCwZ02cgejYWbf8tKiYsNSxa9BiAqeYEelhXezf+LfStJ07DWvEwZDUoE/w= X-Received: by 2002:a05:6402:1050:b0:467:e9a5:77c5 with SMTP id e16-20020a056402105000b00467e9a577c5mr14088914edu.289.1669856758260; Wed, 30 Nov 2022 17:05:58 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=lekktu@gmail.com; helo=mail-ed1-x52c.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300791 Archived-At: --000000000000e6ea7405eeb9d26c Content-Type: text/plain; charset="UTF-8" Yes, I see. We'll have to decide where's the error, or what's the intended behavior. test-native-compile-prune-cache sets native-comp-eln-load-path to a single directory and then tests whether native-compile-prune-cache can delete a stale cache dir inside it (and keep a non-stale one). It is obviously going to fail with my fix, because with it installed, native-compile-prune-cache is never going to delete anything in the last (or, in this case, unique) directory in native-comp-eln-load-path, because, as the docstring of native-comp-eln-load-path says, "[t]he last directory of this list is assumed to be the system one" (i.e, the one containing the preloaded/ subdirectory and its content). So, alternatives: 1.- We fix the test so it sets native-comp-eln-load-path to a list of two directories, and checks that the stale subdir is deleted in the first, and nothing is deleted in the second ("system") one. 2.- We remove my change and allow that native-compile-prune-cache sometimes deletes files in the "system" eln cache, but Eli argued that we don't know if the user will have write access to it, and we're not sure we *want* to allow native-compile-prune-cache to delete files there... 3.- Or we find a way to reliably decide whether a cache directory is, in fact, the "system" one (which we can currently do, heuristically, because it contains preloaded/), and fix *both* my patch and the test so it only considers untouchable those cache directories that really are "system" ones. --000000000000e6ea7405eeb9d26c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, I see. We'll have to decide where's the error, or wh= at's the intended behavior.

test-native-compile-prune-cache sets= native-comp-eln-load-path to a single directory and then tests whether nat= ive-compile-prune-cache can delete a stale cache dir inside it (and keep a = non-stale one).

It is obviously going to fail with my fix, because w= ith it installed, native-compile-prune-cache is never going to delete anyth= ing in the last (or, in this case, unique) directory in native-comp-eln-loa= d-path, because, as the docstring of native-comp-eln-load-path says, "= [t]he last directory of this list is assumed to be the system one" (i.= e, the one containing the preloaded/ subdirectory and its content).

= So, alternatives:

1.- We fix the test so it sets native-comp-eln-load= -path to a list of two directories, and checks that the stale subdir is del= eted in the first, and nothing is deleted in the second ("system"= ) one.

2.- We remove my change and allow that native-compile-prune-ca= che sometimes deletes files in the "system" eln cache, but Eli ar= gued that we don't know if the user will have write access to it, and w= e're not sure we *want* to allow native-compile-prune-cache to delete f= iles there...

3.- Or we find a way to reliably decide whether a cache= directory is, in fact, the "system" one (which we can currently = do, heuristically, because it contains preloaded/), and fix *both* my patch= and the test so it only considers untouchable those cache directories that= really are "system" ones.

--000000000000e6ea7405eeb9d26c--