Commit Graph

158 Commits

Author SHA1 Message Date
196638bf47 Improve handling for arbitrary package errors
e.g. if the package doesn't exist, it shouldn't simply die.
2018-06-24 22:23:09 +02:00
e99ae5382c Refactor package! macro
And have :ignore and :freeze be evaluated during package management,
rather than during macro expansion/compile time.

Also gives doom-package-prop a third, boolean argument. If non-nil,
`eval' the return value.
2018-06-24 22:23:08 +02:00
adf143a853 Fix void-variable error when installing packages
Caused by a haphazardly refactor in f6dc6ac7.
2018-06-23 20:11:43 +02:00
f6dc6ac74e Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
d4ba03791f Don't async refresh package contents
The performance benefit is minor and the loss of feedback is major in
case of errors.
2018-06-20 12:45:03 +02:00
71f0b3ba10 Minor error handler refactor in package management
Allow debugger to produce better backtraces.
2018-06-20 02:23:55 +02:00
03022d09f9 Remove doom//x naming convention
This naming convention was meant to be for batch commands, but it grew
to include "commands that were helpful with managing Doom", but many of
these commands shouldn't be interactive in the first place!
2018-06-17 21:35:58 +02:00
36992037d1 Update package dir mtimes for stale checks
This helps doom//reload-package-autoloads detect if packages have
changed.
2018-06-17 14:45:07 +02:00
69c6e0b8fb Add doom-get-package-alist
New function returns a list of (NAME . DESC) cons cells in the order
they were declared (in module packages.el files).

Fixes a load-order issue where autoloads from one package would depend
on the autoloads of another package, but was inserted into
doom-package-autoload-file *before* the depended package, causing
void-variable errors.

Also allows for a big refactor of the :plugins byte-compile target.
2018-06-14 03:36:46 +02:00
b6f9bc9675 Fix package manager not :ignore'ing packages 2018-06-13 22:15:08 +02:00
1c3183b298 Remove space in backend labels during install
Minor reformatting. To be consistent with the backend transition labels
in doom//packages-autoremove.
2018-06-12 00:02:04 +02:00
72201fead5 Major refactor of package management API
Fixes issues where:

+ package!'s :disable property was ignored and def-package! wouldn't
  ignore disabled packages.
+ Certain quelpa packages were being removed/reinstalled infinitely
+ Improved flexibility of doom-get-packages (its docstring needs to be
  updated!)
2018-06-12 00:02:04 +02:00
0741c8851a Split core-packages into two (packages & modules)
+ Move doom-initialize et co into core.el
+ Lazy load core-packages
+ load! has been moved into core-lib
+ Added FILE! and DIR! macros
+ Fix package! not returning correct value when package is disabled
+ Remove :disabled support for def-package-hook! officially
2018-06-12 00:02:04 +02:00
2d5ac8a164 Fix void-variable package--builtins error
Occurs while running make install because package.el wasn't loaded in
time.
2018-06-10 19:15:39 +02:00
85704bea33 Fix void-variable ex2 error while package managing 2018-06-10 19:10:58 +02:00
ee154911ae Redesign doom-get-package
Now more useful for filtering packages by certain properties.
2018-06-10 17:28:17 +02:00
99d6927e56 Improve error-handling for quelpa packages 2018-06-08 13:08:38 +02:00
ee262e7737 Refactor error handling in package management API
I am hoping this will improve the ambiguous errors that originate from
package.el or quelpa.el.
2018-06-08 13:08:34 +02:00
1a1d74afa3 Refactor package management API
To make backtraces a little less cluttered, in case of the notorious
arrayp error, which I am yet unable to reproduce or understand.
2018-06-02 21:31:14 +02:00
1a452b6842 💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
7f31f4a1bd Adjust package state initialization strategies 2018-05-25 02:53:48 +02:00
0368e8f84b Ensure package state is initialized before package management 2018-05-25 02:41:23 +02:00
d9894f0b74 Fix package install not retrying after a 'bad request' error 2018-05-25 02:16:19 +02:00
87e9365a41 Fix package autoremove/install/update batch commands 2018-05-24 21:20:02 +02:00
b25e215d59 Increase last-pkg-refresh ttl from 900 -> 1200s 2018-05-24 16:41:14 +02:00
fbf8a7be56 Remove vestigial references to doom//reload-load-path 2018-05-21 01:38:17 +02:00
f2c02e32c8 General minor refactor & comment updates 2018-05-21 01:38:17 +02:00
b7b1445712 Update doom-get-outdated-packages to match new init process 2018-05-20 12:07:31 +02:00
c826f0f6a8 Shrink dependency chains in core libraries 2018-05-20 12:06:50 +02:00
0634289a01 Autoload doom-*-package functions 2018-05-20 12:05:17 +02:00
61ca98fd3f Refactor package managent batch commands
+ Replace message! with print!
+ doom//packages-* commands now only return t if package list changed
2018-05-20 12:03:50 +02:00
ee386f8461 Fix wrong-number-of-args error when installing packages
The fourth argument of map-put is an Emacs 26+ only feature.
2018-05-18 18:47:19 +02:00
50401f6c09 Minor refactor of package management api 2018-05-18 01:11:20 +02:00
82f9fb7027 Optimize package management commands
Effectively halving run time on package install, update and autoremove
commands.
2018-05-18 01:08:28 +02:00
e7a1e0b4a2 Improve interactive package management support 2018-05-16 00:11:14 +02:00
225dfde40f Initialize all package metadata on doom-get-missing-packages 2018-04-05 02:29:14 -04:00
1aa50b8364 Error if doom-package-outdated-p cannot discern package's version 2018-04-05 02:28:42 -04:00
f334a92fdc Fix package management delete-reinstall loop with quelpa packages 2018-03-28 01:04:34 -04:00
b5db4f1fb6 Debug log missing modules; remove log! macro 2018-03-24 07:25:00 -04:00
c54fb7b8c0 Fix package advice interfering with doom-initialize
...by aggressively reloading the config from within doom-initialize (too
early, some state hasn't been initialized at this point).
2018-03-14 20:12:15 -04:00
8898c5cb9a Fix void-function doom*initialize-packages error
Occurs before autoloads are generated.
2018-03-14 19:52:25 -04:00
cdbd677423 Allow use of package.el #444
This makes package.el commands safe to use in Doom, and prevents errors
caused by unitialized state, by running package-initialize before
you use a package.el command.
2018-03-14 18:25:25 -04:00
03e6900d3c doom//packages-update: output feedback earlier 2018-03-13 03:18:02 -04:00
0425724571 Major rewrite of doom module API
+ Fix #446, where the .local/packages.el cache was generated with
  a faulty load-path.
+ Entries in the doom-modules hash table are now plists, containing
  :flags and :path, at least.
+ Add doom-initialize-modules for loading module config.el files.
+ Add doom-module-get for accessing this plist, e.g.

    (doom-module-get :some module)         ; returns plist
    (doom-module-get :some module :flags)  ; return specific property

+ Replace doom-module-enable with doom-module-set, e.g.

    (doom-module-set :some module :flags '(+a +b +c))

+ Remove doom-module-flags (use doom-module-get instead)
+ Rename doom-module-enabled-p with doom-module-p
+ Replace doom-module-path with doom-module-find-path and
  doom-module-expand-file. The former will search for an existing module
  or file in doom-modules-dirs. The latter will expand the path from
  whatever path is stored in doom-modules.
+ Replace doom-module-paths with doom-module-load-path
+ Changed doom! to allow for nested doom! calls by delaying the loading
  of module config.el files until as late as possible.
+ Refactor doom-initialize-packages to only ihitialize package state
  (i.e. doom-packages, package-alist, and quelpa-cache), rather than its
  previous behavior of loading all Doom files (and sometimes all module
  files). This is faster and more predictable.
2018-03-02 19:14:45 -05:00
55c6244e9f doom-install-package: clean up after failed quelpa install 2018-02-22 04:48:36 -05:00
446a66603f Fix quelpa packages looking up elpa version
This is a regression introduced in b1bf67f6.

Package management would incorrectly compare quelpa package versions
with elpa package versions. This would cause "outdated" packages to get
deleted.
2018-02-22 04:19:25 -05:00
7bfd0a3304 And changed-quelpa-recipe detection
These packages are now reinstalled on make install.
2018-02-20 17:55:55 -05:00
b1bf67f630 Refactor package init process
quelpa is now initialized by doom-initialize-packages.
2018-02-20 17:54:10 -05:00
cb3e780a96 Fix package manager not detecting outdated quelpa packages 2018-02-13 05:23:40 -05:00
57b2b5c546 Fix doom//packages-update not updating dependencies 2018-02-11 16:13:15 -05:00