From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: emacs-devel@gnu.org, Oleh Krehel <oleh@oremacs.com>
Subject: Re: [elpa] main 8f4cb59: * elpa-packages (counsel, ivy, swiper): Auto-sync.
Date: Thu, 25 Feb 2021 10:12:37 -0500 [thread overview]
Message-ID: <jwv1rd4i502.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87h7m0z07r.fsf@tcd.ie> (Basil L. Contovounesios's message of "Thu, 25 Feb 2021 14:33:12 +0000")
>> * elpa-packages (counsel, ivy, swiper): Auto-sync.
> Sorry, I realised only after the fact that the corresponding externals
> in elpa.git had significant local changes in the form of deleted files,
> diverging Version headers, etc., so I'm guessing :auto-sync won't work
> for these packages.
Indeed. When I saw that commit this morning I thought (naively?)
that maybe you had sorted it out :-(
> Should I revert this commit in the meantime?
I think so, yes (it's not terribly harmful because the sync will just
fail with "can't fast forward", but it's not a very valuable use of
resources ;-)
> It gets even more complicated: the existing ivy-hydra.el and the new
> ivy-avy.el in swiper.git were apparently designed as optional separate
> packages, so I've now created the corresponding external branches in
> elpa.git (but not yet added them to elpa-packages).
>
> What is the best way to handle this complexity (that of having multiple
> packages provided by a single upstream repository) in elpa.git?
>
> For example, should swiper.git have separate branches for each package's
> subtree, so that elpa.git can (hopefully) just fetch and fast-forward to
> them automatically?
>
> Should things continue as they are now, with elpa.git deleting files
> locally and swiper.git blissfully unaware of the fact?
Good question. The scripts used for GNU ELPA were designed with
a dual-use in mind, where OT1H they can take the elpa.git and generate
the ELPA tarballs and OTOH they can take an elpa.git clone and build the
packages for use in-place.
The "use in place" feature is not used very commonly, but it is the most
natural use case for the developer (which reduces the difference between
what the developer uses and what the users use, thus reducing the risk
for errors introduced by the packaging) so I find it important.
To me the two best options are:
- Split the upstream repository so we get one repository per ELPA package.
- Get rid of the split between the ELPA packages (so you again get one
ELPA package per repository).
Another option is to have separate manually-synced branches in the
upstream, one per ELPA package. This is basically the same as what we
have currently, except that the manual syncing is done between the "main"
branch" and the "for-elpa branches" (all within the upstream repository)
rather than between the main branch in the upstream and the elpa
branches in `elpa.git`. To me, it seems to bring no benefit, but
I guess depending on your workflow (and access rights) it could make
a difference.
There's another option, which I dislike and introduces inefficiencies,
which is to make all those packages have the exact same content (so they
all have the same upstream branch and we can fast-forward it) and then
rely on the `:ignored-files` parameter in `elpa-packages` to filter out the
files we don't want in the tarballs.
Downsides:
- A full elpa.git checkout (like the one elpa.gnu.org keeps to build the tarballs, or the
one I keep on my machines to "install in place" all the GNU ELPA packages)
would contain duplicate copies.
- The `:ignored-files` doesn't have any notion of "negation" so you
can't say "ignore all but counsel.el", making those lists of
ignored files annoying to maintain.
- For the "install in place" case, those duplicate copies get
redundantly byte-compiled as well.
- For the "install in place" case, the "ivy.el" file loaded by Emacs
may not be the one I think: instead of `packages/ivy/ivy.el` the
`load-path` may direct Emacs to choose `packages/counsel/ivy.el`
instead (so I'd have to be careful to ask Emacs which file it's using
before I start hacking on it, lest I'd start modifying one file which
turns out not be used, which could lead me to tearing out my hair for
a while).
> Or maybe adding something like MELPA's ability to specify which exact
> files to consider from the upstream repository?
That could be added, and could reduce the burden of managing the
`:ignored-filed`, yes.
It'd likely have to be done in this part of the elpa-admin.el code:
(apply #'elpaa--call
nil "tar"
`("--exclude-vcs"
,@(cond
(ignores
(mapcar (lambda (i) (format "--exclude=packages/%s/%s" pkgname i))
ignores))
((file-readable-p elpaignore) `("-X" ,elpaignore)))
,@(mapcar (lambda (r) (elpaa--make-tar-transform pkgname r))
renames)
"--transform"
,(format "s|^packages/%s|%s-%s|" pkgname pkgname vers)
"-chf" ,tarball
,(concat "packages/" pkgname)))
right at the end here, you'd probably want to list each part
individually instead of telling tar to include the whole subdirectory.
Stefan
next prev parent reply other threads:[~2021-02-25 15:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210225102521.11653.64611@vcs0.savannah.gnu.org>
[not found] ` <20210225102523.7CEF420B28@vcs0.savannah.gnu.org>
2021-02-25 14:33 ` [elpa] main 8f4cb59: * elpa-packages (counsel, ivy, swiper): Auto-sync Basil L. Contovounesios
2021-02-25 15:12 ` Stefan Monnier [this message]
2021-02-25 16:24 ` Basil L. Contovounesios
2021-02-25 16:40 ` Stefan Monnier
2021-03-09 22:17 ` Basil L. Contovounesios
2021-03-09 23:56 ` Stefan Monnier
2021-03-10 12:40 ` Basil L. Contovounesios
2021-03-11 15:48 ` Stefan Monnier
2021-03-11 17:12 ` Basil L. Contovounesios
2021-03-11 17:34 ` Stefan Monnier
2021-03-11 19:25 ` Basil L. Contovounesios
2021-03-11 22:47 ` Stefan Monnier
2021-03-11 22:59 ` Basil L. Contovounesios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv1rd4i502.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=contovob@tcd.ie \
--cc=emacs-devel@gnu.org \
--cc=oleh@oremacs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.