Commit Graph

129 Commits

Author SHA1 Message Date
Henrik Lissner
d298a8e71c
Update envvar file comment header
Envvar files are now refreshed on `doom refresh`, if it exists. A while
back I removed the `doom env reload` step.
2019-08-15 17:29:08 -04:00
Henrik Lissner
5aa7415d87
Add -t/--timeout switch to 'doom update'
To get around timeout issues on slower connections or larger packages.
2019-08-15 01:34:28 -04:00
Henrik Lissner
b29a7ba8fe
Fix 'doom compile'
Fixes `void-function define-key!` error.
2019-08-15 01:33:40 -04:00
Henrik Lissner
2cd9685758
Discard timed out future correctly on 'doom update'
And list packages immediately after message (no newlines).
2019-08-09 22:23:38 -04:00
Henrik Lissner
624c5e1a71
Complain about unknown targets in 'doom compile' #1657 2019-08-09 22:23:37 -04:00
Henrik Lissner
0a44881df1
Increase number of sub-processes for 'doom update' 2019-08-08 23:00:54 -04:00
Henrik Lissner
c266680c11
Fix #1653: uncaught error when async process times out 2019-08-08 22:59:57 -04:00
Henrik Lissner
115a436273
Fix 'doom update' for chemacs users
Or users who have Doom in a non-standard location (i.e. outside
~/.emacs.d).
2019-08-08 11:48:13 -04:00
Henrik Lissner
ef60762a92
Fix wrong-type-arg: listp error on 'doom update'
Caused when async fails to create a child process for a certain group of
packages (needs to be investigated more).
2019-08-07 21:07:43 -04:00
Henrik Lissner
f42bfde8ae
Fix #1648: doom upgrade not updating packages
...when Doom itself is up-to-date.
2019-08-07 20:55:56 -04:00
Henrik Lissner
4a92d12267
Fix void-variable package error on 'doom update' 2019-08-07 17:22:46 -04:00
Henrik Lissner
b808c4e1ab
Reload autoloads files in noninteractive sessions
After it's been regenerated, so that any hacks (*cough*org/magit*cough*)
are in scope.
2019-08-07 16:55:04 -04:00
Henrik Lissner
c8d6ab823b
Update documentation for 'doom env' 2019-08-07 01:42:46 -04:00
Henrik Lissner
54edffc4bb
cli/packages: emit a little more debug info
To mark the start of purging/regrafting procedures.
2019-07-29 21:29:43 +02:00
Henrik Lissner
435436e390
Fix 'doom purge' failing to delete build directory 2019-07-29 21:18:49 +02:00
Henrik Lissner
7559949e09
Rewrite 'doom purge'; add repo regrafting
'doom purge -r' now re-grafts shallow cloned packages (compacting them
as much as possible).
2019-07-29 21:09:23 +02:00
Henrik Lissner
87fd81281f
Rewrite 'doom update'
- Is now much more fault tolerant (produces better errors)
- Now handles async.el process errors as well
- Standardizes data structure of thread responses
2019-07-29 21:01:46 +02:00
Henrik Lissner
da954aa361
Improve 'doom build' reporting & checks
- Fix 'doom build' not byte-compiling stale dependencies of rebuilt
  packages.
- Fix 'doom build' logging the wrong number of packages that were
  rebuilt.
2019-07-29 20:59:52 +02:00
Henrik Lissner
c32244ad4e
Generalize doom-sh
And slightly reformat 'doom upgrade' "you have updates" message.
2019-07-29 20:57:20 +02:00
Henrik Lissner
2b81233353
Clean up _upgrade rmeote after 'doom upgrade' 2019-07-29 03:47:56 +02:00
Henrik Lissner
ba07fe575e
Add {--no-{elpa,builds},-r,--repos} flags to 'doom purge' 2019-07-29 03:47:12 +02:00
Henrik Lissner
8a16513107
Fix various errors in 'doom upgrade' 2019-07-29 03:34:35 +02:00
Henrik Lissner
2304d69898
Fix wrong-type-arg number during 'doom upgrade' 2019-07-29 03:21:55 +02:00
Henrik Lissner
c28fff4fbf
Fix void-variable branch error on 'doom upgrade' 2019-07-29 03:18:39 +02:00
Henrik Lissner
c2af0723d7
Show progress percentage during 'doom update' 2019-07-28 16:10:54 +02:00
Henrik Lissner
efb4584797
Alias 'doom build' to 'doom rebuild' 2019-07-28 14:02:51 +02:00
Henrik Lissner
a9c1986a68
Fix and refactor 'doom upgrade' #1607
Now accepts the -f/--force switches to discard local changes to
the .emacs.d directory.
2019-07-28 13:47:57 +02:00
Henrik Lissner
4dc42de9e3
def-command! -> defcli!
And def-command-group! -> defcligroup!, to match our new convention for
naming definer macros.
2019-07-28 02:32:25 +02:00
Henrik Lissner
8dab8eefca
Prevent load-file-name/#$ replacements in strings & comments 2019-07-27 22:57:32 +02:00
Henrik Lissner
8d388ebba9
Improve 'doom rebuild' checks & formatting of logs
Corrects stale bytecode a little more aggressively.
2019-07-27 17:22:47 +02:00
Henrik Lissner
21a27b52d8
Refactor autoloads generation
- Correctly replace references to load-file-name and $# in autoloads.
- Don't load resulting autoloads file twice
- Read package autoloads literally (a little faster)
2019-07-27 16:59:10 +02:00
Henrik Lissner
0dfdbd471c
Ensure envvars at top of envvar file are checked
The regexp expects there to be at least one newline at the top of the
file, otherwise the very first envvar is skipped.
2019-07-27 02:46:50 +02:00
Henrik Lissner
597ef77c20
Ignore envvars prefixed with __
They are likely private. There are some public variables with single
underscore prefixes, however, like _FASD_DATA and _FASD_VIMINFO.
2019-07-27 02:46:49 +02:00
Henrik Lissner
6fcaa80355
Improve autoloads mtime scanning on packages
Scan source files in build directory rather than repos, which are better
indicators of a stale autoloads file.
2019-07-26 20:17:30 +02:00
Henrik Lissner
a10693886e
Fix double-rebuilding & lingering stale elc files
This update addresses two evasive issues:

