[Top][All Lists]

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

Re: package-vc support for :files keyword

From: Philip Kaludercic
Subject: Re: package-vc support for :files keyword
Date: Tue, 19 Sep 2023 08:47:10 +0000

Tony Zorman <tonyzorman@mailbox.org> writes:

> On Mon, Sep 18 2023 15:52, Philip Kaludercic wrote:
>>> I think that
>>>   $ rm foo.el
>>>   $ git update-index --assume-unchanged foo.el
>>> should work. It should merge cleanly (I've tried this out just now, and
>>> it worked, but I may have overlooked something). If it's part of the
>>> package description, then updating should work out of the box, since
>>> package-vc-upgrade also calls package-vc--unpack-1, which would execute
>>> the respective :early-shell-command again.
>> Being a git-specific command, this shouldn't be added to package-vc
>> directly.  If there is a VCS agnostic/generalisable way of doing this,
>> then it could be added to VC.
> Ah, sometimes I forget that there are VCs other than Git—sorry :)
>> But for now, if I understand you correctly, you are suggesting that
>> users give package specifications like this:
>> (foo :url "https://some.vcs/repository";
>>      ;; ...
>>      :early-shell-command "rm [all the files]; git update-index 
>> --assume-unchanged [all the files]")
>> where [all the files] might change between updates.
> Yes, exactly.
>> At this point I continue to question the utility of emulating
>> MELPA-style :files attributes, unless there are concrete usability
>> issues.
>> For the record, these are all the repositories in {Non,}GNU ELPA that
>> develop multiple packages in a single repository:
>> [… 12 lines elided …]
>> From what I understand, there is no technical necessity for this mode of
>> development?  I wonder how difficult it would be to push for a
>> one-package-one-repo approach.
> This is not just for multiple packages in a single repository—at least
> one has to somewhat broaden what "multiple packages" means. Some
> packages include small shims for bigger projects, and inadvertently
> require them as dependencies. The original issue[1] on the
> vc-use-package repo mentions org-ql[2], more specifically its helm
> integration in the form of helm-org-ql.el. Some people might not want to
> pull down helm as a dependency just for one file that they are not going
> to use anyways.
> I'm not sure how common of a situation this actually is, but at least
> for the big completion frameworks—helm and ivy—it's not totally unheard
> of.

Hmm, this is interesting example that I was not familiar with.  As an
alternative idea, do you think that using `:ignored-files' like
elpa-admin.el could be useful?  You could exclude all the files with
"soft-dependencies", that wouldn't be scraped in `package-vc--unpack-1'
when looking for dependency files.

Alternatively, since I am still not convinced that having
:early-shell-command built-in to package-vc is a good idea, one could
scatter a number of hooks around the code that could be used to extend
installation procedure with additional functionality, like a

> [1]: https://github.com/slotThe/vc-use-package/issues/12
> [2]: https://github.com/alphapapa/org-ql/

reply via email to

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