emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature/package+vc 04c4c578c7 3/4: Allow for packages to be installe


From: Philip Kaludercic
Subject: Re: feature/package+vc 04c4c578c7 3/4: Allow for packages to be installed directly from VCS
Date: Sat, 29 Oct 2022 16:00:23 +0000

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> +     (list (mapcan
>> +            (lambda (spec)
>> +              (let ((rel (ignore-errors (elpaa--get-last-release spec))))
>> +                (when rel
>> +                  (nconc spec (list :release-rev (cdr rel)))))
>> +              (pcase spec
>> +                (`(,name :url nil . ,rest)
>> +                 `((,name :url ,(concat "https://git.sv.gnu.org/git/"; 
>> elpaa--gitrepo)
>> +                          :branch ,(concat elpaa--branch-prefix (car spec))
>> +                          ,@rest)))
>> +                (`(,_ :core ,_ . ,_) nil)       ;not supported
>> +                (_ (list spec))))
>> +            specs)
>> +           :version 1 :default-vc 'Git)
>
> IMO we should strive to reduce a package's spec.  Ideally they should
> just be a URL.  

I agree.

>                 We're not there yet, but the above adds info which we
> can (and do in `elpa-admin.el`) extract from the VCS, so it's going
> "backward".  IOW, it's making things worse rather than better.

You mean the addition of :release-rev, right?  Yes, it could be
extracted from the VCS, but finding a generic system is tricky as you
have mentioned.  How about a new VC method `last-change' that takes a
region and returns the last revision that affected it.  Any backend that
supports `annotate' ought to be able to determine it, right?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]