Received: (at 76325) by debbugs.gnu.org; 14 Mar 2025 05:32:48 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 14 01:32:48 2025 Received: from localhost ([127.0.0.1]:59512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tsxf6-000626-C4 for submit <at> debbugs.gnu.org; Fri, 14 Mar 2025 01:32:48 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:48752) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <spwhitton@HIDDEN>) id 1tsxf4-00061s-HQ for 76325 <at> debbugs.gnu.org; Fri, 14 Mar 2025 01:32:47 -0400 DKIM-Signature: a=rsa-sha256; b=KK8+ferah9Qd9ZIjD+vdnP5MNZ7Y6xxkMMsR8owx69xboDn3874zGKE5BTXcB3Li7hZWJsyj36HyRZIdhoWQjqvjUtV47htFxPQVKk82Uu+pcwuHrIWyq3EF8ia+7bAJKrB+s2LoNAcs9dwP7UWdt/DAi9Ua2XEVZW6XARVSRab6/DnE7jApG4w4cY9QYJ42LKke9VsDVEiJopmb15NYQMG3VO1FGxwNH1X9Vvu+8+20zzBcRzEPzsll8qq1Ti+n3uoiMeiaj060MJbDfm0usKVpu3KIdj2YpqjGyfwaXeijfUZ/wXnaSi7ajqJ+gywYt/d+2YD4WmL17+X+19Mtjg==; s=purelymail1; d=spwhitton.name; v=1; bh=xvepuEZXD7xpjEr3A+dHZnVXhvNG2xwGM9+8jfZbKHU=; h=Received:Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=pgNBJaehBmIpisBBmsmJS4/f6s1s1E80G90UyXnjQHdsX4e9r2dZe59ZYLcmHqjgpkZ5CZ5EPz3WphfbXH/ZIXzNV4QLgT2NmJl5/77v+/6cxTEhF4R+YSzouJdbOGQfpSxIVF5yN9twX0tZ/0gTY01E/jhP4NDOBBaIeS2b94b1ONtNdQ8ouRSaj2CCLiJWHAuzzdKyLmRWOUiFQp6t9vz7vrxtwAEiEOnfPWia01H6Q9vIqYwHIfpuzzkOzbAyyGGY15e/unQtHucZmgBZHJYfT9GzeqM7ABoeKDwjj5UE20qLNId+AeuTHDpjBJ7RnvjKQg1T1yXYAnGjGD6ckQ==; s=purelymail1; d=purelymail.com; v=1; bh=xvepuEZXD7xpjEr3A+dHZnVXhvNG2xwGM9+8jfZbKHU=; h=Feedback-ID:Received:Received:From:To:Subject:Date; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 76325 <at> debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1777075536; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 14 Mar 2025 05:32:38 +0000 (UTC) Received: by melete.silentflame.com (Postfix, from userid 1000) id 5A3667EE2C8; Fri, 14 Mar 2025 13:32:36 +0800 (CST) From: Sean Whitton <spwhitton@HIDDEN> To: Philip Kaludercic <philipk@HIDDEN> Subject: Re: bug#76325: 30.0.93; package-vc-install fails with repositories that contain multiple single-file packages In-Reply-To: <87frk8nxjf.fsf@HIDDEN> References: <m2cyfin7af.fsf@HIDDEN> <87wmdpbu14.fsf@HIDDEN> <m2v7t9o0tn.fsf@HIDDEN> <87jz9obi20.fsf@HIDDEN> <m2r03w4dlg.fsf@HIDDEN> <878qq4b77f.fsf@HIDDEN> <m2ikp8gm7b.fsf@HIDDEN> <87frk8nxjf.fsf@HIDDEN> Date: Fri, 14 Mar 2025 13:32:36 +0800 Message-ID: <87frjgyy6j.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76325 Cc: 76325 <at> debbugs.gnu.org, Armin Darvish <armindarvish@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hello Philip, On Thu 20 Feb 2025 at 08:58pm GMT, Philip Kaludercic wrote: > OK, it should be possible to fix this as well. I'll report back when I > have something to work with. There are a few issues mentioned in this bug now. Have you installed any changes at all yet? Just wanted to follow up on the status. Thanks. -- Sean Whitton
bug-gnu-emacs@HIDDEN
:bug#76325
; Package emacs
.
Full text available.Received: (at 76325) by debbugs.gnu.org; 20 Feb 2025 20:58:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 20 15:58:42 2025 Received: from localhost ([127.0.0.1]:42852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tlDd3-0002RL-0Z for submit <at> debbugs.gnu.org; Thu, 20 Feb 2025 15:58:42 -0500 Received: from mout01.posteo.de ([185.67.36.65]:53511) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <philipk@HIDDEN>) id 1tlDcy-0002Pk-8j for 76325 <at> debbugs.gnu.org; Thu, 20 Feb 2025 15:58:39 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 5B24A240029 for <76325 <at> debbugs.gnu.org>; Thu, 20 Feb 2025 21:58:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1740085109; bh=8iCK0NN6odfq9qaw2yb5NViJ9Bn2QFBxKEBbAvblEZ4=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=UlH4PFq4nNDMGp4hHBVIL6k3NpiJzO54fXyJ03LxGh4gtZVitqNzzV6waBt2N3GZk i8CzbBewWyxwwblB3iVSnSrzSLN+PDo/7WUcFgstuDCqzlplwqlxNbYPrSuaGQHkQf HD5RhVrnfAjWJ+bWL/LJBmkn3mSXtkoFb8hunC3PG8YshQCSN5XEDzSCnaq1t2X4SD FM2B+BHf7/jxfzJl12em7FF6E8+ekPcrGRG4iE3YuxWxG4trSO0kiHwwMwOMp78psc Y3KYvAwRjFBJ7oiVKDayrXTppBSJMfuss77EyTuy/tq+1ccZElbjDIr2WeXeYphki9 KW1wLD8p4snVw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YzQb86sM6z9rxB; Thu, 20 Feb 2025 21:58:28 +0100 (CET) From: Philip Kaludercic <philipk@HIDDEN> To: Armin Darvish <armindarvish@HIDDEN> Subject: Re: bug#76325: 30.0.93; package-vc-install fails with repositories that contain multiple single-file packages In-Reply-To: <m2ikp8gm7b.fsf@HIDDEN> References: <m2cyfin7af.fsf@HIDDEN> <87wmdpbu14.fsf@HIDDEN> <m2v7t9o0tn.fsf@HIDDEN> <87jz9obi20.fsf@HIDDEN> <m2r03w4dlg.fsf@HIDDEN> <878qq4b77f.fsf@HIDDEN> <m2ikp8gm7b.fsf@HIDDEN> Autocrypt: addr=philipk@HIDDEN; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Thu, 20 Feb 2025 20:58:28 +0000 Message-ID: <87frk8nxjf.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76325 Cc: 76325 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) [ I think you forgot to add the bug tracker in a few of the last messages, which is why I had to resend them, so everything is fine. It would be great if you could take care to do a wide reply, so that the conversation gets tracked on the mailing list! ] Armin Darvish <armindarvish@HIDDEN> writes: > Hi Philip, > >> I came up with this change, which appears to fix the issue on my end: >> Can you try it out as well? > That seems to solve the issue with multiple versions (for example for > embark) but still does not detect self-dependency. The embark-pkg.el > in this case still looks the same: > ,---- > | ;;; Generated package description from embark.el -*- no-byte-compile: = t -*- > | (define-package "embark" "1.1" "No description available." '((emacs > | "25.1") (embark "0.9") (avy "0.5") (emacs "27.1") (compat > | "29.1.4.0") (embark "1.0") (consult "1.0")) :kind vc :commit > | "195add1f1ccd1059472c9df7334c97c4d155425e") > `---- > But in this case only "embark 1.1" got installed alongside the actual vc-= install of embark. OK, it should be possible to fix this as well. I'll report back when I have something to work with. >> Do you understand my point with missing dependencies breaking parts of = the installed packages? > Yes I fully understand your argument, but I do not know of any > packages that the "Package-Requires: " header are split among > different lisp files, unless they are meant to be installed as > separate packages (i.e. requires two separate "define-package" > statements). If that's indeed something that people do often, then > your concern is very well justified. I didn't mean to imply that the package dependencies in a repository are entirely disjunct. The Embark example is sufficient to highlight the issue, as just installing Embark without consult would still provide embark-consult.el, but without scanning and installing the dependencies in that file would leave it in a broken state. >> A soft-but-important-constraint or goal is that the point of >> package-vc is to make package development easier, so excluding files >> from a checkout or manipulating the history is not something we are >> really interested in supporting. > I think the ability to exclude and include files, etc. would also help > making package development easier. It might be a nice-to-have feature > that is not high priority with limited contributors, etc. but I don't > think it is fundamentally out of scope for what package-vc is > potentially useful for, but that's just my opinion. Could you elaborate why that would help? In my eyes the issue remains the conflict between wanting to preserve the git history as directly as possible and adding the same checkout directly to `load-path'. Other from-source package managers do tricks with symlinks IIRC, but that is not that portable. > Anyway, I don't intend to drag the arguments here as I think you > already understand the points I wanted to make, and I do not have the > full picture of the development efforts. I believe it is clear that > the dependency management in package-vc-install can use some > improvements, but the solution and implementation details are up to > the devs to figure out what's the best path forward. > > Let me know if there is anything else I can help with. > > Best, > Armin > > > Philip Kaludercic @ 2025-02-17 21:19 : > >> I came up with this change, which appears to fix the issue on my end: >> >> diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.= el >> index a18841fb64d..1dc427d13ac 100644 >> --- a/lisp/emacs-lisp/package-vc.el >> +++ b/lisp/emacs-lisp/package-vc.el >> @@ -485,10 +485,21 @@ package-vc--unpack-1 >> lm--prepare-package-dependencies >> (nconc deps) >> (setq deps)))))) >> - (dolist (dep deps) >> - (cl-callf version-to-list (cadr dep))) >> - (setf (package-desc-reqs pkg-desc) deps) >> - (setf missing (package-vc-install-dependencies (delete-dups deps)= )) >> + (setf (package-desc-reqs pkg-desc) >> + (cl-loop with lessp =3D (lambda (a b) >> + (if (eq (car a) (car b)) >> + (version< (cadr b) (cadr b)) >> + (value< (car a) (car b)))) >> + ;; sort the dependency list to have the newest >> + ;; versions at the end of the list, so that when >> + ;; iterating through the list we only request to >> + ;; install the newest necessary dependency: >> + with deps =3D (sort deps :lessp lessp) >> + for rest on (cdr deps) >> + for (name vers) in deps >> + unless (assq name deps) >> + collect (list name (version-to-list vers)))) >> + (setf missing (package-vc-install-dependencies deps)) >> (setf missing (delq (assq (package-desc-name pkg-desc) >> missing) >> missing))) >> >> >> Can you try it out as well? >> >> Armin Darvish <armindarvish@HIDDEN> writes: >> >>> Hi Philip, >>> >>>>To clarify the terminology, ELPA/MELPA are package archives that take >>>>usually take a source code checkout and prepare packages. For each >>>>package, they might specify or infer a main file or some other source of >>>>information to get the metadata like package dependencies, but they will >>>>also throw out all other files that are not part of the package. >>> Yes, what I meant was how MELPA builds. Wile it does put the files in >>> load-path as well, but it ignores the "Package-Requires:" header for >>> inferring package dependencies in all other files, but the main lisp >>> file, and it can of course run into the problem you are trying to >>> avoid but I would argue the MELPA's approach is better (see below). >> >> But MELPA and package-vc are solving different problems (preparing a >> tarball from a VC checkout vs. making a VC checkout loadable by >> package.el). >> >>>>Package-vc is kind of like that, in that it is an independent >>>>implementation of ELPA's build scripts, but as the goal is to explicitly >>>>load the directory with the source code checkout we don't remove the >>>>"unrelated" files (that is one of the reasons we also advise against >>>>combining multiple packages in the same directory). >>> >>> I understand the advice against multiple packages in the same repo, >>> but a lot of the times a package has its own extensions (that may have >>> a different set of dependencies) and it is much easier to have all the >>> extensions in one repo for mmanaging the repo becuase it's easier to >>> keep consistencies and also it is much easier to track issues and >>> etc. when all of the related files are in the same repo. >> >> This is mostly unrelated to the bug at hand, but I just want to mention >> that you can still track multiple packages on multiple branches. It is >> easy to develop them all at once if you use git-worktree(1) to load all >> files at once. >> >>>> I am not sure I follow your argument. The other files are still >>>> installed and loadable, but broken since they are missing dependencies. >>>> That is the state I wish to avoid. >>>> >>>> There is a bug in the dependency resolution, but that is a separate >>>> issue IMO. >>> Yes, but this is exactly what MELPA does. It puts those files in the >>> laod path but ignores the "Package-Requires:" header when it comes to >>> installing package dependencies.=20 >> >> IIRC most packages that are developed in a shared repository on MELPA >> exclude the other files, so there is just a single package with a >> dependency list. The ELPA build server does something like that as >> well. >> >>> The reason I think this makes more >>> sense is because the dependencies are defined at the package level, >>> and therefore they should be defined once in the main file, otherwise, >>> the dependencies from all different files need to be compared at build >>> time and the common required set of dependecies and versions need to >>> be inferred. For example, as I showed with the embark example in my >>> previous email, different files can require the same package but with >>> a different minimum version.=20 >> >> I have already understood this point, don't worry. I hope the above >> patch or something based on that should fix the issue. Do you >> understand my point with missing dependencies breaking parts of the >> installed packages? >> >>>=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 >>> Right now `package-vc-installl' is >>> pulling different versions (in different folders under "/elpa" >>> directory) and I am not even sure in what order the different versions >>> of embark are loaded. This can lead to much bigger problems than the >>> issue you are trying to avoid (a.k.a. some featuers not working >>> because the dependency is not available). >> >> The trick we currently use is that VC packages have the highest priority >> in being loaded. It is not elegant, and it would be a nice thing to >> have some de-duplication to avoid installing embark if we already have a >> VC checkout of embark-consult. >> >>> Of course you can argue that there is a bug in dependency resolution, >>> but to me the easiest solution would be to do what MELPA does, inly >>> use the main file for inferring dependencies. Alternatively, if we add >>> features such as "include-files", "ignore-files", "clone-depth", etc, >>> as options for the recipe and do a much smarter job in inferring >>> dependencies (e.g. do not create self-dependency, only install the >>> highest required version of any package, ...), then there will be >>> other ways to avoid this kind of issue. >> >> Package-vc has two hard-constraints, 1. the package specification has to >> be compatible with ELPA package specifications 2. has to be VCS >> agnostic. A soft-but-important-constraint or goal is that the point of >> package-vc is to make package development easier, so excluding files >> from a checkout or manipulating the history is not something we are >> really interested in supporting.=20 >> >>> Best, >>> Armin >>> >>> >>> Philip Kaludercic @ 2025-02-17 17:24 : >>> >>>> Armin Darvish <armindarvish@HIDDEN> writes: >>>> >>>>> Hi Philip, >>>>> >>>>> I am on emacs versio 30.0.93. and I tried an init file like this: >>>>> ,---- >>>>> | ;;; init.el --- -*- lexical-binding: t; -*- >>>>> |=20 >>>>> | (require 'package) >>>>> | (package-initialize) >>>>> | (package-vc-install >>>>> | '(consult-omni :url "<https://github.com/armindarvish/consult-omn= i>" >>>>> | :main-file "consult-omni.el")) >>>>> `---- >>>> >>>> Yes, I can reproduce the issue now, thanks! >>>> >>>>>> The issue we have to keep in mind is that since we add the repository >>>>>> directly to `load-path', all the files can be used no matter what >>>>>> "specific" file you might intend to use. To retain usability and not >>>>>> have unexpected function calls fail, we rather install all the >>>>>> dependencies. >>>>> >>>>> My understanding was that packages are either a single-file package, >>>>> which won't have this problem, or a multi-file package, in which case, >>>>> the "Package-Requires: " header should only be in the main file and >>>>> not the extra lisp files. As far as I know, other package managing >>>>> systems (like MELPA) don't use hte "Package-Requires: " header in the >>>>> files other than the main lisp file either.=20 >>>> >>>> To clarify the terminology, ELPA/MELPA are package archives that take >>>> usually take a source code checkout and prepare packages. For each >>>> package, they might specify or infer a main file or some other source = of >>>> information to get the metadata like package dependencies, but they wi= ll >>>> also throw out all other files that are not part of the package. >>>> >>>> Package-vc is kind of like that, in that it is an independent >>>> implementation of ELPA's build scripts, but as the goal is to explicit= ly >>>> load the directory with the source code checkout we don't remove the >>>> "unrelated" files (that is one of the reasons we also advise against >>>> combining multiple packages in the same directory). >>>> >>>>> Note that, we can still >>>>> add all the files in the repo to load-path, but when automatically >>>>> making the "define-package" declaration in a "package-pkg.el" file, >>>>> the dependencies should be inferred form the main file and not others, >>>>> otherwise there will be weird looped dependencies.=20 >>>> >>>> I am not sure I follow your argument. The other files are still >>>> installed and loadable, but broken since they are missing dependencies. >>>> That is the state I wish to avoid. >>>> >>>> There is a bug in the dependency resolution, but that is a separate >>>> issue IMO. >>>> >>>>> For example, in >>>>> case of embark with the following init file: >>>>> >>>>> ,---- >>>>> | ;;; init.el --- -*- lexical-binding: t; -*- >>>>> |=20 >>>>> | (require 'package) >>>>> | ;; Adds the Melpa archive to the list of available repositories >>>>> | (setq package-archives >>>>> | '(("elpa" . "<https://elpa.gnu.org/packages/>") >>>>> | ("melpa-stable" . "<https://stable.melpa.org/packages/>") >>>>> | ("melpa" . "<https://melpa.org/packages/>"))) >>>>> | ;; Initializes the package infrastructure >>>>> | (package-initialize) >>>>> | (package-refresh-contents) >>>>> |=20 >>>>> | (use-package embark >>>>> | :vc (:url "<https://github.com/oantolin/embark>")) >>>>> |=20 >>>>> `---- >>>>> >>>>> I can see multiple versions of embark being pulled from MELPA becuase >>>>> of looped depenncies in the embark-pkg.el file automatically created >>>>> by package-vc-install. Here is the contents of that file: >>>>> >>>>> ,---- >>>>> | (define-package "embark" "1.1" "No description available." '((emacs >>>>> | "25.1") (embark "0.9") (avy "0.5") (emacs "27.1") (compat >>>>> | "29.1.4.0") (embark "1.0") (consult "1.0")) :kind vc :commit >>>>> | "195add1f1ccd1059472c9df7334c97c4d155425e") >>>>> `---- >>>>> >>>>> Note that while this installs just fine, it is pulling 3 different >>>>> versions of embark from MELPA becuase of this inferred looped >>>>> self-dependency from differnt *.el files in embark repo, which is not >>>>> the intended behavior by the author of that package. >>>>> >>>>> >>>>> That said, I agree with the point that there can potentially be other >>>>> solutions like terminating properly as you said or even better would >>>>> be detecting and ignoring any self-dependency. I cannot think of any >>>>> scenario where a package should depend on its own or on an older >>>>> version of its own. >>>> >>>> I agree. I'll try to find a solution to the issue by fixing the >>>> recursion issue and update this thread. >>>> >>>>> >>>>> Philip Kaludercic @ 2025-02-16 18:53 : >>>>> >>>>>> Armin Darvish <armindarvish@HIDDEN> writes: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I have noticed that with vc repositories that contain multiple >>>>>>> related single-file >>>>>>> packages, package-vc-install creates looped self-dependency that >>>>>>> can cause errors. >>>>>>> >>>>>>> For example, trying to install the repository:=20 >>>>>>> <https://github.com/armindarvish/consult-omni>=20 >>>>>>> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth= =E2=80=99: 1601" >>>>>>> error. This is >>>>>>> because currently package-vc-install tries to read all ".el" >>>>>>> files in the root >>>>>>> directory to get the dependencies and build the "define-package" >>>>>>> declaration in >>>>>>> consult-omni-pkg.el. This is not compatible with repositories >>>>>>> that have multiple >>>>>>> single-file packages in the root directory. Instead, the >>>>>>> dependencies should be >>>>>>> inferred from the main lisp file only. This will be safe with >>>>>>> multi-file packages >>>>>>> as well because the convention is to have the "Package-Requires:" >>>>>>> header only in >>>>>>> the main lisp file and not the additional lisp files. >>>>>> >>>>>> What version of Emacs are you using? Installing your repository doe= sn't >>>>>> raise any error when I try to do so. >>>>>> >>>>>>> There are other packages that have multiple single-file packages >>>>>>> as well, for >>>>>>> example, <https://github.com/oantolin/embark> includes embark and >>>>>>> embark-consult in >>>>>>> the root directory. Currently, installing embark with >>>>>>> package-vc-install causes >>>>>>> several different versions of embark being downlaoded because the >>>>>>> dependencies are >>>>>>> read from all of those files even though they are meant to be >>>>>>> separate packages. >>>>>> >>>>>> The issue we have to keep in mind is that since we add the repository >>>>>> directly to `load-path', all the files can be used no matter what >>>>>> "specific" file you might intend to use. To retain usability and not >>>>>> have unexpected function calls fail, we rather install all the >>>>>> dependencies. The recursion error above hints at some programming >>>>>> issue, where we don't terminate properly. >>>>>> >>>>>>> >>>>>>> Best Regards, >>>>>>> *Armin Darvish* >>>>>>> >>>>>>> -- >>>>>>> -------------------------------------------------------------------= ----- >>>>>>> [www.armindarvish.com] >>>>>>> >>>>>>> >>>>>>> [www.armindarvish.com] <https://www.armindarvish.com/>
bug-gnu-emacs@HIDDEN
:bug#76325
; Package emacs
.
Full text available.Received: (at 76325) by debbugs.gnu.org; 18 Feb 2025 07:11:08 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 18 02:11:08 2025 Received: from localhost ([127.0.0.1]:53950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tkHl5-00056S-Ga for submit <at> debbugs.gnu.org; Tue, 18 Feb 2025 02:11:08 -0500 Received: from mout02.posteo.de ([185.67.36.66]:39603) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <philipk@HIDDEN>) id 1tkHkz-00055F-VG for 76325 <at> debbugs.gnu.org; Tue, 18 Feb 2025 02:11:05 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 5E372240101 for <76325 <at> debbugs.gnu.org>; Tue, 18 Feb 2025 08:10:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1739862655; bh=Ydjrcw1mJYAd+4D/C2goP4fHzjS9weNhLlQtptLrD7U=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=lgldJD8o+7q4VbgvXmwTUMVUplMVIoFPw7ZasklEx9F+ZxbOscQyxfd3SoQOOHceg RAyVnJRLMvtA4d++6jVDEwNj/WYYy+wpMePCdxr6GKUt/oFn2Ik+QNv9kZ8EN3eiou 6ekeREb5kR7VcC7g8ktPBukPobBWgiTkZ0pL7rhsaStmf7zqGhZ6PpSxxtYnHWKEIB pku/WF73egcIkSaCajEGyNPqIaNgsGk2Do/1umT/B2Onf7zqQuf3WBbLuXadK3VxZK pfUJ47oi8L/B0T28E9xNyQNBXr71NU2ZMgr+6qiL2ymmkacXGn7TF6PWYikJcTSkCu jPJq6cXQbAJRw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YxrKB5V3Mz9rxF for <76325 <at> debbugs.gnu.org>; Tue, 18 Feb 2025 08:10:54 +0100 (CET) Resent-To: 76325 <at> debbugs.gnu.org Resent-From: Philip Kaludercic <philipk@HIDDEN> Resent-Date: Tue, 18 Feb 2025 08:10:53 +0100 Resent-Message-ID: <87zfijpw1u.fsf@HIDDEN> From: Philip Kaludercic <philipk@HIDDEN> To: Armin Darvish <armindarvish@HIDDEN> Subject: Re: bug#76325: 30.0.93; package-vc-install fails with repositories that contain multiple single-file packages In-Reply-To: <m2r03w4dlg.fsf@HIDDEN> References: <m2cyfin7af.fsf@HIDDEN> <87wmdpbu14.fsf@HIDDEN> <m2v7t9o0tn.fsf@HIDDEN> <87jz9obi20.fsf@HIDDEN> <m2r03w4dlg.fsf@HIDDEN> Autocrypt: addr=philipk@HIDDEN; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Mon, 17 Feb 2025 21:19:00 +0000 Message-ID: <878qq4b77f.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76325 Cc: 76325 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Content-Disposition: inline I came up with this change, which appears to fix the issue on my end: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index a18841fb64d..1dc427d13ac 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -485,10 +485,21 @@ package-vc--unpack-1 lm--prepare-package-dependencies (nconc deps) (setq deps)))))) - (dolist (dep deps) - (cl-callf version-to-list (cadr dep))) - (setf (package-desc-reqs pkg-desc) deps) - (setf missing (package-vc-install-dependencies (delete-dups deps))) + (setf (package-desc-reqs pkg-desc) + (cl-loop with lessp = (lambda (a b) + (if (eq (car a) (car b)) + (version< (cadr b) (cadr b)) + (value< (car a) (car b)))) + ;; sort the dependency list to have the newest + ;; versions at the end of the list, so that when + ;; iterating through the list we only request to + ;; install the newest necessary dependency: + with deps = (sort deps :lessp lessp) + for rest on (cdr deps) + for (name vers) in deps + unless (assq name deps) + collect (list name (version-to-list vers)))) + (setf missing (package-vc-install-dependencies deps)) (setf missing (delq (assq (package-desc-name pkg-desc) missing) missing))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Can you try it out as well? Armin Darvish <armindarvish@HIDDEN> writes: > Hi Philip, > >>To clarify the terminology, ELPA/MELPA are package archives that take >>usually take a source code checkout and prepare packages. For each >>package, they might specify or infer a main file or some other source of >>information to get the metadata like package dependencies, but they will >>also throw out all other files that are not part of the package. > Yes, what I meant was how MELPA builds. Wile it does put the files in > load-path as well, but it ignores the "Package-Requires:" header for > inferring package dependencies in all other files, but the main lisp > file, and it can of course run into the problem you are trying to > avoid but I would argue the MELPA's approach is better (see below). But MELPA and package-vc are solving different problems (preparing a tarball from a VC checkout vs. making a VC checkout loadable by package.el). >>Package-vc is kind of like that, in that it is an independent >>implementation of ELPA's build scripts, but as the goal is to explicitly >>load the directory with the source code checkout we don't remove the >>"unrelated" files (that is one of the reasons we also advise against >>combining multiple packages in the same directory). > > I understand the advice against multiple packages in the same repo, > but a lot of the times a package has its own extensions (that may have > a different set of dependencies) and it is much easier to have all the > extensions in one repo for mmanaging the repo becuase it's easier to > keep consistencies and also it is much easier to track issues and > etc. when all of the related files are in the same repo. This is mostly unrelated to the bug at hand, but I just want to mention that you can still track multiple packages on multiple branches. It is easy to develop them all at once if you use git-worktree(1) to load all files at once. >> I am not sure I follow your argument. The other files are still >> installed and loadable, but broken since they are missing dependencies. >> That is the state I wish to avoid. >> >> There is a bug in the dependency resolution, but that is a separate >> issue IMO. > Yes, but this is exactly what MELPA does. It puts those files in the > laod path but ignores the "Package-Requires:" header when it comes to > installing package dependencies.=20 IIRC most packages that are developed in a shared repository on MELPA exclude the other files, so there is just a single package with a dependency list. The ELPA build server does something like that as well. > The reason I think this makes more > sense is because the dependencies are defined at the package level, > and therefore they should be defined once in the main file, otherwise, > the dependencies from all different files need to be compared at build > time and the common required set of dependecies and versions need to > be inferred. For example, as I showed with the embark example in my > previous email, different files can require the same package but with > a different minimum version.=20 I have already understood this point, don't worry. I hope the above patch or something based on that should fix the issue. Do you understand my point with missing dependencies breaking parts of the installed packages? >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 > Right now `package-vc-installl' is > pulling different versions (in different folders under "/elpa" > directory) and I am not even sure in what order the different versions > of embark are loaded. This can lead to much bigger problems than the > issue you are trying to avoid (a.k.a. some featuers not working > because the dependency is not available). The trick we currently use is that VC packages have the highest priority in being loaded. It is not elegant, and it would be a nice thing to have some de-duplication to avoid installing embark if we already have a VC checkout of embark-consult. > Of course you can argue that there is a bug in dependency resolution, > but to me the easiest solution would be to do what MELPA does, inly > use the main file for inferring dependencies. Alternatively, if we add > features such as "include-files", "ignore-files", "clone-depth", etc, > as options for the recipe and do a much smarter job in inferring > dependencies (e.g. do not create self-dependency, only install the > highest required version of any package, ...), then there will be > other ways to avoid this kind of issue. Package-vc has two hard-constraints, 1. the package specification has to be compatible with ELPA package specifications 2. has to be VCS agnostic. A soft-but-important-constraint or goal is that the point of package-vc is to make package development easier, so excluding files from a checkout or manipulating the history is not something we are really interested in supporting.=20 > Best, > Armin > > > Philip Kaludercic @ 2025-02-17 17:24 : > >> Armin Darvish <armindarvish@HIDDEN> writes: >> >>> Hi Philip, >>> >>> I am on emacs versio 30.0.93. and I tried an init file like this: >>> ,---- >>> | ;;; init.el --- -*- lexical-binding: t; -*- >>> |=20 >>> | (require 'package) >>> | (package-initialize) >>> | (package-vc-install >>> | '(consult-omni :url "<https://github.com/armindarvish/consult-omni>" >>> | :main-file "consult-omni.el")) >>> `---- >> >> Yes, I can reproduce the issue now, thanks! >> >>>> The issue we have to keep in mind is that since we add the repository >>>> directly to `load-path', all the files can be used no matter what >>>> "specific" file you might intend to use. To retain usability and not >>>> have unexpected function calls fail, we rather install all the >>>> dependencies. >>> >>> My understanding was that packages are either a single-file package, >>> which won't have this problem, or a multi-file package, in which case, >>> the "Package-Requires: " header should only be in the main file and >>> not the extra lisp files. As far as I know, other package managing >>> systems (like MELPA) don't use hte "Package-Requires: " header in the >>> files other than the main lisp file either.=20 >> >> To clarify the terminology, ELPA/MELPA are package archives that take >> usually take a source code checkout and prepare packages. For each >> package, they might specify or infer a main file or some other source of >> information to get the metadata like package dependencies, but they will >> also throw out all other files that are not part of the package. >> >> Package-vc is kind of like that, in that it is an independent >> implementation of ELPA's build scripts, but as the goal is to explicitly >> load the directory with the source code checkout we don't remove the >> "unrelated" files (that is one of the reasons we also advise against >> combining multiple packages in the same directory). >> >>> Note that, we can still >>> add all the files in the repo to load-path, but when automatically >>> making the "define-package" declaration in a "package-pkg.el" file, >>> the dependencies should be inferred form the main file and not others, >>> otherwise there will be weird looped dependencies.=20 >> >> I am not sure I follow your argument. The other files are still >> installed and loadable, but broken since they are missing dependencies. >> That is the state I wish to avoid. >> >> There is a bug in the dependency resolution, but that is a separate >> issue IMO. >> >>> For example, in >>> case of embark with the following init file: >>> >>> ,---- >>> | ;;; init.el --- -*- lexical-binding: t; -*- >>> |=20 >>> | (require 'package) >>> | ;; Adds the Melpa archive to the list of available repositories >>> | (setq package-archives >>> | '(("elpa" . "<https://elpa.gnu.org/packages/>") >>> | ("melpa-stable" . "<https://stable.melpa.org/packages/>") >>> | ("melpa" . "<https://melpa.org/packages/>"))) >>> | ;; Initializes the package infrastructure >>> | (package-initialize) >>> | (package-refresh-contents) >>> |=20 >>> | (use-package embark >>> | :vc (:url "<https://github.com/oantolin/embark>")) >>> |=20 >>> `---- >>> >>> I can see multiple versions of embark being pulled from MELPA becuase >>> of looped depenncies in the embark-pkg.el file automatically created >>> by package-vc-install. Here is the contents of that file: >>> >>> ,---- >>> | (define-package "embark" "1.1" "No description available." '((emacs >>> | "25.1") (embark "0.9") (avy "0.5") (emacs "27.1") (compat >>> | "29.1.4.0") (embark "1.0") (consult "1.0")) :kind vc :commit >>> | "195add1f1ccd1059472c9df7334c97c4d155425e") >>> `---- >>> >>> Note that while this installs just fine, it is pulling 3 different >>> versions of embark from MELPA becuase of this inferred looped >>> self-dependency from differnt *.el files in embark repo, which is not >>> the intended behavior by the author of that package. >>> >>> >>> That said, I agree with the point that there can potentially be other >>> solutions like terminating properly as you said or even better would >>> be detecting and ignoring any self-dependency. I cannot think of any >>> scenario where a package should depend on its own or on an older >>> version of its own. >> >> I agree. I'll try to find a solution to the issue by fixing the >> recursion issue and update this thread. >> >>> >>> Philip Kaludercic @ 2025-02-16 18:53 : >>> >>>> Armin Darvish <armindarvish@HIDDEN> writes: >>>> >>>>> Hello, >>>>> >>>>> I have noticed that with vc repositories that contain multiple >>>>> related single-file >>>>> packages, package-vc-install creates looped self-dependency that >>>>> can cause errors. >>>>> >>>>> For example, trying to install the repository:=20 >>>>> <https://github.com/armindarvish/consult-omni>=20 >>>>> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2= =80=99: 1601" >>>>> error. This is >>>>> because currently package-vc-install tries to read all ".el" >>>>> files in the root >>>>> directory to get the dependencies and build the "define-package" >>>>> declaration in >>>>> consult-omni-pkg.el. This is not compatible with repositories >>>>> that have multiple >>>>> single-file packages in the root directory. Instead, the >>>>> dependencies should be >>>>> inferred from the main lisp file only. This will be safe with >>>>> multi-file packages >>>>> as well because the convention is to have the "Package-Requires:" >>>>> header only in >>>>> the main lisp file and not the additional lisp files. >>>> >>>> What version of Emacs are you using? Installing your repository doesn= 't >>>> raise any error when I try to do so. >>>> >>>>> There are other packages that have multiple single-file packages >>>>> as well, for >>>>> example, <https://github.com/oantolin/embark> includes embark and >>>>> embark-consult in >>>>> the root directory. Currently, installing embark with >>>>> package-vc-install causes >>>>> several different versions of embark being downlaoded because the >>>>> dependencies are >>>>> read from all of those files even though they are meant to be >>>>> separate packages. >>>> >>>> The issue we have to keep in mind is that since we add the repository >>>> directly to `load-path', all the files can be used no matter what >>>> "specific" file you might intend to use. To retain usability and not >>>> have unexpected function calls fail, we rather install all the >>>> dependencies. The recursion error above hints at some programming >>>> issue, where we don't terminate properly. >>>> >>>>> >>>>> Best Regards, >>>>> *Armin Darvish* >>>>> >>>>> -- >>>>> ---------------------------------------------------------------------= --- >>>>> [www.armindarvish.com] >>>>> >>>>> >>>>> [www.armindarvish.com] <https://www.armindarvish.com/> --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#76325
; Package emacs
.
Full text available.Received: (at 76325) by debbugs.gnu.org; 18 Feb 2025 07:10:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 18 02:10:09 2025 Received: from localhost ([127.0.0.1]:53933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tkHk1-0004ux-Hx for submit <at> debbugs.gnu.org; Tue, 18 Feb 2025 02:10:08 -0500 Received: from mout01.posteo.de ([185.67.36.141]:50981) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <armindarvish@HIDDEN>) id 1tkHjx-0004uB-2a for 76325 <at> debbugs.gnu.org; Tue, 18 Feb 2025 02:09:59 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id C2832240027 for <76325 <at> debbugs.gnu.org>; Tue, 18 Feb 2025 08:09:50 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YxrHx4XMsz9rxQ for <76325 <at> debbugs.gnu.org>; Tue, 18 Feb 2025 08:09:49 +0100 (CET) Resent-To: 76325 <at> debbugs.gnu.org Resent-From: Philip Kaludercic <philipk@HIDDEN> Resent-Date: Tue, 18 Feb 2025 08:09:48 +0100 Resent-Message-ID: <874j0rrao3.fsf@HIDDEN> Received: from proxy02.posteo.name ([127.0.0.1]) by dovecot05.posteo.name (Dovecot) with LMTP id vIVvFpC/s2f8aQIArfqFjw for <philipk@HIDDEN>; Tue, 18 Feb 2025 00:56:16 +0100 Received: from proxy02.posteo.de ([127.0.0.1]) by proxy02.posteo.name (Dovecot) with LMTP id Vs5KBBjCs2ezLAMAGFAyLg ; Tue, 18 Feb 2025 00:56:16 +0100 Received: from mailin02.posteo.de (unknown [10.0.0.62]) by proxy02.posteo.de (Postfix) with ESMTPS id 4Yxfgh5RTmzyl2 for <philipk@HIDDEN>; Tue, 18 Feb 2025 00:56:16 +0100 (CET) Received: from mx01.posteo.de (mailin02.posteo.de [127.0.0.1]) by mailin02.posteo.de (Postfix) with ESMTP id AB4442046C for <philipk@HIDDEN>; Tue, 18 Feb 2025 00:56:16 +0100 (CET) X-Posteo-Spam-Status: v=1; e=base64; a=aes-256-gcm; d=Cmsceu19nTKR6eoEJxx3UOHmSR3M9OO3tOTnC64eiXt1+DDUJeS43YEi8h13FM1u08aeJxslP WawxQSRTqFX/7HhDJixGr5I/RPmObpTKc4zN53HTQ6APmyoYoBJW79IyBy+n/5tkVbFiH4Rb1lc 50q8d4LxFjlX61U8qxOQqR61odSdxSjn4OE51xYl98SOBjaBVabyH+8MQ7pRgCqSiXdsLYOgBp/ Uwwk0J6DHN/TS4pV3Alw1MUtss9SCrm23iAbW7AldyotpQANmfpkEZRendUSVUJub02cVsu2RNj KHrD/+K74vbv6R8HGdXRqX4iCvLZunccWs2sf7rtG6X+XrwquAC2+Sa5j1wsvFpiI1Aob1oRx40 IgFFNWJ5Ze9VblXwarJn4Paa7E8pp8whEC2LqHcbcBxa6ENYsLNCdhsJ62d60MOJA1PHlcBs5gB 05hONWU5SKK0esfzzBkCJibCrbm2yNfDv6ePWu+Y+3Thh1NN2oYe5prrqXEXFJwOYq8ZkmxatfK Lw5t+/1IvtY2OhEzWnQe7spKVWNTqbi6cfQd4nLceMA== Authentication-Results: posteo.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: posteo.de; spf=pass smtp.mailfrom=gmail.com X-Posteo-Antispam-Signature: v=1; e=base64; a=aes-256-gcm; d=T9h3aXRY2GjZ+PTVUB7k2bFGEnKMarmYYHy32+T7JerkfmITiMOzeMAg5Y2DcS+f1EczcrR+ONMRgwDcj4X1vCWyq96MzJLArvxmjuFriheLuiPT48BQbhyx19dE4VZOYh8ocZ0F Authentication-Results: posteo.de; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KazvYLVG; dkim-atps=neutral X-Posteo-TLS-Received-Status: TLSv1.3 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx01.posteo.de (Postfix) with ESMTPS id 4Yxfgf4qfGz10V7 for <philipk@HIDDEN>; Tue, 18 Feb 2025 00:56:14 +0100 (CET) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-38f26a82d1dso2261912f8f.2 for <philipk@HIDDEN>; Mon, 17 Feb 2025 15:56:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739836573; x=1740441373; darn=posteo.net; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=7NEajFGNWas/KyPh6UYHU/Ur3R4I5GIzIp03MoEUNRM=; b=KazvYLVGI+onxg1UReg149CQaZxT7bG0rbyI/rZLgCyhvdYGsXLimSs14U0pliyzEM c2QEkLNN31zPBAY0sXBeZqz5JfPTt+4QetqgdbzfroH8QpMXoMo9hbf8xsGogaJZfkT4 32IvbpjbOpqAo2XKlDGfN0dTITsQzR82nCDugqS6aQ6UDkpdzPvkoIwUKR4IZQKPGbhW 6LGQ5tB7ispvFEQE+WxfoEtHdNcGbI/UL1iNITup3kiBXknn4ojDAO4GAsriDJ2gx7sG 84UTlYx68oWtIniuRek89j4c2V8Tlq/Ka6+a2962gFPWztq+ZsZm1tntm8jFTNDCbWPq qaoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739836573; x=1740441373; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7NEajFGNWas/KyPh6UYHU/Ur3R4I5GIzIp03MoEUNRM=; b=MoWqy1xHshv3J2DfJCFe9zNlu4Zb9xMjt3wSUEIayU5uUTlQ4ePAlJhecLpIlFUcoZ wHltVyUJBXOpGuamEZxG4ioeam2R75XITDezsk+/r/N0kH7sqJd3k5R+Bo36jfu9bKej CVALukDwVjbKjtMv5BfYY6U0P/6BGXpG9S5ZcpcZJ05mt3AH1qJPfe5l05XZwi8Sr29Z 7rnF+NN44dljmyjGJy0kYyMzG3Zd6c6QIp5tNP0f/BA/6rgOJFZMooUrapzDAgAIpyaJ T27q74esS+xeYwb092eIQDUxUxZ+Ia4iLZZ/jmJAa289PFVb7HaqXCCs3dJYMNdUFjkY kTyg== X-Gm-Message-State: AOJu0Yzqk2v5hGu1O3rMA5ezcPsR9Q1LUXR47RgeNkuteOyt2Pgf/LTI T90OelqteNOTNyTa8g2j7H4UXpW5Ii3aavPagkvn+OTjowHwWyaH5tgdsWiRWMY= X-Gm-Gg: ASbGnctkb/amVGnWxCo/lAt6kud7F98G41NiKPomIgV+wlsD1i5aG6rVZT8a/vRB1Mp Dy0cWvYPZCTB6jRTWzLwZtZr0UGQujjxyKtNyJ29dot9SwV2JsmBf1wTQDaxYGfbZ8NwrWtT+rh 6Kqxmpdlgwx7epc7mID9WLQk8LOavBFwxftq0Z8QOduNImST/qMEy/eJt0LK6HYI0OB4V7K/GCn zgun3pOMNroLq/XqEKxpO9sJnJddFrLKovm7Db5QLKRHSh504dAKkJUlsqlRdfwVnC9Ubce8954 l+p4EtqTOvX9sMlghuVOZhCGec8DazQ= X-Google-Smtp-Source: AGHT+IFoCivs8f9BXGTVdBgTV6nuCr29YuSTqmQJeTO1irSDLZPjbd0RWDvAifxsqrxHjpmIqX1OKA== X-Received: by 2002:a05:6000:1569:b0:38f:5057:5810 with SMTP id ffacd0b85a97d-38f50575957mr1232873f8f.25.1739836572944; Mon, 17 Feb 2025 15:56:12 -0800 (PST) From: Armin Darvish <armindarvish@HIDDEN> To: Philip Kaludercic <philipk@HIDDEN> Subject: Re: bug#76325: 30.0.93; package-vc-install fails with repositories that contain multiple single-file packages In-Reply-To: <878qq4b77f.fsf@HIDDEN> (Philip Kaludercic's message of "Mon, 17 Feb 2025 21:19:00 +0000") References: <m2cyfin7af.fsf@HIDDEN> <87wmdpbu14.fsf@HIDDEN> <m2v7t9o0tn.fsf@HIDDEN> <87jz9obi20.fsf@HIDDEN> <m2r03w4dlg.fsf@HIDDEN> <878qq4b77f.fsf@HIDDEN> Date: Mon, 17 Feb 2025 23:56:08 +0000 Message-ID: <m2ikp8gm7b.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 76325 Cc: 76325 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Philip, > I came up with this change, which appears to fix the issue on my end: > Can you try it out as well? That seems to solve the issue with multiple versions (for example for embar= k) but still does not detect self-dependency. The embark-pkg.el in this cas= e still looks the same: ,---- | ;;; Generated package description from embark.el -*- no-byte-compile: t = -*- | (define-package "embark" "1.1" "No description available." '((emacs "25.1= ") (embark "0.9") (avy "0.5") (emacs "27.1") (compat "29.1.4.0") (embark "1= .0") (consult "1.0")) :kind vc :commit "195add1f1ccd1059472c9df7334c97c4d15= 5425e") `---- But in this case only "embark 1.1" got installed alongside the actual vc-in= stall of embark. > Do you understand my point with missing dependencies breaking parts of t= he installed packages? Yes I fully understand your argument, but I do not know of any packages tha= t the "Package-Requires: " header are split among different lisp files, unl= ess they are meant to be installed as separate packages (i.e. requires two = separate "define-package" statements). If that's indeed something that peop= le do often, then your concern is very well justified. > A soft-but-important-constraint or goal is that the point of > package-vc is to make package development easier, so excluding files > from a checkout or manipulating the history is not something we are > really interested in supporting. I think the ability to exclude and include files, etc. would also help maki= ng package development easier. It might be a nice-to-have feature that is n= ot high priority with limited contributors, etc. but I don't think it is fu= ndamentally out of scope for what package-vc is potentially useful for, but= that's just my opinion. Anyway, I don't intend to drag the arguments here as I think you already un= derstand the points I wanted to make, and I do not have the full picture of= the development efforts. I believe it is clear that the dependency managem= ent in package-vc-install can use some improvements, but the solution and i= mplementation details are up to the devs to figure out what's the best path= forward. Let me know if there is anything else I can help with. Best, Armin Philip Kaludercic @ 2025-02-17 21:19 : > I came up with this change, which appears to fix the issue on my end: > > diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el > index a18841fb64d..1dc427d13ac 100644 > --- a/lisp/emacs-lisp/package-vc.el > +++ b/lisp/emacs-lisp/package-vc.el > @@ -485,10 +485,21 @@ package-vc--unpack-1 > lm--prepare-package-dependencies > (nconc deps) > (setq deps)))))) > - (dolist (dep deps) > - (cl-callf version-to-list (cadr dep))) > - (setf (package-desc-reqs pkg-desc) deps) > - (setf missing (package-vc-install-dependencies (delete-dups deps))) > + (setf (package-desc-reqs pkg-desc) > + (cl-loop with lessp =3D (lambda (a b) > + (if (eq (car a) (car b)) > + (version< (cadr b) (cadr b)) > + (value< (car a) (car b)))) > + ;; sort the dependency list to have the newest > + ;; versions at the end of the list, so that when > + ;; iterating through the list we only request to > + ;; install the newest necessary dependency: > + with deps =3D (sort deps :lessp lessp) > + for rest on (cdr deps) > + for (name vers) in deps > + unless (assq name deps) > + collect (list name (version-to-list vers)))) > + (setf missing (package-vc-install-dependencies deps)) > (setf missing (delq (assq (package-desc-name pkg-desc) > missing) > missing))) > > > Can you try it out as well? > > Armin Darvish <armindarvish@HIDDEN> writes: > >> Hi Philip, >> >>>To clarify the terminology, ELPA/MELPA are package archives that take >>>usually take a source code checkout and prepare packages. For each >>>package, they might specify or infer a main file or some other source of >>>information to get the metadata like package dependencies, but they will >>>also throw out all other files that are not part of the package. >> Yes, what I meant was how MELPA builds. Wile it does put the files in >> load-path as well, but it ignores the "Package-Requires:" header for >> inferring package dependencies in all other files, but the main lisp >> file, and it can of course run into the problem you are trying to >> avoid but I would argue the MELPA's approach is better (see below). > > But MELPA and package-vc are solving different problems (preparing a > tarball from a VC checkout vs. making a VC checkout loadable by > package.el). > >>>Package-vc is kind of like that, in that it is an independent >>>implementation of ELPA's build scripts, but as the goal is to explicitly >>>load the directory with the source code checkout we don't remove the >>>"unrelated" files (that is one of the reasons we also advise against >>>combining multiple packages in the same directory). >> >> I understand the advice against multiple packages in the same repo, >> but a lot of the times a package has its own extensions (that may have >> a different set of dependencies) and it is much easier to have all the >> extensions in one repo for mmanaging the repo becuase it's easier to >> keep consistencies and also it is much easier to track issues and >> etc. when all of the related files are in the same repo. > > This is mostly unrelated to the bug at hand, but I just want to mention > that you can still track multiple packages on multiple branches. It is > easy to develop them all at once if you use git-worktree(1) to load all > files at once. > >>> I am not sure I follow your argument. The other files are still >>> installed and loadable, but broken since they are missing dependencies. >>> That is the state I wish to avoid. >>> >>> There is a bug in the dependency resolution, but that is a separate >>> issue IMO. >> Yes, but this is exactly what MELPA does. It puts those files in the >> laod path but ignores the "Package-Requires:" header when it comes to >> installing package dependencies.=20 > > IIRC most packages that are developed in a shared repository on MELPA > exclude the other files, so there is just a single package with a > dependency list. The ELPA build server does something like that as > well. > >> The reason I think this makes more >> sense is because the dependencies are defined at the package level, >> and therefore they should be defined once in the main file, otherwise, >> the dependencies from all different files need to be compared at build >> time and the common required set of dependecies and versions need to >> be inferred. For example, as I showed with the embark example in my >> previous email, different files can require the same package but with >> a different minimum version.=20 > > I have already understood this point, don't worry. I hope the above > patch or something based on that should fix the issue. Do you > understand my point with missing dependencies breaking parts of the > installed packages? > >>=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20 >> Right now `package-vc-installl' is >> pulling different versions (in different folders under "/elpa" >> directory) and I am not even sure in what order the different versions >> of embark are loaded. This can lead to much bigger problems than the >> issue you are trying to avoid (a.k.a. some featuers not working >> because the dependency is not available). > > The trick we currently use is that VC packages have the highest priority > in being loaded. It is not elegant, and it would be a nice thing to > have some de-duplication to avoid installing embark if we already have a > VC checkout of embark-consult. > >> Of course you can argue that there is a bug in dependency resolution, >> but to me the easiest solution would be to do what MELPA does, inly >> use the main file for inferring dependencies. Alternatively, if we add >> features such as "include-files", "ignore-files", "clone-depth", etc, >> as options for the recipe and do a much smarter job in inferring >> dependencies (e.g. do not create self-dependency, only install the >> highest required version of any package, ...), then there will be >> other ways to avoid this kind of issue. > > Package-vc has two hard-constraints, 1. the package specification has to > be compatible with ELPA package specifications 2. has to be VCS > agnostic. A soft-but-important-constraint or goal is that the point of > package-vc is to make package development easier, so excluding files > from a checkout or manipulating the history is not something we are > really interested in supporting.=20 > >> Best, >> Armin >> >> >> Philip Kaludercic @ 2025-02-17 17:24 : >> >>> Armin Darvish <armindarvish@HIDDEN> writes: >>> >>>> Hi Philip, >>>> >>>> I am on emacs versio 30.0.93. and I tried an init file like this: >>>> ,---- >>>> | ;;; init.el --- -*- lexical-binding: t; -*- >>>> |=20 >>>> | (require 'package) >>>> | (package-initialize) >>>> | (package-vc-install >>>> | '(consult-omni :url "<https://github.com/armindarvish/consult-omni= >" >>>> | :main-file "consult-omni.el")) >>>> `---- >>> >>> Yes, I can reproduce the issue now, thanks! >>> >>>>> The issue we have to keep in mind is that since we add the repository >>>>> directly to `load-path', all the files can be used no matter what >>>>> "specific" file you might intend to use. To retain usability and not >>>>> have unexpected function calls fail, we rather install all the >>>>> dependencies. >>>> >>>> My understanding was that packages are either a single-file package, >>>> which won't have this problem, or a multi-file package, in which case, >>>> the "Package-Requires: " header should only be in the main file and >>>> not the extra lisp files. As far as I know, other package managing >>>> systems (like MELPA) don't use hte "Package-Requires: " header in the >>>> files other than the main lisp file either.=20 >>> >>> To clarify the terminology, ELPA/MELPA are package archives that take >>> usually take a source code checkout and prepare packages. For each >>> package, they might specify or infer a main file or some other source of >>> information to get the metadata like package dependencies, but they will >>> also throw out all other files that are not part of the package. >>> >>> Package-vc is kind of like that, in that it is an independent >>> implementation of ELPA's build scripts, but as the goal is to explicitly >>> load the directory with the source code checkout we don't remove the >>> "unrelated" files (that is one of the reasons we also advise against >>> combining multiple packages in the same directory). >>> >>>> Note that, we can still >>>> add all the files in the repo to load-path, but when automatically >>>> making the "define-package" declaration in a "package-pkg.el" file, >>>> the dependencies should be inferred form the main file and not others, >>>> otherwise there will be weird looped dependencies.=20 >>> >>> I am not sure I follow your argument. The other files are still >>> installed and loadable, but broken since they are missing dependencies. >>> That is the state I wish to avoid. >>> >>> There is a bug in the dependency resolution, but that is a separate >>> issue IMO. >>> >>>> For example, in >>>> case of embark with the following init file: >>>> >>>> ,---- >>>> | ;;; init.el --- -*- lexical-binding: t; -*- >>>> |=20 >>>> | (require 'package) >>>> | ;; Adds the Melpa archive to the list of available repositories >>>> | (setq package-archives >>>> | '(("elpa" . "<https://elpa.gnu.org/packages/>") >>>> | ("melpa-stable" . "<https://stable.melpa.org/packages/>") >>>> | ("melpa" . "<https://melpa.org/packages/>"))) >>>> | ;; Initializes the package infrastructure >>>> | (package-initialize) >>>> | (package-refresh-contents) >>>> |=20 >>>> | (use-package embark >>>> | :vc (:url "<https://github.com/oantolin/embark>")) >>>> |=20 >>>> `---- >>>> >>>> I can see multiple versions of embark being pulled from MELPA becuase >>>> of looped depenncies in the embark-pkg.el file automatically created >>>> by package-vc-install. Here is the contents of that file: >>>> >>>> ,---- >>>> | (define-package "embark" "1.1" "No description available." '((emacs >>>> | "25.1") (embark "0.9") (avy "0.5") (emacs "27.1") (compat >>>> | "29.1.4.0") (embark "1.0") (consult "1.0")) :kind vc :commit >>>> | "195add1f1ccd1059472c9df7334c97c4d155425e") >>>> `---- >>>> >>>> Note that while this installs just fine, it is pulling 3 different >>>> versions of embark from MELPA becuase of this inferred looped >>>> self-dependency from differnt *.el files in embark repo, which is not >>>> the intended behavior by the author of that package. >>>> >>>> >>>> That said, I agree with the point that there can potentially be other >>>> solutions like terminating properly as you said or even better would >>>> be detecting and ignoring any self-dependency. I cannot think of any >>>> scenario where a package should depend on its own or on an older >>>> version of its own. >>> >>> I agree. I'll try to find a solution to the issue by fixing the >>> recursion issue and update this thread. >>> >>>> >>>> Philip Kaludercic @ 2025-02-16 18:53 : >>>> >>>>> Armin Darvish <armindarvish@HIDDEN> writes: >>>>> >>>>>> Hello, >>>>>> >>>>>> I have noticed that with vc repositories that contain multiple >>>>>> related single-file >>>>>> packages, package-vc-install creates looped self-dependency that >>>>>> can cause errors. >>>>>> >>>>>> For example, trying to install the repository:=20 >>>>>> <https://github.com/armindarvish/consult-omni>=20 >>>>>> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2= =80=99: 1601" >>>>>> error. This is >>>>>> because currently package-vc-install tries to read all ".el" >>>>>> files in the root >>>>>> directory to get the dependencies and build the "define-package" >>>>>> declaration in >>>>>> consult-omni-pkg.el. This is not compatible with repositories >>>>>> that have multiple >>>>>> single-file packages in the root directory. Instead, the >>>>>> dependencies should be >>>>>> inferred from the main lisp file only. This will be safe with >>>>>> multi-file packages >>>>>> as well because the convention is to have the "Package-Requires:" >>>>>> header only in >>>>>> the main lisp file and not the additional lisp files. >>>>> >>>>> What version of Emacs are you using? Installing your repository does= n't >>>>> raise any error when I try to do so. >>>>> >>>>>> There are other packages that have multiple single-file packages >>>>>> as well, for >>>>>> example, <https://github.com/oantolin/embark> includes embark and >>>>>> embark-consult in >>>>>> the root directory. Currently, installing embark with >>>>>> package-vc-install causes >>>>>> several different versions of embark being downlaoded because the >>>>>> dependencies are >>>>>> read from all of those files even though they are meant to be >>>>>> separate packages. >>>>> >>>>> The issue we have to keep in mind is that since we add the repository >>>>> directly to `load-path', all the files can be used no matter what >>>>> "specific" file you might intend to use. To retain usability and not >>>>> have unexpected function calls fail, we rather install all the >>>>> dependencies. The recursion error above hints at some programming >>>>> issue, where we don't terminate properly. >>>>> >>>>>> >>>>>> Best Regards, >>>>>> *Armin Darvish* >>>>>> >>>>>> -- >>>>>> --------------------------------------------------------------------= ---- >>>>>> [www.armindarvish.com] >>>>>> >>>>>> >>>>>> [www.armindarvish.com] <https://www.armindarvish.com/> --=20 Best Regards, *Armin Darvish* ------------------------------------------------------------------------ [www.armindarvish.com] [www.armindarvish.com] <https://www.armindarvish.com/> --==-=-= Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable <html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en"><h= ead><!-- 2025-02-17 Mon 15:56 --><meta http-equiv=3D"Content-Type" content= =3D"text/html;charset=3Dutf-8"/><meta name=3D"viewport" content=3D"width=3D= device-width, initial-scale=3D1"/><meta name=3D"generator" content=3D"Org M= ode"/></head><body> <div style=3D"font-family:"Arial";font-size:10pt;line-height:11pt= ;" id=3D"content"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hi Philip,<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;border-left:3px solid #ccc= ;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I came up with this change, which appears to fix the issue on my end:<br/> Can you try it out as well?<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> That seems to solve the issue with multiple versions (for example for embar= k) but still does not detect self-dependency. The embark-pkg.el in this cas= e still looks the same:<br/></p> <div style=3D"margin-top:10px;font-family:"Arial";font-size:10pt;= line-height:11pt;"> <pre style=3D"line-height:12pt;color:#EEFFFF;background-color:#15181B;margi= n:0px;font-size:9pt;font-family:monospace;"><span style=3D"color: #8F9091;"= >;;; </span><span style=3D"color: #8F9091;">Generated package description f= rom embark.el -*- no-byte-compile: t -*-</span> <span style=3D"color: #40BEC4;">(</span>define-package <span style=3D"color= : #BBDE8F;">"embark"</span> <span style=3D"color: #BBDE8F;">"= ;1.1"</span> <span style=3D"color: #BBDE8F;">"No description avai= lable."</span> '<span style=3D"color: #DC80BA;">(</span><span style=3D= "color: #FDD78B;">(</span>emacs <span style=3D"color: #BBDE8F;">"25.1&= quot;</span><span style=3D"color: #FDD78B;">)</span> <span style=3D"color: = #FDD78B;">(</span>embark <span style=3D"color: #BBDE8F;">"0.9"</s= pan><span style=3D"color: #FDD78B;">)</span> <span style=3D"color: #FDD78B;= ">(</span>avy <span style=3D"color: #BBDE8F;">"0.5"</span><span s= tyle=3D"color: #FDD78B;">)</span> <span style=3D"color: #FDD78B;">(</span>e= macs <span style=3D"color: #BBDE8F;">"27.1"</span><span style=3D"= color: #FDD78B;">)</span> <span style=3D"color: #FDD78B;">(</span>compat <s= pan style=3D"color: #BBDE8F;">"29.1.4.0"</span><span style=3D"col= or: #FDD78B;">)</span> <span style=3D"color: #FDD78B;">(</span>embark <span= style=3D"color: #BBDE8F;">"1.0"</span><span style=3D"color: #FDD= 78B;">)</span> <span style=3D"color: #FDD78B;">(</span>consult <span style= =3D"color: #BBDE8F;">"1.0"</span><span style=3D"color: #FDD78B;">= )</span><span style=3D"color: #DC80BA;">)</span> <span style=3D"color: #40A= ADB;">:kind</span> vc <span style=3D"color: #40AADB;">:commit</span> <span = style=3D"color: #BBDE8F;">"195add1f1ccd1059472c9df7334c97c4d155425e&qu= ot;</span><span style=3D"color: #40BEC4;">)</span> </pre> </div> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> But in this case only "embark 1.1" got installed alongside the ac= tual vc-install of embark.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;border-left:3px solid #ccc= ;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Do you understand my point with missing dependencies breaking parts of the = installed packages?<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Yes I fully understand your argument, but I do not know of any packages tha= t the "Package-Requires: " header are split among different lisp = files, unless they are meant to be installed as separate packages (i.e. req= uires two separate "define-package" statements). If that's indeed= something that people do often, then your concern is very well justified.<= br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;border-left:3px solid #ccc= ;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> A soft-but-important-constraint or goal is that the point of<br/> package-vc is to make package development easier, so excluding files<br/> from a checkout or manipulating the history is not something we are<br/> really interested in supporting.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I think the ability to exclude and include files, etc. would also help maki= ng package development easier. It might be a nice-to-have feature that is n= ot high priority with limited contributors, etc. but I don't think it is fu= ndamentally out of scope for what package-vc is potentially useful for, but= that's just my opinion.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Anyway, I don't intend to drag the arguments here as I think you already un= derstand the points I wanted to make, and I do not have the full picture of= the development efforts. I believe it is clear that the dependency managem= ent in package-vc-install can use some improvements, but the solution and i= mplementation details are up to the devs to figure out what's the best path= forward.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Let me know if there is anything else I can help with.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best,<br/> Armin<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Philip Kaludercic @ 2025-02-17 21:19 :<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;border-left:3px solid #ccc= ;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I came up with this change, which appears to fix the issue on my end:<br/><= /p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> diff =E2=80=93git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package= -vc.el<br/> index a18841fb64d..1dc427d13ac 100644<br/> =E2=80=94 a/lisp/emacs-lisp/package-vc.el<br/><del style=3D"font-family:&qu= ot;Arial";font-size:10pt;color:grey;border-left:none;text-decoration:l= ine-through;margin-bottom:0px;margin-top:10px;line-height:11pt;">+</del> b/= lisp/emacs-lisp/package-vc.el<br/> @@ -485,10 +485,21 @@ package-vc=E2=80=93unpack-1<br/> lm=E2=80=93prepare-package-dependencies<br/> (nconc deps)<br/> (setq deps))))))<br/></p> <ul style=3D"list-style-type:square;"><li style=3D"font-family:"Arial&= quot;;font-size:10pt;line-height:10pt;margin-bottom:0px;margin-top:2px;">(d= olist (dep deps)<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">(cl-callf version-to-list (cadr dep)))<b= r/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">(setf (package-desc-reqs pkg-desc) deps)= <br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">(setf missing (package-vc-install-depend= encies (delete-dups deps)))<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">(setf (package-desc-reqs pkg-desc)<br/><= /li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">(cl-loop with lessp =3D (lambda (a b)<br= /></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">(if (eq (car a) (car b))<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">(version< (cadr b) (cadr b))<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">(value< (car a) (car b))))<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">;; sort the dependency list to have the = newest<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">;; versions at the end of the list, so t= hat when<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">;; iterating through the list we only re= quest to<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">;; install the newest necessary dependen= cy:<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">with deps =3D (sort deps :lessp lessp)<b= r/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">for rest on (cdr deps)<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">for (name vers) in deps<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">unless (assq name deps)<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">collect (list name (version-to-list vers= ))))<br/></li> <li style=3D"font-family:"Arial";font-size:10pt;line-height:10pt;= margin-bottom:0px;margin-top:2px;">(setf missing (package-vc-install-depend= encies deps))<br/> (setf missing (delq (assq (package-desc-name pkg-desc)<br/> missing)<br/> missing)))<br/></li> </ul><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;lin= e-height:11pt;font-size:10pt;font-family:"Arial";"> Can you try it out as well?<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Armin Darvish <armindarvish@HIDDEN> writes:<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hi Philip,<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> >To clarify the terminology, ELPA/MELPA are package archives that take<b= r/> >usually take a source code checkout and prepare packages. For each<br/> >package, they might specify or infer a main file or some other source o= f<br/> >information to get the metadata like package dependencies, but they wil= l<br/> >also throw out all other files that are not part of the package.<br/> Yes, what I meant was how MELPA builds. Wile it does put the files in<br/> load-path as well, but it ignores the "Package-Requires:" header= for<br/> inferring package dependencies in all other files, but the main lisp<br/> file, and it can of course run into the problem you are trying to<br/> avoid but I would argue the MELPA's approach is better (see below).<br/></= p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> But MELPA and package-vc are solving different problems (preparing a<br/> tarball from a VC checkout vs. making a VC checkout loadable by<br/> package.el).<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> >>Package-vc is kind of like that, in that it is an independent<br/> >>implementation of ELPA's build scripts, but as the goal is to expli= citly<br/> >>load the directory with the source code checkout we don't remove th= e<br/> >>"unrelated" files (that is one of the reasons we also adv= ise against<br/> >>combining multiple packages in the same directory).<br/> ><br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I understand the advice against multiple packages in the same repo,<br/> but a lot of the times a package has its own extensions (that may have<br/> a different set of dependencies) and it is much easier to have all the<br/> extensions in one repo for mmanaging the repo becuase it's easier to<br/> keep consistencies and also it is much easier to track issues and<br/> etc. when all of the related files are in the same repo.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> This is mostly unrelated to the bug at hand, but I just want to mention<br/> that you can still track multiple packages on multiple branches. It is<br/> easy to develop them all at once if you use git-worktree(1) to load all<br/> files at once.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#6a3a4c;border-left:= 3px solid #7f455b;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I am not sure I follow your argument. The other files are still<br/> installed and loadable, but broken since they are missing dependencies.<br/> That is the state I wish to avoid.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> There is a bug in the dependency resolution, but that is a separate<br/> issue IMO.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Yes, but this is exactly what MELPA does. It puts those files in the<br/> laod path but ignores the "Package-Requires:" header when it come= s to<br/> installing package dependencies.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> IIRC most packages that are developed in a shared repository on MELPA<br/> exclude the other files, so there is just a single package with a<br/> dependency list. The ELPA build server does something like that as<br/> well.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> The reason I think this makes more<br/> sense is because the dependencies are defined at the package level,<br/> and therefore they should be defined once in the main file, otherwise,<br/> the dependencies from all different files need to be compared at build<br/> time and the common required set of dependecies and versions need to<br/> be inferred. For example, as I showed with the embark example in my<br/> previous email, different files can require the same package but with<br/> a different minimum version.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I have already understood this point, don't worry. I hope the above<br/> patch or something based on that should fix the issue. Do you<br/> understand my point with missing dependencies breaking parts of the<br/> installed packages?<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> <br/> Right now `package-vc-installl' is<br/> pulling different versions (in different folders under "/elpa"<br= /> directory) and I am not even sure in what order the different versions<br/> of embark are loaded. This can lead to much bigger problems than the<br/> issue you are trying to avoid (a.k.a. some featuers not working<br/> because the dependency is not available).<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> The trick we currently use is that VC packages have the highest priority<br= /> in being loaded. It is not elegant, and it would be a nice thing to<br/> have some de-duplication to avoid installing embark if we already have a<br= /> VC checkout of embark-consult.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Of course you can argue that there is a bug in dependency resolution,<br/> but to me the easiest solution would be to do what MELPA does, inly<br/> use the main file for inferring dependencies. Alternatively, if we add<br/> features such as "include-files", "ignore-files", "= ;clone-depth", etc,<br/> as options for the recipe and do a much smarter job in inferring<br/> dependencies (e.g. do not create self-dependency, only install the<br/> highest required version of any package, =E2=80=A6), then there will be<br/> other ways to avoid this kind of issue.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Package-vc has two hard-constraints, 1. the package specification has to<br= /> be compatible with ELPA package specifications 2. has to be VCS<br/> agnostic. A soft-but-important-constraint or goal is that the point of<br/> package-vc is to make package development easier, so excluding files<br/> from a checkout or manipulating the history is not something we are<br/> really interested in supporting.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best,<br/> Armin<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Philip Kaludercic @ 2025-02-17 17:24 :<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#6a3a4c;border-left:= 3px solid #7f455b;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Armin Darvish <armindarvish@HIDDEN> writes:<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#7a4900;border-left:= 3px solid #925700;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hi Philip,<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I am on emacs versio 30.0.93. and I tried an init file like this:<br/> ,-=E2=80=94<br/></p> <table style=3D"font-family:"Arial";font-size:10pt;margin-top:0px= ;line-height:10pt;border-collapse:collapse;"><colgroup><col class=3D"org-le= ft"/></colgroup><tbody><tr><td style=3D"font-family:"Arial";font-= size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;background-co= lor:#f9f9f9;border:1px solid white;text-align:left;">;;; init.el =E2=80=94 = -<b>- lexical-binding: t; -</b>-</td> </tr></tbody><tbody><tr/></tbody><tr><td style=3D"font-family:"Arial&q= uot;;font-size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;bac= kground-color:#f9f9f9;border:1px solid white;text-align:left;">(require 'pa= ckage)</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(package-initialize)</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(package-vc-install</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">'(consult-omni :url "<a style=3D"co= lor:#0071c5;" href=3D"https://github.com/armindarvish/consult-omni">https:/= /github.com/armindarvish/consult-omni</a>"</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">:main-file "consult-omni.el"))= </td> </tr></table><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:= 10px;line-height:11pt;font-size:10pt;font-family:"Arial";"> `-=E2=80=94<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Yes, I can reproduce the issue now, thanks!<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#7a4900;border-left:= 3px solid #925700;"> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#ff34ff;border-left:= 3px solid #fe71fe;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> The issue we have to keep in mind is that since we add the repository<br/> directly to `load-path', all the files can be used no matter what<br/> "specific" file you might intend to use. To retain usability and= not<br/> have unexpected function calls fail, we rather install all the<br/> dependencies.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> My understanding was that packages are either a single-file package,<br/> which won't have this problem, or a multi-file package, in which case,<br/> the "Package-Requires: " header should only be in the main file a= nd<br/> not the extra lisp files. As far as I know, other package managing<br/> systems (like MELPA) don't use hte "Package-Requires: " header in= the<br/> files other than the main lisp file either.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> To clarify the terminology, ELPA/MELPA are package archives that take<br/> usually take a source code checkout and prepare packages. For each<br/> package, they might specify or infer a main file or some other source of<br= /> information to get the metadata like package dependencies, but they will<br= /> also throw out all other files that are not part of the package.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Package-vc is kind of like that, in that it is an independent<br/> implementation of ELPA's build scripts, but as the goal is to explicitly<br= /> load the directory with the source code checkout we don't remove the<br/> "unrelated" files (that is one of the reasons we also advise agai= nst<br/> combining multiple packages in the same directory).<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#7a4900;border-left:= 3px solid #925700;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Note that, we can still<br/> add all the files in the repo to load-path, but when automatically<br/> making the "define-package" declaration in a "package-pkg.el= " file,<br/> the dependencies should be inferred form the main file and not others,<br/> otherwise there will be weird looped dependencies.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I am not sure I follow your argument. The other files are still<br/> installed and loadable, but broken since they are missing dependencies.<br/> That is the state I wish to avoid.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> There is a bug in the dependency resolution, but that is a separate<br/> issue IMO.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#7a4900;border-left:= 3px solid #925700;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> For example, in<br/> case of embark with the following init file:<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> ,-=E2=80=94<br/></p> <table style=3D"font-family:"Arial";font-size:10pt;margin-top:0px= ;line-height:10pt;border-collapse:collapse;"><colgroup><col class=3D"org-le= ft"/></colgroup><tbody><tr><td style=3D"font-family:"Arial";font-= size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;background-co= lor:#f9f9f9;border:1px solid white;text-align:left;">;;; init.el =E2=80=94 = -<b>- lexical-binding: t; -</b>-</td> </tr></tbody><tbody><tr/></tbody><tr><td style=3D"font-family:"Arial&q= uot;;font-size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;bac= kground-color:#f9f9f9;border:1px solid white;text-align:left;">(require 'pa= ckage)</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">;; Adds the Melpa archive to the list of= available repositories</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(setq package-archives</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">'(("elpa" . "<a style=3D"= color:#0071c5;" href=3D"https://elpa.gnu.org/packages/">https://elpa.gnu.or= g/packages/</a>")</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">("melpa-stable" . "<a sty= le=3D"color:#0071c5;" href=3D"https://stable.melpa.org/packages/">https://s= table.melpa.org/packages/</a>")</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">("melpa" . "<a style=3D"c= olor:#0071c5;" href=3D"https://melpa.org/packages/">https://melpa.org/packa= ges/</a>")))</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">;; Initializes the package infrastructur= e</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(package-initialize)</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(package-refresh-contents)</td> </tr><tbody><tr/></tbody><tr><td style=3D"font-family:"Arial";fon= t-size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;background-= color:#f9f9f9;border:1px solid white;text-align:left;">(use-package embark<= /td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">:vc (:url "<a style=3D"color:#0071c= 5;" href=3D"https://github.com/oantolin/embark">https://github.com/oantolin= /embark</a>"))</td> </tr><tbody><tr/></tbody></table><p style=3D"text-decoration:none;margin-bo= ttom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:"= Arial";"> `-=E2=80=94<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I can see multiple versions of embark being pulled from MELPA becuase<br/> of looped depenncies in the embark-pkg.el file automatically created<br/> by package-vc-install. Here is the contents of that file:<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> ,-=E2=80=94<br/></p> <table style=3D"font-family:"Arial";font-size:10pt;margin-top:0px= ;line-height:10pt;border-collapse:collapse;"><colgroup><col class=3D"org-le= ft"/></colgroup><tbody><tr><td style=3D"font-family:"Arial";font-= size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;background-co= lor:#f9f9f9;border:1px solid white;text-align:left;">(define-package "= embark" "1.1" "No description available." '((emacs= </td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">"25.1") (embark "0.9"= ;) (avy "0.5") (emacs "27.1") (compat</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">"29.1.4.0") (embark "1.0&= quot;) (consult "1.0")) :kind vc :commit</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">"195add1f1ccd1059472c9df7334c97c4d1= 55425e")</td> </tr></tbody></table><p style=3D"text-decoration:none;margin-bottom:0px;mar= gin-top:10px;line-height:11pt;font-size:10pt;font-family:"Arial";= "> `-=E2=80=94<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Note that while this installs just fine, it is pulling 3 different<br/> versions of embark from MELPA becuase of this inferred looped<br/> self-dependency from differnt *.el files in embark repo, which is not<br/> the intended behavior by the author of that package.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> That said, I agree with the point that there can potentially be other<br/> solutions like terminating properly as you said or even better would<br/> be detecting and ignoring any self-dependency. I cannot think of any<br/> scenario where a package should depend on its own or on an older<br/> version of its own.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I agree. I'll try to find a solution to the issue by fixing the<br/> recursion issue and update this thread.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> ><br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#7a4900;border-left:= 3px solid #925700;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Philip Kaludercic @ 2025-02-16 18:53 :<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#ff34ff;border-left:= 3px solid #fe71fe;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Armin Darvish <armindarvish@HIDDEN> writes:<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#ff4a46;border-left:= 3px solid #ff8986;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hello,<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I have noticed that with vc repositories that contain multiple<br/> related single-file<br/> packages, package-vc-install creates looped self-dependency that<br/> can cause errors.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> For example, trying to install the repository:<br/><a style=3D"color:#0071c= 5;" href=3D"https://github.com/armindarvish/consult-omni">https://github.co= m/armindarvish/consult-omni</a> <br/> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2= =80=99: 1601"<br/> error. This is<br/> because currently package-vc-install tries to read all ".el"<br/> files in the root<br/> directory to get the dependencies and build the "define-package"<= br/> declaration in<br/> consult-omni-pkg.el. This is not compatible with repositories<br/> that have multiple<br/> single-file packages in the root directory. Instead, the<br/> dependencies should be<br/> inferred from the main lisp file only. This will be safe with<br/> multi-file packages<br/> as well because the convention is to have the "Package-Requires:"= <br/> header only in<br/> the main lisp file and not the additional lisp files.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> What version of Emacs are you using? Installing your repository doesn't<br= /> raise any error when I try to do so.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#ff4a46;border-left:= 3px solid #ff8986;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> There are other packages that have multiple single-file packages<br/> as well, for<br/> example, <a style=3D"color:#0071c5;" href=3D"https://github.com/oantolin/em= bark">https://github.com/oantolin/embark</a> includes embark and<br/> embark-consult in<br/> the root directory. Currently, installing embark with<br/> package-vc-install causes<br/> several different versions of embark being downlaoded because the<br/> dependencies are<br/> read from all of those files even though they are meant to be<br/> separate packages.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> The issue we have to keep in mind is that since we add the repository<br/> directly to `load-path', all the files can be used no matter what<br/> "specific" file you might intend to use. To retain usability and= not<br/> have unexpected function calls fail, we rather install all the<br/> dependencies. The recursion error above hints at some programming<br/> issue, where we don't terminate properly.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> ><br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#ff4a46;border-left:= 3px solid #ff8986;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best Regards,<br/><b>Armin Darvish</b><br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> =E2=80=93<br/></p> <hr/><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;lin= e-height:11pt;font-size:10pt;font-family:"Arial";"> [www.armindarvish.com]<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> [www.armindarvish.com] <a style=3D"color:#0071c5;" href=3D"https://www.armi= ndarvish.com/">https://www.armindarvish.com/</a><br/></p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> =E2=80=93<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best Regards,<br/></p> <div style=3D"font-family:"Arial";font-size:10pt;margin-bottom:20= px;font-family:"Arial";font-size:10pt;line-height:11pt;" id=3D"or= gb626fcf"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> <br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> <b>Armin Darvish</b><br/></p> <hr/><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;lin= e-height:11pt;font-size:10pt;font-family:"Arial";"> <a style=3D"color:#0071c5;" href=3D"https://www.armindarvish.com/">www.armi= ndarvish.com</a><br/></p> </div> </div> </body></html> --==-=-=-- --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#76325
; Package emacs
.
Full text available.Received: (at 76325) by debbugs.gnu.org; 18 Feb 2025 07:09:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 18 02:09:28 2025 Received: from localhost ([127.0.0.1]:53929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tkHjS-0004sF-9Y for submit <at> debbugs.gnu.org; Tue, 18 Feb 2025 02:09:28 -0500 Received: from mout01.posteo.de ([185.67.36.141]:60343) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <armindarvish@HIDDEN>) id 1tkHjO-0004rM-4Q for 76325 <at> debbugs.gnu.org; Tue, 18 Feb 2025 02:09:24 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CF283240027 for <76325 <at> debbugs.gnu.org>; Tue, 18 Feb 2025 08:09:13 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YxrHD5Vswz9rxB for <76325 <at> debbugs.gnu.org>; Tue, 18 Feb 2025 08:09:12 +0100 (CET) Resent-To: 76325 <at> debbugs.gnu.org Resent-From: Philip Kaludercic <philipk@HIDDEN> Resent-Date: Tue, 18 Feb 2025 08:09:10 +0100 Resent-Message-ID: <878qq3rap5.fsf@HIDDEN> Received: from proxy02.posteo.name ([127.0.0.1]) by dovecot05.posteo.name (Dovecot) with LMTP id tGSUIUJss2eddQIArfqFjw for <philipk@HIDDEN>; Mon, 17 Feb 2025 19:42:58 +0100 Received: from proxy02.posteo.de ([127.0.0.1]) by proxy02.posteo.name (Dovecot) with LMTP id c3EhCW9ws2fEowAAGFAyLg ; Mon, 17 Feb 2025 19:42:58 +0100 Received: from mailin04.posteo.de (unknown [10.0.0.64]) by proxy02.posteo.de (Postfix) with ESMTPS id 4YxWkB3hf4zyl2 for <philipk@HIDDEN>; Mon, 17 Feb 2025 19:42:58 +0100 (CET) Received: from mx04.posteo.de (mailin04.posteo.de [127.0.0.1]) by mailin04.posteo.de (Postfix) with ESMTP id 7193820DD9 for <philipk@HIDDEN>; Mon, 17 Feb 2025 19:42:58 +0100 (CET) X-Posteo-Spam-Status: v=1; e=base64; a=aes-256-gcm; d=KY1ceK6ZhAQFLmv9nfL6UoDO8XWJO+RppJ3HOQv8L9UsdrLu68fyiLkts0py8nr0rnjWsbP9s rxfhzTD+4nYMndphhi7hT7IE7hj1SZ3zZO5azdD5+mX8+JgSAu+WDbdYgmG6JXzunRyVimiJofI rA1JKXTzovg6glUEno5Fq1dyS7bf1kex7/7bUPxSpyfbf+p49e1hw8AOQ6JHQj+1aoafnKpu7Pm DMLc1idKLvXlJKTG5RwWpJkT+MbyqWzuyd8vr8HoAQb9qYa23BtLuJDgRtfGqFilBdXdcDkcOzA U798DRFyVBNJu8YHqVjN3RBUmFO7j472oue7DwbY+SxijHiUhGX2WmLETHRFm6YfN4C8povytGs gyXRHmN8WFo9q1jmv2YqUObw4ED0RdUlek1H09Ey0j4jxT2w38aKlfwT9mxw5SQsASEOP10iNf6 MOEXKAroi57mbvDAe1UwLUVWTWGhmrNxUKdwLpZ4NJe1Fs9gjZe8cpGvNufGWjzIgA710yYLNRs 6Db6Qa34/MaI56U9AutSlUDxKtq0NzuwOBNbpbVtN1w== Authentication-Results: posteo.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: posteo.de; spf=pass smtp.mailfrom=gmail.com X-Posteo-Antispam-Signature: v=1; e=base64; a=aes-256-gcm; d=F0+JkgOM70I76X9LW99Svri0musfakEsleTu0Gjxp1G0QH7HvVkhZTBNEvtOIs1/UxNfeb9BdWxXmNRzCAYLSuEqSy8WC3TdWglAV5ESM1umH0WFPngop1HZiQl7/xV8KlWEwS7Z Authentication-Results: posteo.de; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=avDHJ08O; dkim-atps=neutral X-Posteo-TLS-Received-Status: TLSv1.3 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx04.posteo.de (Postfix) with ESMTPS id 4YxWk910Hdzyd3 for <philipk@HIDDEN>; Mon, 17 Feb 2025 19:42:57 +0100 (CET) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-439350f1a0bso28117635e9.0 for <philipk@HIDDEN>; Mon, 17 Feb 2025 10:42:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739817776; x=1740422576; darn=posteo.net; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=D6ISaHyg9GlRngGy21KnzQgWVJGQ1RR71JA5dcOevlg=; b=avDHJ08OmSwgbhthCoS2U0llGTnLcDCWXF9nkQ0ZifQe9lE/wKYnnJQGn0Wd3KZdU9 tOSSfqAQsJwQWEKm+ugytl5fR6ur/3S8Eqk4Z+zkRX/7GmS4RG50x13ATHWQ/ZHx58gw iPgYwCBleVSa/thnQkFAJUGjg39L9v1q//8YhD2U2TTjoEbAjVywZj83zj6UvmdPZlZB MWp6C0b34VZMeqn1NkDK7Px76YzoiUSF18VIA9TNF35h6h7ZUwviCK6eczlLtQzDDhTW f7OtpBocM8t+yyhJbBjypKJNBDqjRjUOMAAy+j04vpvX0Q3Wl2ggZOpWiRE7PZ06V70Q 5vFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739817776; x=1740422576; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=D6ISaHyg9GlRngGy21KnzQgWVJGQ1RR71JA5dcOevlg=; b=FE76/W09VFAdYRheNy8RAfjUWKSF5Z27IOaDzsi/UgGIXf9Rx5M0stySUkf0p3HDjQ N6+e/mg+SKi/EJstI3zqtpL4mVQGvXIyZVaPuebfZSiJ0c13NrfYljRJLVHcrg6sP855 PPgoXaOGUXHnCTOE+P86C/9nKzVKtOlGmUoU6/1BAdOUunDITa4x5MLM7vQcc5KYres2 B6GQS7vksApM2prqKuYO+I4Wm6+vled4WuO33LpV85cxKCnoamq7BKLMkg06a98f4ka1 Q/InRtoGW8Rs3vTBkrlgKbeY91xx4UuQLOhQcD2h6sNhyrkhH2ztav2OSgJ8FMgTzfrO 6Ocw== X-Gm-Message-State: AOJu0YxooQQVlGP7v5MZHZOZdWG1KmkKFo5hQWVrERNUeWG4pvz+HLCO 1RmnxaIVXhxr4QEKXS3PbS8GgT8Lm0xpgCPaAC6FFYBb0MEfZePCZRV5ROxlZGA= X-Gm-Gg: ASbGncsl7E7xZt5iDL6NWnNU/pwxVn0WO9I8/8ZztxG2ZSnY+Nc7jldR/4SLzZaYewD 1HQE1+3jVo8RI9VD099MAvg6vFIFvPYjlpSCJg6hNi7RJm4GppGv7uazYXMMGBOz0y9XapEHmi3 zD8W8zNpSfuw4y1LzyrLYqnVJuyycU5+p7gt1w068uqfAK306+6u0NQM9nc7OuD34C9XZC8l9d+ fmi9PDOM4HSsfAvOs7yYeW4SWIVwlC0TynPzicp84lujLHJ3s+mj4DlxMsB2UOwNL6on59TGQ38 YQfJwSTYuZgIDn+pPJFbtD1r X-Google-Smtp-Source: AGHT+IHorW7x1J6GwGWPKfkTzPzSjE0YDF6iPTeXEwJSFEr/Ro3EOZ+kSQLxX0gXYR9wRm3/iO20qw== X-Received: by 2002:a05:600c:3ba8:b0:439:4a4a:7863 with SMTP id 5b1f17b1804b1-4396ec8752fmr102129205e9.15.1739817775780; Mon, 17 Feb 2025 10:42:55 -0800 (PST) From: Armin Darvish <armindarvish@HIDDEN> To: Philip Kaludercic <philipk@HIDDEN> Subject: Re: bug#76325: 30.0.93; package-vc-install fails with repositories that contain multiple single-file packages In-Reply-To: <87jz9obi20.fsf@HIDDEN> (Philip Kaludercic's message of "Mon, 17 Feb 2025 17:24:39 +0000") References: <m2cyfin7af.fsf@HIDDEN> <87wmdpbu14.fsf@HIDDEN> <m2v7t9o0tn.fsf@HIDDEN> <87jz9obi20.fsf@HIDDEN> Date: Mon, 17 Feb 2025 18:42:51 +0000 Message-ID: <m2r03w4dlg.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 76325 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.3 (--) --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Philip, >To clarify the terminology, ELPA/MELPA are package archives that take >usually take a source code checkout and prepare packages. For each >package, they might specify or infer a main file or some other source of >information to get the metadata like package dependencies, but they will >also throw out all other files that are not part of the package. Yes, what I meant was how MELPA builds. Wile it does put the files in load-= path as well, but it ignores the "Package-Requires:" header for inferring p= ackage dependencies in all other files, but the main lisp file, and it can = of course run into the problem you are trying to avoid but I would argue th= e MELPA's approach is better (see below). >Package-vc is kind of like that, in that it is an independent >implementation of ELPA's build scripts, but as the goal is to explicitly >load the directory with the source code checkout we don't remove the >"unrelated" files (that is one of the reasons we also advise against >combining multiple packages in the same directory). I understand the advice against multiple packages in the same repo, but a l= ot of the times a package has its own extensions (that may have a different= set of dependencies) and it is much easier to have all the extensions in o= ne repo for mmanaging the repo becuase it's easier to keep consistencies an= d also it is much easier to track issues and etc. when all of the related f= iles are in the same repo. > I am not sure I follow your argument. The other files are still > installed and loadable, but broken since they are missing dependencies. > That is the state I wish to avoid. > > There is a bug in the dependency resolution, but that is a separate > issue IMO. Yes, but this is exactly what MELPA does. It puts those files in the laod = path but ignores the "Package-Requires:" header when it comes to installing= package dependencies. The reason I think this makes more sense is because = the dependencies are defined at the package level, and therefore they shoul= d be defined once in the main file, otherwise, the dependencies from all di= fferent files need to be compared at build time and the common required set= of dependecies and versions need to be inferred. For example, as I showed = with the embark example in my previous email, different files can require t= he same package but with a different minimum version. Right now `package-vc= -installl' is pulling different versions (in different folders under "/elpa= " directory) and I am not even sure in what order the different versions of= embark are loaded. This can lead to much bigger problems than the issue yo= u are trying to avoid (a.k.a. some featuers not working because the depende= ncy is not available). Of course you can argue that there is a bug in dependency resolution, but t= o me the easiest solution would be to do what MELPA does, inly use the main= file for inferring dependencies. Alternatively, if we add features such as= "include-files", "ignore-files", "clone-depth", etc, as options for the re= cipe and do a much smarter job in inferring dependencies (e.g. do not creat= e self-dependency, only install the highest required version of any package= , ...), then there will be other ways to avoid this kind of issue. Best, Armin Philip Kaludercic @ 2025-02-17 17:24 : > Armin Darvish <armindarvish@HIDDEN> writes: > >> Hi Philip, >> >> I am on emacs versio 30.0.93. and I tried an init file like this: >> ,---- >> | ;;; init.el --- -*- lexical-binding: t; -*- >> |=20 >> | (require 'package) >> | (package-initialize) >> | (package-vc-install >> | '(consult-omni :url "<https://github.com/armindarvish/consult-omni>" >> | :main-file "consult-omni.el")) >> `---- > > Yes, I can reproduce the issue now, thanks! > >>> The issue we have to keep in mind is that since we add the repository >>> directly to `load-path', all the files can be used no matter what >>> "specific" file you might intend to use. To retain usability and not >>> have unexpected function calls fail, we rather install all the >>> dependencies. >> >> My understanding was that packages are either a single-file package, >> which won't have this problem, or a multi-file package, in which case, >> the "Package-Requires: " header should only be in the main file and >> not the extra lisp files. As far as I know, other package managing >> systems (like MELPA) don't use hte "Package-Requires: " header in the >> files other than the main lisp file either.=20 > > To clarify the terminology, ELPA/MELPA are package archives that take > usually take a source code checkout and prepare packages. For each > package, they might specify or infer a main file or some other source of > information to get the metadata like package dependencies, but they will > also throw out all other files that are not part of the package. > > Package-vc is kind of like that, in that it is an independent > implementation of ELPA's build scripts, but as the goal is to explicitly > load the directory with the source code checkout we don't remove the > "unrelated" files (that is one of the reasons we also advise against > combining multiple packages in the same directory). > >> Note that, we can still >> add all the files in the repo to load-path, but when automatically >> making the "define-package" declaration in a "package-pkg.el" file, >> the dependencies should be inferred form the main file and not others, >> otherwise there will be weird looped dependencies.=20 > > I am not sure I follow your argument. The other files are still > installed and loadable, but broken since they are missing dependencies. > That is the state I wish to avoid. > > There is a bug in the dependency resolution, but that is a separate > issue IMO. > >> For example, in >> case of embark with the following init file: >> >> ,---- >> | ;;; init.el --- -*- lexical-binding: t; -*- >> |=20 >> | (require 'package) >> | ;; Adds the Melpa archive to the list of available repositories >> | (setq package-archives >> | '(("elpa" . "<https://elpa.gnu.org/packages/>") >> | ("melpa-stable" . "<https://stable.melpa.org/packages/>") >> | ("melpa" . "<https://melpa.org/packages/>"))) >> | ;; Initializes the package infrastructure >> | (package-initialize) >> | (package-refresh-contents) >> |=20 >> | (use-package embark >> | :vc (:url "<https://github.com/oantolin/embark>")) >> |=20 >> `---- >> >> I can see multiple versions of embark being pulled from MELPA becuase >> of looped depenncies in the embark-pkg.el file automatically created >> by package-vc-install. Here is the contents of that file: >> >> ,---- >> | (define-package "embark" "1.1" "No description available." '((emacs >> | "25.1") (embark "0.9") (avy "0.5") (emacs "27.1") (compat >> | "29.1.4.0") (embark "1.0") (consult "1.0")) :kind vc :commit >> | "195add1f1ccd1059472c9df7334c97c4d155425e") >> `---- >> >> Note that while this installs just fine, it is pulling 3 different >> versions of embark from MELPA becuase of this inferred looped >> self-dependency from differnt *.el files in embark repo, which is not >> the intended behavior by the author of that package. >> >> >> That said, I agree with the point that there can potentially be other >> solutions like terminating properly as you said or even better would >> be detecting and ignoring any self-dependency. I cannot think of any >> scenario where a package should depend on its own or on an older >> version of its own. > > I agree. I'll try to find a solution to the issue by fixing the > recursion issue and update this thread. > >> >> Philip Kaludercic @ 2025-02-16 18:53 : >> >>> Armin Darvish <armindarvish@HIDDEN> writes: >>> >>>> Hello, >>>> >>>> I have noticed that with vc repositories that contain multiple related= single-file >>>> packages, package-vc-install creates looped self-dependency that can c= ause errors.=20 >>>> >>>> For example, trying to install the repository:=20 >>>> <https://github.com/armindarvish/consult-omni>=20 >>>> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2= =80=99: 1601" error. This is=20 >>>> because currently package-vc-install tries to read all ".el" files in = the root=20 >>>> directory to get the dependencies and build the "define-package" decla= ration in >>>> consult-omni-pkg.el. This is not compatible with repositories that hav= e multiple >>>> single-file packages in the root directory. Instead, the dependencies = should be=20 >>>> inferred from the main lisp file only. This will be safe with multi-fi= le packages >>>> as well because the convention is to have the "Package-Requires:" head= er only in=20 >>>> the main lisp file and not the additional lisp files. >>> >>> What version of Emacs are you using? Installing your repository doesn't >>> raise any error when I try to do so. >>> >>>> There are other packages that have multiple single-file packages as we= ll, for=20 >>>> example, <https://github.com/oantolin/embark> includes embark and emba= rk-consult in >>>> the root directory. Currently, installing embark with package-vc-insta= ll causes >>>> several different versions of embark being downlaoded because the depe= ndencies are >>>> read from all of those files even though they are meant to be separate= packages. >>> >>> The issue we have to keep in mind is that since we add the repository >>> directly to `load-path', all the files can be used no matter what >>> "specific" file you might intend to use. To retain usability and not >>> have unexpected function calls fail, we rather install all the >>> dependencies. The recursion error above hints at some programming >>> issue, where we don't terminate properly. >>> >>>> >>>> Best Regards, >>>> *Armin Darvish* >>>> >>>> -- >>>> ----------------------------------------------------------------------= -- >>>> [www.armindarvish.com] >>>> >>>> >>>> [www.armindarvish.com] <https://www.armindarvish.com/> --=20 Best Regards, *Armin Darvish* ------------------------------------------------------------------------ [www.armindarvish.com] [www.armindarvish.com] <https://www.armindarvish.com/> --==-=-= Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable <html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en"><h= ead><!-- 2025-02-17 Mon 10:42 --><meta http-equiv=3D"Content-Type" content= =3D"text/html;charset=3Dutf-8"/><meta name=3D"viewport" content=3D"width=3D= device-width, initial-scale=3D1"/><meta name=3D"generator" content=3D"Org M= ode"/></head><body> <div style=3D"font-family:"Arial";font-size:10pt;line-height:11pt= ;" id=3D"content"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hi Philip,<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> >To clarify the terminology, ELPA/MELPA are package archives that take<b= r/> >usually take a source code checkout and prepare packages. For each<br/> >package, they might specify or infer a main file or some other source o= f<br/> >information to get the metadata like package dependencies, but they wil= l<br/> >also throw out all other files that are not part of the package.<br/> Yes, what I meant was how MELPA builds. Wile it does put the files in load-= path as well, but it ignores the "Package-Requires:" header for i= nferring package dependencies in all other files, but the main lisp file, a= nd it can of course run into the problem you are trying to avoid but I woul= d argue the MELPA's approach is better (see below).<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> >Package-vc is kind of like that, in that it is an independent<br/> >implementation of ELPA's build scripts, but as the goal is to explicitl= y<br/> >load the directory with the source code checkout we don't remove the<br= /> >"unrelated" files (that is one of the reasons we also advise = against<br/> >combining multiple packages in the same directory).<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I understand the advice against multiple packages in the same repo, but a l= ot of the times a package has its own extensions (that may have a different= set of dependencies) and it is much easier to have all the extensions in o= ne repo for mmanaging the repo becuase it's easier to keep consistencies an= d also it is much easier to track issues and etc. when all of the related f= iles are in the same repo.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;border-left:3px solid #ccc= ;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I am not sure I follow your argument. The other files are still<br/> installed and loadable, but broken since they are missing dependencies.<br/> That is the state I wish to avoid.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> There is a bug in the dependency resolution, but that is a separate<br/> issue IMO.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Yes, but this is exactly what MELPA does. It puts those files in the laod p= ath but ignores the "Package-Requires:" header when it comes to i= nstalling package dependencies. The reason I think this makes more sense is= because the dependencies are defined at the package level, and therefore t= hey should be defined once in the main file, otherwise, the dependencies fr= om all different files need to be compared at build time and the common req= uired set of dependecies and versions need to be inferred. For example, as = I showed with the embark example in my previous email, different files can = require the same package but with a different minimum version. Right now <c= ode style=3D"font-size:10pt;font-family:monospace;background:#f9f9f9;">pack= age-vc-installl</code> is pulling different versions (in different folders = under "/elpa" directory) and I am not even sure in what order the= different versions of embark are loaded. This can lead to much bigger prob= lems than the issue you are trying to avoid (a.k.a. some featuers not worki= ng because the dependency is not available).<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Of course you can argue that there is a bug in dependency resolution, but t= o me the easiest solution would be to do what MELPA does, inly use the main= file for inferring dependencies. Alternatively, if we add features such as= "include-files", "ignore-files", "clone-depth&quo= t;, etc, as options for the recipe and do a much smarter job in inferring d= ependencies (e.g. do not create self-dependency, only install the highest r= equired version of any package, =E2=80=A6), then there will be other ways t= o avoid this kind of issue.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best,<br/> Armin<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Philip Kaludercic @ 2025-02-17 17:24 :<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;border-left:3px solid #ccc= ;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Armin Darvish <armindarvish@HIDDEN> writes:<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hi Philip,<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I am on emacs versio 30.0.93. and I tried an init file like this:<br/> ,-=E2=80=94<br/></p> <table style=3D"font-family:"Arial";font-size:10pt;margin-top:0px= ;line-height:10pt;border-collapse:collapse;"><colgroup><col class=3D"org-le= ft"/></colgroup><tbody><tr><td style=3D"font-family:"Arial";font-= size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;background-co= lor:#f9f9f9;border:1px solid white;text-align:left;">;;; init.el =E2=80=94 = -<b>- lexical-binding: t; -</b>-</td> </tr></tbody><tbody><tr/></tbody><tr><td style=3D"font-family:"Arial&q= uot;;font-size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;bac= kground-color:#f9f9f9;border:1px solid white;text-align:left;">(require 'pa= ckage)</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(package-initialize)</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(package-vc-install</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">'(consult-omni :url "<a style=3D"co= lor:#0071c5;" href=3D"https://github.com/armindarvish/consult-omni">https:/= /github.com/armindarvish/consult-omni</a>"</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">:main-file "consult-omni.el"))= </td> </tr></table><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:= 10px;line-height:11pt;font-size:10pt;font-family:"Arial";"> `-=E2=80=94<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Yes, I can reproduce the issue now, thanks!<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#6a3a4c;border-left:= 3px solid #7f455b;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> The issue we have to keep in mind is that since we add the repository<br/> directly to `load-path', all the files can be used no matter what<br/> "specific" file you might intend to use. To retain usability and= not<br/> have unexpected function calls fail, we rather install all the<br/> dependencies.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> My understanding was that packages are either a single-file package,<br/> which won't have this problem, or a multi-file package, in which case,<br/> the "Package-Requires: " header should only be in the main file a= nd<br/> not the extra lisp files. As far as I know, other package managing<br/> systems (like MELPA) don't use hte "Package-Requires: " header in= the<br/> files other than the main lisp file either.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> To clarify the terminology, ELPA/MELPA are package archives that take<br/> usually take a source code checkout and prepare packages. For each<br/> package, they might specify or infer a main file or some other source of<br= /> information to get the metadata like package dependencies, but they will<br= /> also throw out all other files that are not part of the package.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Package-vc is kind of like that, in that it is an independent<br/> implementation of ELPA's build scripts, but as the goal is to explicitly<br= /> load the directory with the source code checkout we don't remove the<br/> "unrelated" files (that is one of the reasons we also advise agai= nst<br/> combining multiple packages in the same directory).<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Note that, we can still<br/> add all the files in the repo to load-path, but when automatically<br/> making the "define-package" declaration in a "package-pkg.el= " file,<br/> the dependencies should be inferred form the main file and not others,<br/> otherwise there will be weird looped dependencies.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I am not sure I follow your argument. The other files are still<br/> installed and loadable, but broken since they are missing dependencies.<br/> That is the state I wish to avoid.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> There is a bug in the dependency resolution, but that is a separate<br/> issue IMO.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> For example, in<br/> case of embark with the following init file:<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> ,-=E2=80=94<br/></p> <table style=3D"font-family:"Arial";font-size:10pt;margin-top:0px= ;line-height:10pt;border-collapse:collapse;"><colgroup><col class=3D"org-le= ft"/></colgroup><tbody><tr><td style=3D"font-family:"Arial";font-= size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;background-co= lor:#f9f9f9;border:1px solid white;text-align:left;">;;; init.el =E2=80=94 = -<b>- lexical-binding: t; -</b>-</td> </tr></tbody><tbody><tr/></tbody><tr><td style=3D"font-family:"Arial&q= uot;;font-size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;bac= kground-color:#f9f9f9;border:1px solid white;text-align:left;">(require 'pa= ckage)</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">;; Adds the Melpa archive to the list of= available repositories</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(setq package-archives</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">'(("elpa" . "<a style=3D"= color:#0071c5;" href=3D"https://elpa.gnu.org/packages/">https://elpa.gnu.or= g/packages/</a>")</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">("melpa-stable" . "<a sty= le=3D"color:#0071c5;" href=3D"https://stable.melpa.org/packages/">https://s= table.melpa.org/packages/</a>")</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">("melpa" . "<a style=3D"c= olor:#0071c5;" href=3D"https://melpa.org/packages/">https://melpa.org/packa= ges/</a>")))</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">;; Initializes the package infrastructur= e</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(package-initialize)</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">(package-refresh-contents)</td> </tr><tbody><tr/></tbody><tr><td style=3D"font-family:"Arial";fon= t-size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;background-= color:#f9f9f9;border:1px solid white;text-align:left;">(use-package embark<= /td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">:vc (:url "<a style=3D"color:#0071c= 5;" href=3D"https://github.com/oantolin/embark">https://github.com/oantolin= /embark</a>"))</td> </tr><tbody><tr/></tbody></table><p style=3D"text-decoration:none;margin-bo= ttom:0px;margin-top:10px;line-height:11pt;font-size:10pt;font-family:"= Arial";"> `-=E2=80=94<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I can see multiple versions of embark being pulled from MELPA becuase<br/> of looped depenncies in the embark-pkg.el file automatically created<br/> by package-vc-install. Here is the contents of that file:<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> ,-=E2=80=94<br/></p> <table style=3D"font-family:"Arial";font-size:10pt;margin-top:0px= ;line-height:10pt;border-collapse:collapse;"><colgroup><col class=3D"org-le= ft"/></colgroup><tbody><tr><td style=3D"font-family:"Arial";font-= size:10pt;margin-top:0px;padding-left:10px;padding-right:10px;background-co= lor:#f9f9f9;border:1px solid white;text-align:left;">(define-package "= embark" "1.1" "No description available." '((emacs= </td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">"25.1") (embark "0.9"= ;) (avy "0.5") (emacs "27.1") (compat</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">"29.1.4.0") (embark "1.0&= quot;) (consult "1.0")) :kind vc :commit</td> </tr><tr><td style=3D"font-family:"Arial";font-size:10pt;margin-t= op:0px;padding-left:10px;padding-right:10px;background-color:#f9f9f9;border= :1px solid white;text-align:left;">"195add1f1ccd1059472c9df7334c97c4d1= 55425e")</td> </tr></tbody></table><p style=3D"text-decoration:none;margin-bottom:0px;mar= gin-top:10px;line-height:11pt;font-size:10pt;font-family:"Arial";= "> `-=E2=80=94<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Note that while this installs just fine, it is pulling 3 different<br/> versions of embark from MELPA becuase of this inferred looped<br/> self-dependency from differnt *.el files in embark repo, which is not<br/> the intended behavior by the author of that package.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> That said, I agree with the point that there can potentially be other<br/> solutions like terminating properly as you said or even better would<br/> be detecting and ignoring any self-dependency. I cannot think of any<br/> scenario where a package should depend on its own or on an older<br/> version of its own.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I agree. I'll try to find a solution to the issue by fixing the<br/> recursion issue and update this thread.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> ><br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Philip Kaludercic @ 2025-02-16 18:53 :<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#6a3a4c;border-left:= 3px solid #7f455b;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Armin Darvish <armindarvish@HIDDEN> writes:<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#7a4900;border-left:= 3px solid #925700;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hello,<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I have noticed that with vc repositories that contain multiple related sing= le-file<br/> packages, package-vc-install creates looped self-dependency that can cause = errors.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> For example, trying to install the repository:<br/><a style=3D"color:#0071c= 5;" href=3D"https://github.com/armindarvish/consult-omni">https://github.co= m/armindarvish/consult-omni</a> <br/> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2= =80=99: 1601" error. This is<br/> because currently package-vc-install tries to read all ".el" file= s in the root<br/> directory to get the dependencies and build the "define-package" = declaration in<br/> consult-omni-pkg.el. This is not compatible with repositories that have mul= tiple<br/> single-file packages in the root directory. Instead, the dependencies shoul= d be<br/> inferred from the main lisp file only. This will be safe with multi-file pa= ckages<br/> as well because the convention is to have the "Package-Requires:"= header only in<br/> the main lisp file and not the additional lisp files.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> What version of Emacs are you using? Installing your repository doesn't<br= /> raise any error when I try to do so.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#7a4900;border-left:= 3px solid #925700;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> There are other packages that have multiple single-file packages as well, f= or<br/> example, <a style=3D"color:#0071c5;" href=3D"https://github.com/oantolin/em= bark">https://github.com/oantolin/embark</a> includes embark and embark-con= sult in<br/> the root directory. Currently, installing embark with package-vc-install ca= uses<br/> several different versions of embark being downlaoded because the dependenc= ies are<br/> read from all of those files even though they are meant to be separate pack= ages.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> The issue we have to keep in mind is that since we add the repository<br/> directly to `load-path', all the files can be used no matter what<br/> "specific" file you might intend to use. To retain usability and= not<br/> have unexpected function calls fail, we rather install all the<br/> dependencies. The recursion error above hints at some programming<br/> issue, where we don't terminate properly.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> ><br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#7a4900;border-left:= 3px solid #925700;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best Regards,<br/><b>Armin Darvish</b><br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> =E2=80=93<br/></p> <hr/><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;lin= e-height:11pt;font-size:10pt;font-family:"Arial";"> [www.armindarvish.com]<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> [www.armindarvish.com] <a style=3D"color:#0071c5;" href=3D"https://www.armi= ndarvish.com/">https://www.armindarvish.com/</a><br/></p> </blockquote> </blockquote> </blockquote> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> =E2=80=93<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best Regards,<br/></p> <div style=3D"font-family:"Arial";font-size:10pt;margin-bottom:20= px;font-family:"Arial";font-size:10pt;line-height:11pt;" id=3D"or= g10197ba"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> <br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> <b>Armin Darvish</b><br/></p> <hr/><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;lin= e-height:11pt;font-size:10pt;font-family:"Arial";"> <a style=3D"color:#0071c5;" href=3D"https://www.armindarvish.com/">www.armi= ndarvish.com</a><br/></p> </div> </div> </body></html> --==-=-=-- --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#76325
; Package emacs
.
Full text available.Received: (at 76325) by debbugs.gnu.org; 17 Feb 2025 17:24:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 17 12:24:54 2025 Received: from localhost ([127.0.0.1]:48340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tk4rV-0006MU-O8 for submit <at> debbugs.gnu.org; Mon, 17 Feb 2025 12:24:54 -0500 Received: from mout01.posteo.de ([185.67.36.65]:35287) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <philipk@HIDDEN>) id 1tk4rR-0006Ls-Hf for 76325 <at> debbugs.gnu.org; Mon, 17 Feb 2025 12:24:51 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7F4E3240028 for <76325 <at> debbugs.gnu.org>; Mon, 17 Feb 2025 18:24:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1739813082; bh=SCYW3YnV9PXyx2UnPqYBJb9nutO60IJaQCpfRfiHvcA=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=Pq02FuOrGYl9/HpnJMVgzKK6fdBPDFPG7vwOqcbp8UI+zBcTHqXsFbgNeR+wTtIkg tGwo09e551Lxf8Qss6h6Bp0lW1H3tusgj4Y3aAcNOHf3k/OOZXnKguRDuuUIxfhREh 4qzssg9wj25Czcq3EOy40uhpklAGw/W96iT0EiqxzgtVAfi6UcIjOfhwlooqeBvlJn 2M5sxd2sTMG62T+LQOc+LqlVIteS6L4ouLqu9NXYNhEFuJWsWe6a/EKDO9p3pDUcD5 GCi41ngHDks/Xcp2mB06eR/01FY9sLiYaIUZNRe23FEJKKsq46zbvENDL5ttNAngcd I9glHj65at4pg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YxTzr3tQxz9rxD; Mon, 17 Feb 2025 18:24:39 +0100 (CET) From: Philip Kaludercic <philipk@HIDDEN> To: Armin Darvish <armindarvish@HIDDEN> Subject: Re: bug#76325: 30.0.93; package-vc-install fails with repositories that contain multiple single-file packages In-Reply-To: <m2v7t9o0tn.fsf@HIDDEN> References: <m2cyfin7af.fsf@HIDDEN> <87wmdpbu14.fsf@HIDDEN> <m2v7t9o0tn.fsf@HIDDEN> Autocrypt: addr=philipk@HIDDEN; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Mon, 17 Feb 2025 17:24:39 +0000 Message-ID: <87jz9obi20.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 76325 Cc: 76325 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Armin Darvish <armindarvish@HIDDEN> writes: > Hi Philip, > > I am on emacs versio 30.0.93. and I tried an init file like this: > ,---- > | ;;; init.el --- -*- lexical-binding: t; -*- > |=20 > | (require 'package) > | (package-initialize) > | (package-vc-install > | '(consult-omni :url "https://github.com/armindarvish/consult-omni" > | :main-file "consult-omni.el")) > `---- Yes, I can reproduce the issue now, thanks! >> The issue we have to keep in mind is that since we add the repository >> directly to `load-path', all the files can be used no matter what >> "specific" file you might intend to use. To retain usability and not >> have unexpected function calls fail, we rather install all the >> dependencies. > > My understanding was that packages are either a single-file package, > which won't have this problem, or a multi-file package, in which case, > the "Package-Requires: " header should only be in the main file and > not the extra lisp files. As far as I know, other package managing > systems (like MELPA) don't use hte "Package-Requires: " header in the > files other than the main lisp file either.=20 To clarify the terminology, ELPA/MELPA are package archives that take usually take a source code checkout and prepare packages. For each package, they might specify or infer a main file or some other source of information to get the metadata like package dependencies, but they will also throw out all other files that are not part of the package. Package-vc is kind of like that, in that it is an independent implementation of ELPA's build scripts, but as the goal is to explicitly load the directory with the source code checkout we don't remove the "unrelated" files (that is one of the reasons we also advise against combining multiple packages in the same directory). > Note that, we can still > add all the files in the repo to load-path, but when automatically > making the "define-package" declaration in a "package-pkg.el" file, > the dependencies should be inferred form the main file and not others, > otherwise there will be weird looped dependencies.=20 I am not sure I follow your argument. The other files are still installed and loadable, but broken since they are missing dependencies. That is the state I wish to avoid. There is a bug in the dependency resolution, but that is a separate issue IMO. > For example, in > case of embark with the following init file: > > ,---- > | ;;; init.el --- -*- lexical-binding: t; -*- > |=20 > | (require 'package) > | ;; Adds the Melpa archive to the list of available repositories > | (setq package-archives > | '(("elpa" . "https://elpa.gnu.org/packages/") > | ("melpa-stable" . "https://stable.melpa.org/packages/") > | ("melpa" . "https://melpa.org/packages/"))) > | ;; Initializes the package infrastructure > | (package-initialize) > | (package-refresh-contents) > |=20 > | (use-package embark > | :vc (:url "https://github.com/oantolin/embark")) > |=20 > `---- > > I can see multiple versions of embark being pulled from MELPA becuase > of looped depenncies in the embark-pkg.el file automatically created > by package-vc-install. Here is the contents of that file: > > ,---- > | (define-package "embark" "1.1" "No description available." '((emacs > | "25.1") (embark "0.9") (avy "0.5") (emacs "27.1") (compat > | "29.1.4.0") (embark "1.0") (consult "1.0")) :kind vc :commit > | "195add1f1ccd1059472c9df7334c97c4d155425e") > `---- > > Note that while this installs just fine, it is pulling 3 different > versions of embark from MELPA becuase of this inferred looped > self-dependency from differnt *.el files in embark repo, which is not > the intended behavior by the author of that package. > > > That said, I agree with the point that there can potentially be other > solutions like terminating properly as you said or even better would > be detecting and ignoring any self-dependency. I cannot think of any > scenario where a package should depend on its own or on an older > version of its own. I agree. I'll try to find a solution to the issue by fixing the recursion issue and update this thread. > > Philip Kaludercic @ 2025-02-16 18:53 : > >> Armin Darvish <armindarvish@HIDDEN> writes: >> >>> Hello, >>> >>> I have noticed that with vc repositories that contain multiple related = single-file >>> packages, package-vc-install creates looped self-dependency that can ca= use errors.=20 >>> >>> For example, trying to install the repository:=20 >>> <https://github.com/armindarvish/consult-omni>=20 >>> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2=80= =99: 1601" error. This is=20 >>> because currently package-vc-install tries to read all ".el" files in t= he root=20 >>> directory to get the dependencies and build the "define-package" declar= ation in >>> consult-omni-pkg.el. This is not compatible with repositories that have= multiple >>> single-file packages in the root directory. Instead, the dependencies s= hould be=20 >>> inferred from the main lisp file only. This will be safe with multi-fil= e packages >>> as well because the convention is to have the "Package-Requires:" heade= r only in=20 >>> the main lisp file and not the additional lisp files. >> >> What version of Emacs are you using? Installing your repository doesn't >> raise any error when I try to do so. >> >>> There are other packages that have multiple single-file packages as wel= l, for=20 >>> example, <https://github.com/oantolin/embark> includes embark and embar= k-consult in >>> the root directory. Currently, installing embark with package-vc-instal= l causes >>> several different versions of embark being downlaoded because the depen= dencies are >>> read from all of those files even though they are meant to be separate = packages. >> >> The issue we have to keep in mind is that since we add the repository >> directly to `load-path', all the files can be used no matter what >> "specific" file you might intend to use. To retain usability and not >> have unexpected function calls fail, we rather install all the >> dependencies. The recursion error above hints at some programming >> issue, where we don't terminate properly. >> >>> >>> Best Regards, >>> *Armin Darvish* >>> >>> -- >>> ------------------------------------------------------------------------ >>> [www.armindarvish.com] >>> >>> >>> [www.armindarvish.com] <https://www.armindarvish.com/>
bug-gnu-emacs@HIDDEN
:bug#76325
; Package emacs
.
Full text available.Received: (at 76325) by debbugs.gnu.org; 17 Feb 2025 05:01:31 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 17 00:01:31 2025 Received: from localhost ([127.0.0.1]:40968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tjtG6-0000P9-64 for submit <at> debbugs.gnu.org; Mon, 17 Feb 2025 00:01:31 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:48343) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <armindarvish@HIDDEN>) id 1tjpHB-0004Uy-13 for 76325 <at> debbugs.gnu.org; Sun, 16 Feb 2025 19:46:23 -0500 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2fc3027c7aeso4337124a91.0 for <76325 <at> debbugs.gnu.org>; Sun, 16 Feb 2025 16:46:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739753175; x=1740357975; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Mi9i4OL1UByMm0nz50a+dGvuZQPW0ey4hs5tBbRA94U=; b=eKHwUtLz2r4vlXD5ttxbaSCU0twnEPpW+Di35uQoNp77JqJWiu31jJ7RmAkEF+mNpF wLENlDwSdVrrVSLwSgp2QYaxnstQdlGGckEAekyq33jKKOY9mcVlHi2QEf+UBsljWd7Q mCvKDI796/YFPNmZ41IelFBDme/JYjWVsBND5py4QlpyPxv0Iefciv/Z8Mps5Hsw2RRo 5jmS/eEjx8BBIQVDDUkMVc4c5ngDukO8MXpmuVyzGue0iOoTY1jJ7lTmmrKAEtxFSHP6 VhSVwaqTLj8wIrmhj9IY1n5RZN4SUN7HS34dfRDw1jTTgmmH2oBZz0ibZ1azclZKDgZD ATcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739753175; x=1740357975; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Mi9i4OL1UByMm0nz50a+dGvuZQPW0ey4hs5tBbRA94U=; b=mnStVFWNxdE0NKR3b1rohEaprizkq36amlGOyqPfrOWiNRSxG7VJpdmaPx2UMQwv95 3dshZZ0nlYKKmRc3HGs3oXR4lvsVnBW07LwhqzIG/eVzOurwu0Di23k1euFL5eR+EWfK 27mkVCiWCLFmYppYdF2mZzmzudlR2URxAa/O5jyqeS/rcqclW1yfMhYfmqWHV0EFaXlW 5RfluNo+QGBFogl1WNu7MV4C+9zZp7WW7zDZdr10MypHdWMfxQpriHUxJcFBcJ9ab5Iy QiW2YPg3iwAKGSueb8kEDzemkNWlp8JYWF4/RaN/h+LnZ8g2a1bX3fR2vTVy3z9gNxUe n5Rw== X-Forwarded-Encrypted: i=1; AJvYcCVQTuq9g7iO1gQ+qv5NvP3R3JriWJRg31j9VbJPAb9WBLo/qlKWkc2VVBzwj5ZQgn1gyg8TiQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzbsxLvGdOPqlYZXY5marISCIiZcIGBJUenuDmdJEsIv9w5dciU uMjlyuaAsVRARo7OFtuvJfmxyEu41d3267VaJI+eikEwZV2bvh3T X-Gm-Gg: ASbGncudcPNpxuek5jJRQmP5CBxNtwxc8rck7NPkbez5rf7xgEV/v68Vjvlyo9yWMeR YIAlnZTd9A7Aw9q6p2ADebsWwWaFfukjarnHnc/n5TkqGJ+JYGm+u9IyXOa0aiVuRsphSICek5F OtcGLtjJvvZ4GYh1FXEpNdR9hjArz+pu7Kg/ZAbgHcGqfLMI2IlUgujlsKmV+dENnKngCFLcQxM OEgs6uge5QVA4q1qxtTTBODkGQJXif6K+V4GDCdzWEBdFqUbNmkt5QOWsOctrTGvMCXsl23aD/1 8vGyoi06573nL1KAJTlClahm8YvuxkQ28uLwKg== X-Google-Smtp-Source: AGHT+IGPdSXiRbC4H/Wzl5NUkQJ7O/3l7/AszDSBb0zooLYHg1Mg8N61H8tlE3jC10vm98I4zzp4Mg== X-Received: by 2002:a17:90b:4a09:b0:2ea:9ccb:d1f4 with SMTP id 98e67ed59e1d1-2fc4078e984mr14889773a91.0.1739753174539; Sun, 16 Feb 2025 16:46:14 -0800 (PST) Received: from localhost ([2603:3024:16f9:5000:18ad:db33:990b:18cd]) by smtp.gmail.com with UTF8SMTPSA id 98e67ed59e1d1-2fbf9aaf1cbsm8819220a91.41.2025.02.16.16.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Feb 2025 16:46:14 -0800 (PST) From: Armin Darvish <armindarvish@HIDDEN> To: Philip Kaludercic <philipk@HIDDEN> Subject: Re: bug#76325: 30.0.93; package-vc-install fails with repositories that contain multiple single-file packages In-Reply-To: <87wmdpbu14.fsf@HIDDEN> (Philip Kaludercic's message of "Sun, 16 Feb 2025 18:53:43 +0000") References: <m2cyfin7af.fsf@HIDDEN> <87wmdpbu14.fsf@HIDDEN> Date: Sun, 16 Feb 2025 16:46:12 -0800 Message-ID: <m2v7t9o0tn.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 76325 X-Mailman-Approved-At: Mon, 17 Feb 2025 00:01:09 -0500 Cc: 76325 <at> debbugs.gnu.org, Armin Darvish <armindarvish@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Philip, I am on emacs versio 30.0.93. and I tried an init file like this: ,---- | ;;; init.el --- -*- lexical-binding: t; -*- |=20 | (require 'package) | (package-initialize) | (package-vc-install | '(consult-omni :url "https://github.com/armindarvish/consult-omni" | :main-file "consult-omni.el")) `---- > The issue we have to keep in mind is that since we add the repository > directly to `load-path', all the files can be used no matter what > "specific" file you might intend to use. To retain usability and not > have unexpected function calls fail, we rather install all the > dependencies. My understanding was that packages are either a single-file package, which = won't have this problem, or a multi-file package, in which case, the "Packa= ge-Requires: " header should only be in the main file and not the extra lis= p files. As far as I know, other package managing systems (like MELPA) don'= t use hte "Package-Requires: " header in the files other than the main lisp= file either. Note that, we can still add all the files in the repo to load= -path, but when automatically making the "define-package" declaration in a = "package-pkg.el" file, the dependencies should be inferred form the main fi= le and not others, otherwise there will be weird looped dependencies. For e= xample, in case of embark with the following init file: ,---- | ;;; init.el --- -*- lexical-binding: t; -*- |=20 | (require 'package) | ;; Adds the Melpa archive to the list of available repositories | (setq package-archives | '(("elpa" . "https://elpa.gnu.org/packages/") | ("melpa-stable" . "https://stable.melpa.org/packages/") | ("melpa" . "https://melpa.org/packages/"))) | ;; Initializes the package infrastructure | (package-initialize) | (package-refresh-contents) |=20 | (use-package embark | :vc (:url "https://github.com/oantolin/embark")) |=20 `---- I can see multiple versions of embark being pulled from MELPA becuase of lo= oped depenncies in the embark-pkg.el file automatically created by package-= vc-install. Here is the contents of that file: ,---- | (define-package "embark" "1.1" "No description available." '((emacs "25.1= ") (embark "0.9") (avy "0.5") (emacs "27.1") (compat "29.1.4.0") (embark "1= .0") (consult "1.0")) :kind vc :commit "195add1f1ccd1059472c9df7334c97c4d15= 5425e") `---- Note that while this installs just fine, it is pulling 3 different versions= of embark from MELPA becuase of this inferred looped self-dependency from = differnt *.el files in embark repo, which is not the intended behavior by t= he author of that package. That said, I agree with the point that there can potentially be other solut= ions like terminating properly as you said or even better would be detectin= g and ignoring any self-dependency. I cannot think of any scenario where a = package should depend on its own or on an older version of its own. Philip Kaludercic @ 2025-02-16 18:53 : > Armin Darvish <armindarvish@HIDDEN> writes: > >> Hello, >> >> I have noticed that with vc repositories that contain multiple related s= ingle-file >> packages, package-vc-install creates looped self-dependency that can cau= se errors.=20 >> >> For example, trying to install the repository:=20 >> <https://github.com/armindarvish/consult-omni>=20 >> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2=80= =99: 1601" error. This is=20 >> because currently package-vc-install tries to read all ".el" files in th= e root=20 >> directory to get the dependencies and build the "define-package" declara= tion in >> consult-omni-pkg.el. This is not compatible with repositories that have = multiple >> single-file packages in the root directory. Instead, the dependencies sh= ould be=20 >> inferred from the main lisp file only. This will be safe with multi-file= packages >> as well because the convention is to have the "Package-Requires:" header= only in=20 >> the main lisp file and not the additional lisp files. > > What version of Emacs are you using? Installing your repository doesn't > raise any error when I try to do so. > >> There are other packages that have multiple single-file packages as well= , for=20 >> example, <https://github.com/oantolin/embark> includes embark and embark= -consult in >> the root directory. Currently, installing embark with package-vc-install= causes >> several different versions of embark being downlaoded because the depend= encies are >> read from all of those files even though they are meant to be separate p= ackages. > > The issue we have to keep in mind is that since we add the repository > directly to `load-path', all the files can be used no matter what > "specific" file you might intend to use. To retain usability and not > have unexpected function calls fail, we rather install all the > dependencies. The recursion error above hints at some programming > issue, where we don't terminate properly. > >> >> Best Regards, >> *Armin Darvish* >> >> -- >> ------------------------------------------------------------------------ >> [www.armindarvish.com] >> >> >> [www.armindarvish.com] <https://www.armindarvish.com/> --=20 Best Regards, *Armin Darvish* ------------------------------------------------------------------------ [www.armindarvish.com] [www.armindarvish.com] <https://www.armindarvish.com/> --==-=-= Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable <html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en"><h= ead><!-- 2025-02-16 Sun 16:46 --><meta http-equiv=3D"Content-Type" content= =3D"text/html;charset=3Dutf-8"/><meta name=3D"viewport" content=3D"width=3D= device-width, initial-scale=3D1"/><meta name=3D"generator" content=3D"Org M= ode"/></head><body> <div style=3D"font-family:"Arial";font-size:10pt;line-height:11pt= ;" id=3D"content"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hi Philip,<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I am on emacs versio 30.0.93. and I tried an init file like this:<br/></p> <div style=3D"margin-top:10px;font-family:"Arial";font-size:10pt;= line-height:11pt;"> <pre style=3D"line-height:12pt;color:#EEFFFF;background-color:#15181B;margi= n:0px;font-size:9pt;font-family:monospace;">;;; init.el --- -*- lexical-bin= ding: t; -*- (require 'package) (package-initialize) (package-vc-install '(consult-omni :url "https://github.com/armindarvish/consult-omni&qu= ot; :main-file "consult-omni.el")) </pre> </div> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;border-left:3px solid #ccc= ;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> The issue we have to keep in mind is that since we add the repository<br/> directly to `load-path', all the files can be used no matter what<br/> "specific" file you might intend to use. To retain usability and= not<br/> have unexpected function calls fail, we rather install all the<br/> dependencies.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> My understanding was that packages are either a single-file package, which = won't have this problem, or a multi-file package, in which case, the "= Package-Requires: " header should only be in the main file and not the= extra lisp files. As far as I know, other package managing systems (like M= ELPA) don't use hte "Package-Requires: " header in the files othe= r than the main lisp file either. Note that, we can still add all the files= in the repo to load-path, but when automatically making the "define-p= ackage" declaration in a "package-pkg.el" file, the dependen= cies should be inferred form the main file and not others, otherwise there = will be weird looped dependencies. For example, in case of embark with the = following init file:<br/></p> <div style=3D"margin-top:10px;font-family:"Arial";font-size:10pt;= line-height:11pt;"> <pre style=3D"line-height:12pt;color:#EEFFFF;background-color:#15181B;margi= n:0px;font-size:9pt;font-family:monospace;">;;; init.el --- -*- lexical-bin= ding: t; -*- (require 'package) ;; Adds the Melpa archive to the list of available repositories (setq package-archives '(("elpa" . "https://elpa.gnu.org/packages/") ("melpa-stable" . "https://stable.melpa.org/package= s/") ("melpa" . "https://melpa.org/packages/"))) ;; Initializes the package infrastructure (package-initialize) (package-refresh-contents) (use-package embark :vc (:url "https://github.com/oantolin/embark")) </pre> </div> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I can see multiple versions of embark being pulled from MELPA becuase of lo= oped depenncies in the embark-pkg.el file automatically created by package-= vc-install. Here is the contents of that file:<br/></p> <div style=3D"margin-top:10px;font-family:"Arial";font-size:10pt;= line-height:11pt;"> <pre style=3D"line-height:12pt;color:#EEFFFF;background-color:#15181B;margi= n:0px;font-size:9pt;font-family:monospace;">(define-package "embark&qu= ot; "1.1" "No description available." '((emacs "25= .1") (embark "0.9") (avy "0.5") (emacs "27.1&= quot;) (compat "29.1.4.0") (embark "1.0") (consult &quo= t;1.0")) :kind vc :commit "195add1f1ccd1059472c9df7334c97c4d15542= 5e") </pre> </div> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Note that while this installs just fine, it is pulling 3 different versions= of embark from MELPA becuase of this inferred looped self-dependency from = differnt *.el files in embark repo, which is not the intended behavior by t= he author of that package.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> That said, I agree with the point that there can potentially be other solut= ions like terminating properly as you said or even better would be detectin= g and ignoring any self-dependency. I cannot think of any scenario where a = package should depend on its own or on an older version of its own.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Philip Kaludercic @ 2025-02-16 18:53 :<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;border-left:3px solid #ccc= ;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Armin Darvish <armindarvish@HIDDEN> writes:<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hello,<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I have noticed that with vc repositories that contain multiple related sing= le-file<br/> packages, package-vc-install creates looped self-dependency that can cause = errors.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> For example, trying to install the repository:<br/><a style=3D"color:#0071c= 5;" href=3D"https://github.com/armindarvish/consult-omni">https://github.co= m/armindarvish/consult-omni</a> <br/> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2= =80=99: 1601" error. This is<br/> because currently package-vc-install tries to read all ".el" file= s in the root<br/> directory to get the dependencies and build the "define-package" = declaration in<br/> consult-omni-pkg.el. This is not compatible with repositories that have mul= tiple<br/> single-file packages in the root directory. Instead, the dependencies shoul= d be<br/> inferred from the main lisp file only. This will be safe with multi-file pa= ckages<br/> as well because the convention is to have the "Package-Requires:"= header only in<br/> the main lisp file and not the additional lisp files.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> What version of Emacs are you using? Installing your repository doesn't<br= /> raise any error when I try to do so.<br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> There are other packages that have multiple single-file packages as well, f= or<br/> example, <a style=3D"color:#0071c5;" href=3D"https://github.com/oantolin/em= bark">https://github.com/oantolin/embark</a> includes embark and embark-con= sult in<br/> the root directory. Currently, installing embark with package-vc-install ca= uses<br/> several different versions of embark being downlaoded because the dependenc= ies are<br/> read from all of those files even though they are meant to be separate pack= ages.<br/></p> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> The issue we have to keep in mind is that since we add the repository<br/> directly to `load-path', all the files can be used no matter what<br/> "specific" file you might intend to use. To retain usability and= not<br/> have unexpected function calls fail, we rather install all the<br/> dependencies. The recursion error above hints at some programming<br/> issue, where we don't terminate properly.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> ><br/></p> <blockquote style=3D"padding-left:5px;margin-left:10px;margin-top:10px;marg= in-bottom:0;font-style:italic;background:#f9f9f9;color:#324e72;border-left:= 3px solid #3c5d88;"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best Regards,<br/><b>Armin Darvish</b><br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> =E2=80=93<br/></p> <hr/><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;lin= e-height:11pt;font-size:10pt;font-family:"Arial";"> [www.armindarvish.com]<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> [www.armindarvish.com] <a style=3D"color:#0071c5;" href=3D"https://www.armi= ndarvish.com/">https://www.armindarvish.com/</a><br/></p> </blockquote> </blockquote> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> =E2=80=93<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best Regards,<br/></p> <div style=3D"font-family:"Arial";font-size:10pt;margin-bottom:20= px;font-family:"Arial";font-size:10pt;line-height:11pt;" id=3D"or= gbb706bf"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> <br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> <b>Armin Darvish</b><br/></p> <hr/><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;lin= e-height:11pt;font-size:10pt;font-family:"Arial";"> <a style=3D"color:#0071c5;" href=3D"https://www.armindarvish.com/">www.armi= ndarvish.com</a><br/></p> </div> </div> </body></html> --==-=-=-- --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#76325
; Package emacs
.
Full text available.Received: (at 76325) by debbugs.gnu.org; 16 Feb 2025 18:53:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 16 13:53:58 2025 Received: from localhost ([127.0.0.1]:37357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tjjmA-00073f-4M for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 13:53:58 -0500 Received: from mout01.posteo.de ([185.67.36.65]:58845) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <philipk@HIDDEN>) id 1tjjm6-00072r-4m for 76325 <at> debbugs.gnu.org; Sun, 16 Feb 2025 13:53:56 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 8AAE8240027 for <76325 <at> debbugs.gnu.org>; Sun, 16 Feb 2025 19:53:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1739732027; bh=fUPKh8gwjtO+JIdHHergHFrpIUm161sCB+Z/SmqH1RU=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=GR8JbL9nX+vaigttQkZdmObq6PpIt8HSGVo2tkXhjPT7MBkOrjMcboA8PqkXnvIBX Mn7KHaPHJHlLmQqLc7Mpn+5qX1SUfriSoUvKP6YjMtYuyU19/hH2cASTtelX40nnux o67SlD3Ac/b18AsdveJqQ/olJ0M7CDL9I1V2zTxYYVq7yzOmKBRUAgIC1lZ7vwrVGZ YgIzSuervfIBJwnaujAjCJExmNe2SDQWMsQI5TYszj7JPNzdfhYd6YPyHEIoiPouZ4 18ug50U7QbxvJncka3+nbprdb2mPAGyfe4D2VuxKUh3Ravy3QwN9cMpCqXKaf/wCe2 OSeOR6uXjyiMA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Yww165lTYz9rxG; Sun, 16 Feb 2025 19:53:46 +0100 (CET) From: Philip Kaludercic <philipk@HIDDEN> To: Armin Darvish <armindarvish@HIDDEN> Subject: Re: bug#76325: 30.0.93; package-vc-install fails with repositories that contain multiple single-file packages In-Reply-To: <m2cyfin7af.fsf@HIDDEN> References: <m2cyfin7af.fsf@HIDDEN> Autocrypt: addr=philipk@HIDDEN; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Sun, 16 Feb 2025 18:53:43 +0000 Message-ID: <87wmdpbu14.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 76325 Cc: 76325 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -4.3 (----) Armin Darvish <armindarvish@HIDDEN> writes: > Hello, > > I have noticed that with vc repositories that contain multiple related si= ngle-file > packages, package-vc-install creates looped self-dependency that can caus= e errors.=20 > > For example, trying to install the repository:=20 > <https://github.com/armindarvish/consult-omni>=20 > will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2=80= =99: 1601" error. This is=20 > because currently package-vc-install tries to read all ".el" files in the= root=20 > directory to get the dependencies and build the "define-package" declarat= ion in > consult-omni-pkg.el. This is not compatible with repositories that have m= ultiple > single-file packages in the root directory. Instead, the dependencies sho= uld be=20 > inferred from the main lisp file only. This will be safe with multi-file = packages > as well because the convention is to have the "Package-Requires:" header = only in=20 > the main lisp file and not the additional lisp files. What version of Emacs are you using? Installing your repository doesn't raise any error when I try to do so. > There are other packages that have multiple single-file packages as well,= for=20 > example, <https://github.com/oantolin/embark> includes embark and embark-= consult in > the root directory. Currently, installing embark with package-vc-install = causes > several different versions of embark being downlaoded because the depende= ncies are > read from all of those files even though they are meant to be separate pa= ckages. The issue we have to keep in mind is that since we add the repository directly to `load-path', all the files can be used no matter what "specific" file you might intend to use. To retain usability and not have unexpected function calls fail, we rather install all the dependencies. The recursion error above hints at some programming issue, where we don't terminate properly. > > Best Regards, > *Armin Darvish* > > -- > ------------------------------------------------------------------------ > [www.armindarvish.com] > > > [www.armindarvish.com] <https://www.armindarvish.com/>
bug-gnu-emacs@HIDDEN
:bug#76325
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 16 Feb 2025 07:30:57 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 16 02:30:57 2025 Received: from localhost ([127.0.0.1]:59832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tjZ79-0007ee-Vi for submit <at> debbugs.gnu.org; Sun, 16 Feb 2025 02:30:57 -0500 Received: from lists.gnu.org ([2001:470:142::17]:45382) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <armindarvish@HIDDEN>) id 1tjR8Z-0007ep-9A for submit <at> debbugs.gnu.org; Sat, 15 Feb 2025 17:59:52 -0500 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 <armindarvish@HIDDEN>) id 1tjR8R-0001Rq-UY for bug-gnu-emacs@HIDDEN; Sat, 15 Feb 2025 17:59:44 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <armindarvish@HIDDEN>) id 1tjR8O-0008M4-KV for bug-gnu-emacs@HIDDEN; Sat, 15 Feb 2025 17:59:43 -0500 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-22101839807so25559445ad.3 for <bug-gnu-emacs@HIDDEN>; Sat, 15 Feb 2025 14:59:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739660378; x=1740265178; darn=gnu.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=GjOHZ33ZLmkrIB40tnKzgHV3mYxBbPrA7EJj68qAW4Y=; b=R4gzr0UWHhKkZJWvZNdl8+R5WBDNPvqq8E+rdvjoi3TYdGgzOe0H1m5RUcUfd+oLSQ odzcbzQ/9cyZ1WJ8Nbx6hsExb3uGLQXA+dAWRd0I6aumZzlTIhf9o8LgFKeAp8OgGAFz couduRg9BvbqKARnIwi5b78MxWN/gqamflSbr7UXFJ4BXBUfSv231bfSy400I34/lQS8 JNT2c1qEtpqXe2FwkgLokj/pBw2gakZdxOddIeHS9kuWrX9iTbDFrFE7G6BCfYoywocI m20DNTZM4IfUNx2d2iss6M8E8R9/BhcdWcOQlF9aqs43dPF6xGgnScWr1pQrwq9eZRSy mOOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739660378; x=1740265178; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GjOHZ33ZLmkrIB40tnKzgHV3mYxBbPrA7EJj68qAW4Y=; b=nCqNg3yTDf7hqo1yTTpZAKCalNdO2DU309pCxoU7lt5ajwrkWzwtqYyCecZu/lx2WS 3TDmYtR28V1OGIO03ej7EjMSIRCu2FsUXOP9dMGcBpHle36L/NKEfw0bqofhkiGhs29q K2hsRphqdpv/bwxidxfb05Qn6mHIYE+eefjK5zyxakOot0RY7kLNihqU7fPSx5jpM2z+ Dk1TnX2N48rQHpd8wagxsPTdE3gn+CV09ZAnk8rId7kEvcerIx3r9ULS2Dyj435iE0dV jg3japFViaSCqQpnS41fGVRX/BvGY21gJI9Ez9FSCBN5LU3oPxFvxpYH0tpeygFfgG7j aN0g== X-Gm-Message-State: AOJu0Yx7FgHJZ+/6UMRt6CRwuv+sGHbMCIItS+pzVuE1VFsATM9NcP53 7zmbM6+GGKxO+pRHfL1g6PMT92jrat3CliyqNWoRqDjUH8jKSzzclErCR9nI X-Gm-Gg: ASbGnctjpwtT0sBs5NOC4iRcSzDNTjTccS3L9t9+P7yxvTdpheTcIrGvPFo3ryNh3JN WxuS0sYjvZ+MkFZf2kJVDKvVYvPJ4oZOVcsZSw9d3iDhXxhjoBwkeRSV+wPHcI8bG3+zu+GQDrd yIo9I5+wIXQyZiPjcaMYwhUaz4FMmol6TNardlxcR+kRcThWXNxL05SZ9Zr5Hvzvdqxe0QBoiAX 6ngbDjpzPkU5QDNReHtucrYOFogWil7KM3y5bGcc4g7eZpDFbIJzFuw5hT5gBZMUwZf607+zN8F 2d9cil110/fhZcGiJ7EhRwKw+yFri9qgAg== X-Google-Smtp-Source: AGHT+IGN85hEtr6mhNedDnjzcenZAVQqwbQM4nwqT7IwnCej4KyRLLLHIZj6GSe8+HYOnjU9KFbrRA== X-Received: by 2002:a17:902:ea0c:b0:216:4853:4c0b with SMTP id d9443c01a7336-221040bcc85mr65707105ad.33.1739660377743; Sat, 15 Feb 2025 14:59:37 -0800 (PST) Received: from localhost ([2601:640:8800:309:2560:931:2a9d:3d97]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-220d5584dfbsm47891555ad.213.2025.02.15.14.59.37 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Feb 2025 14:59:37 -0800 (PST) From: Armin Darvish <armindarvish@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: 30.0.93; package-vc-install fails with repositories that contain multiple single-file packages Date: Sat, 15 Feb 2025 14:59:36 -0800 Message-ID: <m2cyfin7af.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=armindarvish@HIDDEN; helo=mail-pl1-x62d.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-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 16 Feb 2025 02:30:55 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I have noticed that with vc repositories that contain multiple related sing= le-file packages, package-vc-install creates looped self-dependency that can cause = errors.=20 For example, trying to install the repository:=20 <https://github.com/armindarvish/consult-omni>=20 will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2=80=99:= 1601" error. This is=20 because currently package-vc-install tries to read all ".el" files in the r= oot=20 directory to get the dependencies and build the "define-package" declaratio= n in consult-omni-pkg.el. This is not compatible with repositories that have mul= tiple single-file packages in the root directory. Instead, the dependencies shoul= d be=20 inferred from the main lisp file only. This will be safe with multi-file pa= ckages as well because the convention is to have the "Package-Requires:" header on= ly in=20 the main lisp file and not the additional lisp files. There are other packages that have multiple single-file packages as well, f= or=20 example, <https://github.com/oantolin/embark> includes embark and embark-co= nsult in the root directory. Currently, installing embark with package-vc-install ca= uses several different versions of embark being downlaoded because the dependenc= ies are read from all of those files even though they are meant to be separate pack= ages. Best Regards, *Armin Darvish* -- ------------------------------------------------------------------------ [www.armindarvish.com] [www.armindarvish.com] <https://www.armindarvish.com/> --==-=-= Content-Type: text/html; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable <html xmlns=3D"http://www.w3.org/1999/xhtml" lang=3D"en" xml:lang=3D"en"><h= ead><!-- 2025-02-15 Sat 14:59 --><meta http-equiv=3D"Content-Type" content= =3D"text/html;charset=3Dutf-8"/><meta name=3D"viewport" content=3D"width=3D= device-width, initial-scale=3D1"/><meta name=3D"generator" content=3D"Org M= ode"/></head><body> <div style=3D"font-family:"Arial";font-size:10pt;line-height:11pt= ;" id=3D"content"> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Hello,<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> I have noticed that with vc repositories that contain multiple related sing= le-file<br/> packages, package-vc-install creates looped self-dependency that can cause = errors.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> For example, trying to install the repository:<br/><a style=3D"color:#0071c= 5;" href=3D"https://github.com/armindarvish/consult-omni">https://github.co= m/armindarvish/consult-omni</a> <br/> will result in "Lisp nesting exceeds =E2=80=98max-lisp-eval-depth=E2= =80=99: 1601" error. This is<br/> because currently package-vc-install tries to read all ".el" file= s in the root<br/> directory to get the dependencies and build the "define-package" = declaration in<br/> consult-omni-pkg.el. This is not compatible with repositories that have mul= tiple<br/> single-file packages in the root directory. Instead, the dependencies shoul= d be<br/> inferred from the main lisp file only. This will be safe with multi-file pa= ckages<br/> as well because the convention is to have the "Package-Requires:"= header only in<br/> the main lisp file and not the additional lisp files.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> There are other packages that have multiple single-file packages as well, f= or<br/> example, <a style=3D"color:#0071c5;" href=3D"https://github.com/oantolin/em= bark">https://github.com/oantolin/embark</a> includes embark and embark-con= sult in<br/> the root directory. Currently, installing embark with package-vc-install ca= uses<br/> several different versions of embark being downlaoded because the dependenc= ies are<br/> read from all of those files even though they are meant to be separate pack= ages.<br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> Best Regards,<br/><b>Armin Darvish</b><br/></p> <p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;line-hei= ght:11pt;font-size:10pt;font-family:"Arial";"> =E2=80=93<br/></p> <div style=3D"font-family:"Arial";font-size:10pt;margin-bottom:20= px;font-family:"Arial";font-size:10pt;line-height:11pt;" id=3D"or= gcfc0faa"> <hr/><p style=3D"text-decoration:none;margin-bottom:0px;margin-top:10px;lin= e-height:11pt;font-size:10pt;font-family:"Arial";"> <a style=3D"color:#0071c5;" href=3D"https://www.armindarvish.com/">www.armi= ndarvish.com</a><br/></p> </div> </div> </body></html> --==-=-=-- --=-=-=--
Armin Darvish <armindarvish@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#76325
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.