unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Adding ELPA to Emacs core
@ 2018-03-10 12:13 Phillip Lord
  2018-03-10 18:59 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Phillip Lord @ 2018-03-10 12:13 UTC (permalink / raw)
  To: emacs-devel


I've had a bit of a play at allowing ELPA packages to be directly
distributed with a core emacs installation. I tried this before where
files from ELPA were adding into the core as package.el packages. This
version does something simpler -- the raw files are just dumping into
the Emacs core, and then loaded like normal.

It currently uses some heuristics to achieve this, but it supports
installing the package, any tests into EMACS/test/lisp and texinfo
files. I've added an extensibility point though -- packages could
control their own deployment where something complicated needs to
happen.

Currently, it's make file driven (i.e. you edit the make file to add or
update a new package), but it would probably make sense to put the data
in a different file.

It's on branch elparized-core. Comments welcome.

Phil



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Adding ELPA to Emacs core
  2018-03-10 12:13 Adding ELPA to Emacs core Phillip Lord
@ 2018-03-10 18:59 ` Eli Zaretskii
  2018-03-10 20:44   ` Phillip Lord
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2018-03-10 18:59 UTC (permalink / raw)
  To: Phillip Lord; +Cc: emacs-devel

> From: phillip.lord@russet.org.uk (Phillip Lord)
> Date: Sat, 10 Mar 2018 12:13:01 +0000
> 
> 
> I've had a bit of a play at allowing ELPA packages to be directly
> distributed with a core emacs installation. I tried this before where
> files from ELPA were adding into the core as package.el packages. This
> version does something simpler -- the raw files are just dumping into
> the Emacs core, and then loaded like normal.
> 
> It currently uses some heuristics to achieve this, but it supports
> installing the package, any tests into EMACS/test/lisp and texinfo
> files. I've added an extensibility point though -- packages could
> control their own deployment where something complicated needs to
> happen.
> 
> Currently, it's make file driven (i.e. you edit the make file to add or
> update a new package), but it would probably make sense to put the data
> in a different file.

Thanks.

Is this supposed to be used while building a development version as
well?  Because if so, its use of rsync might be a portability issue.
Can't we do the same using some Git magic instead?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Adding ELPA to Emacs core
  2018-03-10 18:59 ` Eli Zaretskii
@ 2018-03-10 20:44   ` Phillip Lord
  2018-03-11  3:56     ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Phillip Lord @ 2018-03-10 20:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> Currently, it's make file driven (i.e. you edit the make file to add or
>> update a new package), but it would probably make sense to put the data
>> in a different file.
>
> Thanks.
>
> Is this supposed to be used while building a development version as
> well?  Because if so, its use of rsync might be a portability issue.
> Can't we do the same using some Git magic instead?

It would *only* be used during a development build. During a "normal"
from source tarball, all the files would already been in place.

I've blitzed rsync. I was just using instead of cp.

Phil



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Adding ELPA to Emacs core
  2018-03-10 20:44   ` Phillip Lord
@ 2018-03-11  3:56     ` Stefan Monnier
  2018-03-11 22:03       ` Phillip Lord
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2018-03-11  3:56 UTC (permalink / raw)
  To: emacs-devel

> It would *only* be used during a development build. During a "normal"
> from source tarball, all the files would already been in place.

Is there some way to "pin" a package to particular revision (on release
branches, we'll want to do that for all packages)?


        Stefan




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Adding ELPA to Emacs core
  2018-03-11  3:56     ` Stefan Monnier
@ 2018-03-11 22:03       ` Phillip Lord
  2018-03-12 19:16         ` Achim Gratz
  0 siblings, 1 reply; 10+ messages in thread
From: Phillip Lord @ 2018-03-11 22:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

