Commit Graph

169 Commits

Author SHA1 Message Date
Henrik Lissner
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
Henrik Lissner
8898c5cb9a Fix void-function doom*initialize-packages error
Occurs before autoloads are generated.
2018-03-14 19:52:25 -04:00
Henrik Lissner
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
Henrik Lissner
03e6900d3c doom//packages-update: output feedback earlier 2018-03-13 03:18:02 -04:00
Henrik Lissner
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
Henrik Lissner
55c6244e9f doom-install-package: clean up after failed quelpa install 2018-02-22 04:48:36 -05:00
Henrik Lissner
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
Henrik Lissner
7bfd0a3304 And changed-quelpa-recipe detection
These packages are now reinstalled on make install.
2018-02-20 17:55:55 -05:00
Henrik Lissner
b1bf67f630 Refactor package init process
quelpa is now initialized by doom-initialize-packages.
2018-02-20 17:54:10 -05:00
Henrik Lissner
cb3e780a96 Fix package manager not detecting outdated quelpa packages 2018-02-13 05:23:40 -05:00
Henrik Lissner
57b2b5c546 Fix doom//packages-update not updating dependencies 2018-02-11 16:13:15 -05:00
Henrik Lissner
7e87ab3e29 New warn! macro; replace debug! with log! macro 2018-02-04 17:53:31 -05:00
Henrik Lissner
2734810060 Show error when looking up dependency trees for built-in packages
There's no obvious way to do this, and I don't think it's important
enough to accommodate it.
2018-01-07 00:15:58 -05:00
Henrik Lissner
392f04446f General refactor (use map.el more)
+ map-delete is shorter and faster than assq-delete-all
+ map-put is simpler than the delete-then-set workflow
+ map-merge is great for merging default and user settings
2018-01-07 00:15:58 -05:00
Henrik Lissner
31a4244686 Rethink what Doom loads at startup and manually
Better to simply load what we need, when we need it, rather than set up
autoloads for every litte thing.
2018-01-07 00:15:57 -05:00
Henrik Lissner
0042a56d02 Add new cache library (persistent-soft wrapper) 2018-01-07 00:15:57 -05:00
Henrik Lissner
5d186d10b4 doom-install-package: don't try to uninstall built-in packages 2018-01-04 16:16:45 -05:00
Henrik Lissner
f3bad40fdf Packages api: simpler error handling 2018-01-04 16:16:45 -05:00
Henrik Lissner
a29bc54c63 Install packages in the order they are declared 2018-01-04 16:16:45 -05:00
Henrik Lissner
7ab8958971 Refactor package management api + remove doom-initialize 2017-12-22 16:26:08 -05:00
Henrik Lissner
98e324b785 Fix 'not installed' errors for built-in packages #288
Caused by doom-package-backend not taking into account that a package
could be built-in. Derp!
2017-12-22 04:02:58 -05:00
Henrik Lissner
34c74d2d5c doom//packages-install: fix skipped cleanup code 2017-12-20 20:10:14 -05:00
Henrik Lissner
4e83cd516c Add unicode symbols to package management output 2017-12-20 20:07:46 -05:00
Henrik Lissner
76a4ae459d Fix obsolete (when|if)-let messages in Emacs 26 2017-12-10 14:49:52 -05:00
Henrik Lissner
6def061c5a Minor refactor/comment corrections 2017-11-13 18:03:36 +01:00
Henrik Lissner
958c7da288 Fix ALREADY INSTALLED for packages with new backends #222 2017-11-13 18:02:57 +01:00
Henrik Lissner
80d8949f91 doom-update-package: error if package's backend has changed 2017-11-13 18:01:38 +01:00
Henrik Lissner
cc3f2c76d9 doom-install-package: let -> let* 2017-11-13 18:00:46 +01:00
Henrik Lissner
eb01401513 Remove references to old package api 2017-11-13 17:58:16 +01:00
Henrik Lissner
903ac3f0ef Run doom//reload-autoloads in separate session
Includes a minor refactor core/core-packages.el
2017-11-08 22:51:55 +01:00
Henrik Lissner
0c2b1b5a93 Fix packages with changed backend #222
Doom can't tell what backend a package was installed with, only whether it
is installed or not. This means if a package was installed with, say,
ELPA, then was changed to QUELPA, Doom wouldn't know.