1. Packages updated with `doom update` would not rebuild correctly,
   requiring a `doom refresh` afterwards,
2. Packages would fail to rebuild even if their byte-compiled files were
   stale. The result: "*.el is newer than *.elc" warnings at startup.
2019-07-26 20:17:29 +02:00
Henrik Lissner
f8c4d075a5
Fix doom purge reporting failure despite success 2019-07-26 20:17:29 +02:00
Henrik Lissner
c2ae6f30a5
Don't compress auto-mode-alist
Modules may readd their entries afterwards, anyway.
2019-07-26 15:33:32 +02:00
Henrik Lissner
8834ba17e3
Only return non-nil if doom-packages-purge worked 2019-07-26 13:59:14 +02:00
Henrik Lissner
9311744f7f
Restore comment header in envvar files
`shell-command` erases the target buffer before piping output to it.
Which means the envvar file comment header was wiped out. This causes
trouble for the envvar file parser, which expects the envvar list to
start with two newlines.
2019-07-26 13:38:13 +02:00
Henrik Lissner
321b797046
cli/packages: fix infinite waiting on pkg update
Caused lecause straight is prompting for input in a headless
session *and* from a headless async child instance of Emacs. It waits
forever for input for a question we could never see or respond to.

How sad.
2019-07-26 11:54:37 +02:00
Henrik Lissner
44c694da47
Make bin/doom options consistent & improve errors/docs 2019-07-26 03:12:07 +02:00
Henrik Lissner
829ad8c8b7
cli/packages: refactor doom-packages-purge
Sets it up for a later update where purging repos will no longer be the
default behavior.
2019-07-26 03:12:06 +02:00
Henrik Lissner
905ba1d23c
Refactor autoloads byte-compilation
- Let-bind byte-compile-* vars instead of using file-local vars.
- Fix duplicate bullet point in "Copied backup..." message.
- Only display refresh message if cli command was successful.
2019-07-26 03:12:06 +02:00
Henrik Lissner
bdcb156b91
Manually finalize straight transactions
Straight expects to be used interactively, which don't do (yet). Its
transactional system depends on idle timers, which don't run in a
noninteractive session, so we have to nudge it ourselves.
2019-07-26 03:12:06 +02:00
Henrik Lissner
2aa7dbfb27
cli/packages: refactor doom-packages-update
- Now handles errors from threads gracefully, rather than failing
  silently.
- Exploits straights modification system to trigger rebuilds
  later (instead of force-rebuilding after each update).
2019-07-26 03:12:06 +02:00
Henrik Lissner
ba990a6c9d
Build package autoloads in install order #374
Before this update, the autoloads files were collected in
lexicographical order (by traversing straight's build directory). By
using straight--build-cache's keys (which are entered in the order they
were registered) we avoid issues like
2019-07-23 21:54:50 +02:00
Henrik Lissner
93f7520c79
Refactor Doom core init process (again)
- Eager-load all core autoloaded libraries if autoloads file isn't
  present.
- Renames functions to be more descriptive of their true purpose:
  - doom-initialize-autoloads -> doom-load-autoloads-file
  - doom-load-env-vars -> doom-load-envvars-file
- Use doom-module-p instead of featurep! for backend use (the latter is
  mainly syntax sugar for module use, and evaluates at compile/expansion
  time, which may cause hash-table-p errors early in the startup
  process).
- Reorder plist library to prevent load order race condition with the
  functions using the macros that haven't been defined yet.
2019-07-22 23:22:54 +02:00
Henrik Lissner
afebdb35da
Refactor autodef generator 2019-07-22 23:22:54 +02:00
Henrik Lissner
a301330603
Fix doom update #1584
It would no-op if you responded "y" to the 'update them?' prompt, and
proceed if you responded "n".

Doom must be in its rebellious phase.

Also relevant: #1585
2019-07-22 23:22:38 +02:00
Henrik Lissner
ffdb726ed8
Exclude gh.el from autoloads
See sigma/gh.el#95
2019-07-22 06:06:58 +02:00