all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* cl-defstruct-based package.el, now with ert tests!
@ 2013-03-12  1:03 Daniel Hackney
  2013-03-12  2:01 ` Tom Tromey
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Hackney @ 2013-03-12  1:03 UTC (permalink / raw)
  To: Emacs development discussions

I've mentioned this project on the list before, and I want to update
everyone now that I have more thorough testing.

My aim has been to clean up package.el, primarily by using
`cl-defstruct' to create a `package-desc' structure which is used
throughout the library. This replaces the current situation, in which
package information floats through the library in several different
forms. Sometimes a package is represented as a `cons' of the package
name and a vector of information, sometimes (as in "foo-pkg.el" files),
it is represented more like a list, and sometimes as a name and version
as separate arguments. Moving to a single, uniform representation
simplifies extensibility.

The changes touch most of the code, but the overall structure of the
code has not changed significantly. Some parts of the code which were
questionable in the first place (such as using `tar-mode' to extract tar
archives) have been replaced with simpler alternatives. In the case of
tar, the file is simply downloaded to a temporary directory and
extracted using "tar xaf foo-1.2.3.tar".

This reorganization will make it easier to add features, most notably
the use of compressed archives and signatures, since the code is better
organized and easier to modify.

An important part of the work is that it is fully compatible with the
externally-facing "API" of the current package.el. It produces and
consumes exactly the same "archive-contents" and "*-pkg.el" files as the
current package.el, so none of the existing infrastructure needs to
change.

Finally, I have written a set of tests using ERT to ensure correct
behavior. The file is in "test/automated" and tests:

- single- and multi-file package installation
- installing packages with dependencies
- refreshing archive contents
- displaying the "*Packages*" buffer
- Upgrading packages using `package-menu-mark-upgrades'

All of the tests pass for me.

It is rebased off of the current trunk. My rewrite is here:

https://github.com/haxney/emacs/tree/package-rewrite

Hope you enjoy!

--
Daniel Hackney



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

end of thread, other threads:[~2013-03-20 18:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12  1:03 cl-defstruct-based package.el, now with ert tests! Daniel Hackney
2013-03-12  2:01 ` Tom Tromey
2013-03-12 12:03   ` Dmitry Gutov
2013-03-12 18:13     ` Ted Zlatanov
2013-03-14  4:36       ` Daniel Hackney
2013-03-14 10:53         ` Stephen J. Turnbull
2013-03-14 12:11         ` Ted Zlatanov
2013-03-14 13:49         ` Stefan Monnier
2013-03-14 17:53           ` chad
2013-03-15  4:00           ` Daniel Hackney
2013-03-15 12:56             ` Stefan Monnier
2013-03-15 13:46               ` Eli Zaretskii
2013-03-20 18:01             ` Ted Zlatanov
2013-03-12 16:25   ` Daniel Hackney

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.