Package management would fail. ELPA/QUELPA can't manage a package that
it didn't install.

This fix gives Doom that capability.
2017-11-05 19:54:43 +01:00
Henrik Lissner
95a5b46dc5 New // naming convention + refactor doom management functions 2017-11-05 19:54:43 +01:00
Henrik Lissner
43a9acec28 Simplify doom-get-outdated-packages (1 thread per quelpa pkg) 2017-11-05 19:54:43 +01:00
Henrik Lissner
42fec8494d Rename doom/reload => doom/reload-load-path 2017-09-19 15:07:57 +02:00
Henrik Lissner
81c54684de Fix incorrect user-emacs-directory when updating packages #190 2017-09-05 12:40:54 +02:00
Henrik Lissner
85c28444b3 General cleanup & refactor 2017-08-06 16:30:53 +02:00
Henrik Lissner
59544391f2 Refactor doom-get-packages
Adds an INSTALLED-ONLY-P argument to doom-get-packages.

Fixes a missing-package error when doom-get-outdated-packages iterates
over packages that aren't installed.

Plus, updated unit tests.
2017-07-14 15:16:32 +02:00
Henrik Lissner
ed1a79040e Revert async package refresh
Unnecessary complexity for negligible gain.
2017-07-04 12:26:34 +02:00
Henrik Lissner
a002f7025c Rewrite docstrings for package functions/macros 2017-07-02 16:47:27 +02:00
Henrik Lissner
76b020eddb package management: change output on retry/errors 2017-06-28 15:33:19 +02:00
Henrik Lissner
822c78554f destructuring-bind => cl-destructuring-bind 2017-06-25 02:04:50 +02:00
Henrik Lissner
83f4f2e725 Remove s.el dependency in doom/packages-update 2017-06-24 02:25:15 +02:00
Henrik Lissner
e2c161cbf8 Clean up doom-get-outdated-packages 2017-06-24 02:25:15 +02:00
Henrik Lissner
ee1fb43b93 Make doom-get-outdated-packages asynchronous 2017-06-21 16:09:58 +02:00
Henrik Lissner
cacd188286 Replace doom-package-*-p with doom-package-prop 2017-06-14 21:15:19 +02:00
Henrik Lissner
732dee608a Stability/error-handling refactor (part 1)
This refactor is about improving how Emacs deals with errors.

A large net is now cast at startup to catch possible errors, produce
more helpful error messages, and localize the damage. Significantly
reducing the risk of later modules not loading (and leaving you
stranded in a half-broken Emacs session).

The DOOM core files are an exception. If something messes up in there,
it *should* choke.

+ use-package will now report missing packages or slow-loading/broken
  def-package! configurations.
+ Persp-mode no longer (inadvertantly) hides buffers that pop up at
  startup, like the *Warnings*, *Backtrace* or debugger buffers.
+ `make autoloads` (or doom/reload-autoloads) now produces a slightly
  more informative error message if an error occurs while building the
  autoloads file.
+ Error handling for package management is *slightly* better now; error
  messages now include the type of error; this needs work.
2017-06-14 21:15:19 +02:00
Henrik Lissner
7c20a43be6 Clean up quelpa build repos on package deletion 2017-06-10 23:32:59 +02:00
Henrik Lissner
c7254e7bdc Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
Henrik Lissner
a2f14183a1 Fix double package-refresh on first install 2017-06-06 12:01:10 +02:00
Henrik Lissner
27bfa14def General refactor + cleanup 2017-06-05 14:23:17 +02:00