>> It would *only* be used during a development build. During a "normal"
>> from source tarball, all the files would already been in place.
>
> Is there some way to "pin" a package to particular revision (on release
> branches, we'll want to do that for all packages)?


At the moment, it's the opposite. There isn't any way to unpin. Packages
are pulled out by a specific SHA individual for each package. This is
necessary because ELPA is a mixed economy: packages on branches will
have a different SHA from HEAD on master; and on trunk, package releases
are not co-ordinated, so each package needs to define it's own SHA.

Personally, I think that this is correct and not just for release
branches. Otherwise, the build would be far from repeatable, depending
on the state of ELPA. Having a "ignore the make file and take HEAD"
would be a nice option to have for running on a CI system.

It would also be possible to support other repos beyond ELPA
(i.e. org-mode has it's own git and we could take from there
directly). Whether this is a good idea or not, I leave as an open
question.

One thing that does worry me is that it means Emacs source as references
to ELPA git. If Emacs (or ELPA) ever needs to move VCS, it's going to
require some significant hackery.

Phil








^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Adding ELPA to Emacs core
  2018-03-11 22:03       ` Phillip Lord
@ 2018-03-12 19:16         ` Achim Gratz
  2018-03-12 21:11           ` Phillip Lord
  0 siblings, 1 reply; 10+ messages in thread
From: Achim Gratz @ 2018-03-12 19:16 UTC (permalink / raw)
  To: emacs-devel

Phillip Lord writes:
> One thing that does worry me is that it means Emacs source as references
> to ELPA git. If Emacs (or ELPA) ever needs to move VCS, it's going to
> require some significant hackery.

Well, if you replace those SHA you were previously talking about with
tags, then the required hackery gets significantly reduced.  And no, I
don't think that EMACS needs to be able to reference any SHA directly
since ELPA is well enough under control to be able to place tags where
you need them, maybe even of the form emacs-x.y.z or similar so it
becomes clear which of these are in use where.  Naming the tags
explicitly to indicate Emacs' use of them would certainly help any
maintainer who would want to backport important patches to a branch that
older Emacsen can use.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Adding ELPA to Emacs core
  2018-03-12 19:16         ` Achim Gratz
@ 2018-03-12 21:11           ` Phillip Lord
  2018-03-13  0:53             ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Phillip Lord @ 2018-03-12 21:11 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-devel

Achim Gratz <Stromeko@nexgo.de> writes:

> Phillip Lord writes:
>> One thing that does worry me is that it means Emacs source as references
>> to ELPA git. If Emacs (or ELPA) ever needs to move VCS, it's going to
>> require some significant hackery.
>
> Well, if you replace those SHA you were previously talking about with
> tags, then the required hackery gets significantly reduced.  And no, I
> don't think that EMACS needs to be able to reference any SHA directly
> since ELPA is well enough under control to be able to place tags where
> you need them, maybe even of the form emacs-x.y.z or similar so it
> becomes clear which of these are in use where.  Naming the tags
> explicitly to indicate Emacs' use of them would certainly help any
> maintainer who would want to backport important patches to a branch that
> older Emacsen can use.


Yeah, I thought about that. But tags are just aliases for SHAs so I am
unconvinced this reduces the hackery that would come if we were to move
VCS. So, for example, we move to nugit (the new VCS I am not working
on). git tags would have to be translated to nugit tags. But, if we
could do this, we could just put git SHAs onto nugit as a nugit tag; or
we could edit Emacs git history so that git SHAs become nugit
identifiers.

Of course, my current solution does allow use of tags instead of SHAs,
since you can use anywhere a SHA is valid in git, you can use a tag. But
I don't share your confidence that tags could be controlled on
ELPA. There are multiple branches, and even on master the "current
version" maps to multiple commits. So, you need "A-emacs-x.y.z" and
"B-emacs.x.y.z" where A and B are package names. Putting this much
semantics in a string goes against my better judgement, I think.

Phil



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Adding ELPA to Emacs core
  2018-03-12 21:11           ` Phillip Lord
@ 2018-03-13  0:53             ` Stefan Monnier
  2018-03-13 17:00               ` Phillip Lord
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2018-03-13  0:53 UTC (permalink / raw)
  To: emacs-devel

> Of course, my current solution does allow use of tags instead of SHAs,
> since you can use anywhere a SHA is valid in git, you can use a tag. But
> I don't share your confidence that tags could be controlled on
> ELPA. There are multiple branches, and even on master the "current
> version" maps to multiple commits. So, you need "A-emacs-x.y.z" and
> "B-emacs.x.y.z" where A and B are package names. Putting this much
> semantics in a string goes against my better judgement, I think.

FWIW, I tend to agree that SHAs will work at least as well as tags.
Also if you want reproducibility, you need SHAs rather than tags.


        Stefan




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Adding ELPA to Emacs core
  2018-03-13  0:53             ` Stefan Monnier
@ 2018-03-13 17:00               ` Phillip Lord
  2018-03-13 21:16                 ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Phillip Lord @ 2018-03-13 17:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

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

>> Of course, my current solution does allow use of tags instead of SHAs,
>> since you can use anywhere a SHA is valid in git, you can use a tag. But
>> I don't share your confidence that tags could be controlled on
>> ELPA. There are multiple branches, and even on master the "current
>> version" maps to multiple commits. So, you need "A-emacs-x.y.z" and
>> "B-emacs.x.y.z" where A and B are package names. Putting this much
>> semantics in a string goes against my better judgement, I think.
>
> FWIW, I tend to agree that SHAs will work at least as well as tags.
> Also if you want reproducibility, you need SHAs rather than tags.
>


One issue with my branch so far is that the packages that I have copied
into the build become built-in, and package.el doesn't see versions on
ELPA as upgrades.

I guess this brings us to a related and perhaps bigger problem. ELPA
(the web end of the archive, rather than git) doesn't support multiple
versions of packages.

Say Emacs-27 bundles bob-3.1.el which is also in ELPA. Now bob-4.1.el is
released which is an upgrade. So surely Emacs-27 should offer to update?
But, then bob-5.1.el comes out along with Emacs-28 and bob-5.1.el does
not support Emacs-27. Now Emacs-27 should no longer install
bob-5.1.el. But surely, it should allow installation of bob-4.1.el.

AFAICT, neither package.el, nor ELPA supports multiple versions with
different Emacs dependencies.

Phil



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Adding ELPA to Emacs core
  2018-03-13 17:00               ` Phillip Lord
@ 2018-03-13 21:16                 ` Stefan Monnier
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2018-03-13 21:16 UTC (permalink / raw)
  To: Phillip Lord; +Cc: emacs-devel

> One issue with my branch so far is that the packages that I have copied
> into the build become built-in, and package.el doesn't see versions on
> ELPA as upgrades.

This is normally done via package--builtin-versions, set in loaddefs.el,
generated from lisp/emacs-lisp/autoload.el.

> Say Emacs-27 bundles bob-3.1.el which is also in ELPA. Now bob-4.1.el is
> released which is an upgrade. So surely Emacs-27 should offer to update?
> But, then bob-5.1.el comes out along with Emacs-28 and bob-5.1.el does
> not support Emacs-27. Now Emacs-27 should no longer install
> bob-5.1.el. But surely, it should allow installation of bob-4.1.el.

This problem is not specific to "Emacs with ELPA packages", tho.

But yes, it's a problem that would be good to fix.


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-13 21:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-10 12:13 Adding ELPA to Emacs core Phillip Lord
2018-03-10 18:59 ` Eli Zaretskii
2018-03-10 20:44   ` Phillip Lord
2018-03-11  3:56     ` Stefan Monnier
2018-03-11 22:03       ` Phillip Lord
2018-03-12 19:16         ` Achim Gratz
2018-03-12 21:11           ` Phillip Lord
2018-03-13  0:53             ` Stefan Monnier
2018-03-13 17:00               ` Phillip Lord
2018-03-13 21:16                 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).