From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#63916: 30.0.50; use-package: changes do not propagate to elpa-devel Date: Fri, 08 Sep 2023 17:14:10 +0000 Message-ID: <87edj837vh.fsf@posteo.net> References: <4b1ff1660351348f3d5f1bc848965d59@orthen.net> <874jnf3d0c.fsf@posteo.net> <87wn0a2sp8.fsf@posteo.net> <87fs6y6jkq.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6752"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63916@debbugs.gnu.org, Stefan Monnier To: Benjamin Orthen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 08 19:15:40 2023 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 1qef51-0001S8-Oz for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Sep 2023 19:15:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qef4Y-0001Qh-JV; Fri, 08 Sep 2023 13:15:10 -0400 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 1qef4Q-0001Pm-61 for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 13:15:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qef4P-0003wx-Q3 for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 13:15:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qef4P-0005PB-Rw for bug-gnu-emacs@gnu.org; Fri, 08 Sep 2023 13:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Sep 2023 17:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63916 X-GNU-PR-Package: emacs Original-Received: via spool by 63916-submit@debbugs.gnu.org id=B63916.169419326420719 (code B ref 63916); Fri, 08 Sep 2023 17:15:01 +0000 Original-Received: (at 63916) by debbugs.gnu.org; 8 Sep 2023 17:14:24 +0000 Original-Received: from localhost ([127.0.0.1]:45461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qef3n-0005O6-O3 for submit@debbugs.gnu.org; Fri, 08 Sep 2023 13:14:24 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:41407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qef3i-0005Nq-Rs for 63916@debbugs.gnu.org; Fri, 08 Sep 2023 13:14:22 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D3157240029 for <63916@debbugs.gnu.org>; Fri, 8 Sep 2023 19:14:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1694193250; bh=C+WJUlZyahbV+b4tCJGHZ8tQdu91hWuRIa1NQA2vpWE=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=HhCFhw/wb84CZWDdtW3XbjlecSppKPdvf1v+n5I66ngUNBA6ewG0b+LKpwcJAppHT rtRD8b5AUYZgDKS0Lm+wg6nnsnlATh8FADl8KlEp8ugRzp+Nvc04/idjPYXDriwFpn NhXRgxvVL+SFd+RbE5/JI5bRGR8U7l+W+imfZRSTKCoZZidWmWcdXayVFIXzx0sBpd axCO0a3XoM7tS3j0D5kQB9mZJ7k4vowQSkx1hrDfQ1ydQ64ou4JzXCN2CXawP5cYgG XkBlPMhEI2OV8R/C3W6huJahHt3/TEr3QPEgPnVXhuaY12GW1lZqmAh0wUxLvQaUWm fl3hSXdgEpCYg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rj2lQ2zvdz6tsj; Fri, 8 Sep 2023 19:14:10 +0200 (CEST) In-Reply-To: (Benjamin Orthen's message of "Fri, 08 Sep 2023 12:55:38 +0200") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269802 Archived-At: To: Benjamin Orthen Cc: Stefan Monnier , 63916@debbugs.gnu.org Subject: Re: bug#63916: 30.0.50; use-package: changes do not propagate to e= lpa-devel From: Philip Kaludercic Gcc: nnimap+posteo.de:Sent --text follows this line-- Benjamin Orthen writes: > Related to this, > > I have a patch for elpa-admin.el (in the elpa repository) which would > improve devel versioning for core packages: > > Instead of looking only at the git log of the main package file, we > look instead at the git log of all files of the core package. > This way, a new devel version is created when any other package file is > changed, not just the main file. This seems to make sense. > Is this the right mailing list to send the patch? If not, where could I > send it to? This is fine, the main thing is that someone has a patch that can be applied. > > Best, > Benjamin > > On Sun, 2023-06-11 at 19:32 +0200, Benjamin Orthen wrote: >> Hi, >>=20 >> I think I figured out why elpa does not build a new version of use- >> package. >>=20 >> To determine the devel version, it looks only at the git log of >> `(elpa- >> -main-file pkg-spec)`, which in this case turns out to be use- >> package.el. However, use-package.el has not been changed since >> 20230115, I suppose this is why no new version is built. >>=20 >> Best, Benjamin >>=20 >>=20 >> On Sun, 2023-06-11 at 12:55 -0400, Stefan Monnier wrote: >> > > > I agree that these kinds of problems are annoying to debug.=C2=A0 = It >> > > > would be >> > > > nice to offer a "debug mode" where the user can see what's >> > > > going >> > > > on >> > > > within the sandbox.=C2=A0 Maybe we could do that by opening an >> > > > interactive >> > > > shell with a message saying "this is the command that we want >> > > > to >> > > > run" >> > > > and then let the user run that command? >> > > Shouldn't just invoking bash do that? >> >=20 >> > Yes, it should be fairly easy to do. >> >=20 >> > > But returning to the initial issue (hoping I did not miss >> > > anything), if >> > > the issue is not what I mentioned, then why is use-package not >> > > building? >> >=20 >> > You did not miss anything: it's not building simply because the >> > process >> > run within the sandbox cannot read the target of the `use- >> > package.texi` >> > symlink because the sandbox does not expose this target. >> >=20 >> >=20 >> > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Stefan > > From d29163e00313690435b2baacc770a734598dd956 Mon Sep 17 00:00:00 2001 > From: Benjamin Orthen > Date: Fri, 8 Sep 2023 12:05:14 +0200 > Subject: [PATCH] Add elpa--core-files to get more exact devel-versions for > core packages > > --- > elpa-admin.el | 51 ++++++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 40 insertions(+), 11 deletions(-) > > diff --git a/elpa-admin.el b/elpa-admin.el > index 2c2d2aeab7..57dfee8f18 100644 > --- a/elpa-admin.el > +++ b/elpa-admin.el > @@ -908,20 +908,49 @@ of the current `process-environment'. Return the m= odified copy." > 0))) > (encode-time (list s mi h d mo y nil nil zs)))) >=20=20 > +(defun elpaa--core-files (pkg-spec) > + "Get a list of core files (and only files) for PKG-SPEC. > +Core folders are recursively searched, excluded files are ignored." > + (when-let > + ((core (elpaa--spec-get pkg-spec :core))) There is no need to fold this. > + (let* Or this. > + ((excludes (elpaa--spec-get pkg-spec :excludes)) > + (emacs-repo-root (expand-file-name "emacs")) > + (default-directory emacs-repo-root) > + (file-patterns > + (if (listp core) > + core > + (list core))) > + (core-files nil)) You can use list-ensure here. > + ;; we look at each file or files in folder and add them > + ;; to core-files if they are in the excludes > + (cl-labels ((process-item (item) > + (unless (member item excludes) > + (if (file-directory-p item) > + (dolist (file (directory-files item nil direct= ory-files-no-dot-files-regexp)) > + (process-item (concat item file))) > + (push item core-files))))) > + (dolist (item file-patterns) > + (process-item item))) Couldn't `directory-files-recursively' be useful here? > + core-files))) > + > (defun elpaa--get-devel-version (dir pkg-spec) > "Compute the date-based pseudo-version used for devel builds." > - (let* ((ftn (file-truename ;; Follow symlinks! > - (expand-file-name (elpaa--main-file pkg-spec) dir))) > - (default-directory (file-name-directory ftn)) > - (gitdate > + (let* ((gitdate > (with-temp-buffer > - (if (plist-get (cdr pkg-spec) :core) > - ;; For core packages, don't use the date of the last > - ;; commit to the branch, but that of the last commit > - ;; to the main file. > - (elpaa--call t "git" "log" "--pretty=3Dformat:%cI" "--no-= patch" > - "-1" "--" (file-name-nondirectory ftn)) > - (elpaa--call t "git" "show" "--pretty=3Dformat:%cI" "--no-p= atch")) > + (if (plist-get (cdr pkg-spec) :core) > + (let > + ((core-files (elpaa--core-files pkg-spec)) > + (default-directory (expand-file-name "emacs"))) > + ;; For core packages, don't use the date of the last > + ;; commit to the branch, but that of the last commit > + ;; to the core files. > + (apply 'elpaa--call t "git" "log" "--pretty=3Dformat:%= cI" "--no-patch" While we are at it, you might as well sharp-quote the `elpaa-call' here. > + "-1" "--" core-files)) > + (let* ((ftn (file-truename ;; Follow symlinks! > + (expand-file-name (elpaa--main-file pkg-spec)= dir))) > + (default-directory (file-name-directory ftn))) > + (elpaa--call t "git" "show" "--pretty=3Dformat:%cI" "--n= o-patch"))) > (buffer-string))) > (verdate > ;; Convert Git's date into something that looks like a version= number.