Commit Graph

33 Commits

Author SHA1 Message Date
57efa1b864 Update & fix unit tests 2018-03-02 20:46:45 -05: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
cf4420e903 Fix doom//run-tests 2018-02-17 22:18:04 -05:00
2b1c323dbf 💥 Redesign private sub-module system
~/.doom.d/modules is now a full module tree, like ~/.emacs.d/modules.
Symlinks are no longer involved.

Private modules can now shadow Doom modules. e.g.
~/.doom.d/modules/lang/org will take precendence over
~/.emacs.d/modules/lang/org.

Also, made doom--*-load-path variables public (e.g. doom--site-load-path
=> doom-site-load-path), and rearranged the load-path for a 10-15%
startup boost.
2018-02-16 02:11:10 -05:00
dfefbd0176 Fix make test not resetting doom-modules properly 2018-02-14 21:18:56 -05:00
4262b9912c Revert "Move init.test.el into core/autoload/test.el"
This reverts commit 3bfb7fa17d.
2018-02-03 22:46:18 -05:00
3bfb7fa17d Move init.test.el into core/autoload/test.el 2018-02-03 03:30:49 -05:00
e0f6fde7c1 Update doom//run-tests for new doom! 2018-01-29 18:41:55 -05:00
4d51a1ab09 Fix :skip property in def-test! 2018-01-04 16:14:50 -05:00
b7d21fb256 Add let-advice!! test macro 2018-01-04 16:14:50 -05:00
c9a878a62f Conform unit test macros to naming scheme 2018-01-01 16:59:30 -05:00
8ad2666f8f Refactor and fix unit tests, plus isolate them better 2017-12-31 14:58:45 -05:00
02c1a78330 Add :skip support for def-test! 2017-12-29 04:17:19 -05:00
fe3db542ed Fix ERT not running properly on make test 2017-12-10 15:37:32 -05:00
013f8e08d5 Fix make test-* tasks for running specific tests 2017-12-09 14:37:43 -05:00
5ea37bc1ef Clean up legacy comments 2017-11-08 22:52:55 +01:00
211977e28a doom--module-pairs => doom-module-pairs 2017-11-08 22:51:55 +01:00
c45e2c4918 General & minor refactor+cleanup 2017-11-05 19:54:44 +01:00
95a5b46dc5 New // naming convention + refactor doom management functions 2017-11-05 19:54:43 +01:00
8800108eed Add test helper macros to test.el lib 2017-10-05 01:27:46 +02:00
5e393b3233 Ensure module state is initialized on make test 2017-08-09 15:30:42 +02:00
6e8726a624 Simplify core loading process (part 2) 2017-08-08 16:31:48 +02:00
65748c5809 Simplify core loading process 2017-08-08 14:25:36 +02:00
a63640b120 Force interactive when running tests 2017-07-29 00:30:42 +02:00
f93fb61f33 Refactor core.el
+ Load Doom core in doom! macro
+ Move automatic minor modes to core-editor
+ Move doom*set-indirect-buffer-filename to core-editor
2017-07-13 00:05:30 +02:00
e87d278811 Remove (interactive) from non-interactive funcs 2017-07-12 14:59:00 +02:00
f246d89fb6 Fix make test:X/Y where Y is omitted
This way, make feature will run all unit tests in feature/* modules.
2017-06-28 15:28:51 +02:00
869bc03ca6 Load bare minimum for tests 2017-06-28 15:28:13 +02:00
cbfb3eeda4 Fix, rename & move doom/run-tests => doom-run-tests 2017-06-24 17:15:22 +02:00
9c93c453e8 Reorganize unit-tests and test workflow
+ Moved unit tests out of tests/ and into their respective modules.
+ Rewrite makefile and added these tasks:
  + <MODULE>/<SUBMODULE> -- byte-compile a specific module
  + test:<MODULE>/<SUBMODULE> -- runs tests for a specific module
  + testi -- run tests in an interactive session of Emacs (WIP)
  + run -- opens an Emacs session with this config; useful when it is in
    a non-standard location.
2017-06-14 21:15:19 +02:00
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
c370e1cddd Add :disabled property to def-test-group! 2017-04-12 10:52:42 -04:00
acb7536e64 Add core-lib & core-lib-{buffers,package} unit tests + tasks 2017-04-04 22:18:52 -04:00