Commit Graph

165 Commits

Author SHA1 Message Date
377dbae3fc Install/compile packages in order of declaration
This should fix an issue where a package A, which uses macros from a
package B, is installed before package B, causing void-function errors.

The currently known and affected packages are neotree, parinfer, and
evil-collection.
2018-09-25 11:00:30 -04:00
4d10c28c37 Change doom-ansi-apply, print! & format!
Color let-functions no longer take format string arguments. e.g.

  (format! (red "Hello %s" "world"))

Becomes

  (format! (red "Hello %s") "world")

The same goes for print!. Also, doom-ansi-apply now takes two arguments
instead of three.

Also merges doom-message-{fg,bg,fx} into doom-ansi-alist, and reduces
backtrace noise when errors originate from inside these macros.
2018-09-09 09:58:20 -04:00
f7ad520ee0 doom update: prevent GC in async instances
Offers a marginal improved to outdated check times.
2018-09-09 09:58:20 -04:00
309fd767d6 Add :deps property to doom-get-packages
Also fixes an issue where doom install wouldn't catch missing
dependnecies of desired packages.

If :dep is non-nil, doom-get-packages will include package dependencies
in the resulting package list.
2018-09-09 09:58:20 -04:00
77d2d84e14 Refactor core-cli
Moved to separate files for better organization.
2018-09-09 09:58:20 -04:00
7d3ffdff06 Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
2ee177d588 Don't invoke debugger on "Aborted" messages 2018-08-02 16:41:19 +02:00
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