Commit Graph

338 Commits

Author SHA1 Message Date
Henrik Lissner
dbeaa8e238
Remove emacs-version check in autoloads file
Now that the autoload file's path is namespaced by version, this check
is no longer necessary.
2020-10-29 02:36:59 -04:00
Henrik Lissner
a6959b75f3
Minor refactors & reformatting 2020-10-22 16:11:31 -04:00
Henrik Lissner
9b4fd806bb
Simplify doom/info output 2020-10-20 23:21:11 -04:00
George Xanthakis
4d24d7548a
Print diff url in terminal in case emacs is in a remote server (#4105)
* Print diff url in terminal in case emacs is in a remote server

Closes #2936

* Correct print! call

Co-authored-by: Henrik Lissner <henrik@lissner.net>
2020-10-18 19:17:39 -04:00
Henrik Lissner
6778c1239c
Include package name in 'checked out...' message 2020-10-18 19:08:07 -04:00
Henrik Lissner
033cb48006
Fix void-variable comp-eln-load-path 2020-10-11 15:53:37 -04:00
Henrik Lissner
9d4951d8b8
Merge pull request #4047 from flatwhatson/deferred-aot
Improvements to native-comp support
2020-10-11 15:43:37 -04:00
Andrew Whatson
2e07a85590 Native-compile everything on load-path
Add an extra pass to `doom build` to queue native compilation of all
packages on `load-path`. This ensures that all core and site Elisp
packages are actually native-compiled, even on "fast boot" builds.

Add `.local/autolads.el` to the blacklist as native-compiling this file
succeeds, but prevents emacs from starting up.

Revise the evil-collection-vterm blacklist entry to use a more efficient
regex.

Fix a bug where an updated .error file wasn't always written, causing
spurious rebuilds.
2020-10-09 09:34:34 +10:00
Andrew Whatson
30140021de Export comp-deferred-compilation-black-list via autoloads
The latest straight.el adds `:no-native-compile` packages to the
compilation blacklist. We export the build-time blacklist via autoloads
so that it works as expected to prevent native compilation at runtime.
2020-10-09 09:34:23 +10:00
Henrik Lissner
86cd497bb5
Don't print ignored/whitelisted envvars on doom env
Except in debug mode.
2020-10-08 17:07:36 -04:00
Henrik Lissner
1255ebdbd7
Add XDG detection to 'doom install' #4040
Create ~/.config/doom instead of ~/.doom.d if your emacs config lives in
~/.config/emacs.
2020-10-06 14:19:37 -04:00
Henrik Lissner
c84127069f
Fix #4036: improve 'doom sync -u' output 2020-10-06 14:19:36 -04:00
Henrik Lissner
e4864adfbe
Update 'doom help upgrade' doctring 2020-10-05 17:21:17 -04:00
Henrik Lissner
0769b47cc8
Fix 'doom purge' not purging straight builds 2020-09-19 14:43:53 -04:00
Henrik Lissner
ce9162647d
cli/env: blacklist SHLVL & comment default blacklist 2020-09-10 18:03:32 -04:00
yuhan0
15779e7a16 Filter directories when rebuilding straight repos
Prevents auto-generated files like .DS_Store on macOS from causing an
error.
2020-08-27 23:22:24 +08:00
Henrik Lissner
c7588bacdf
cli/upgrade: don't reload if Doom's up-to-date 2020-08-26 15:11:47 -04:00
Henrik Lissner
63a03848a3
Fix literate tangling on 'doom sync'
Relevant to #3746
2020-08-25 06:01:35 -04:00
Henrik Lissner
6e22a15e43
Fix 'doom help'
doom-cli-internal-p was accidentally removed in e632871a1, and the
psuedo CLI command :main was renamed to :doom.
2020-08-24 23:36:11 -04:00
Henrik Lissner
0dfee56e35
Fix string type error on 'doom upgrade' 2020-08-24 23:22:57 -04:00
Henrik Lissner
e632871a11
core-cli: backport more refactors from rewrite
Still a long way to go, but this introduces a few niceties for
debugging CLI failures:

+ The (extended) output of the last bin/doom command is now logged to
  ~/.emacs.d/.local/doom.log
+ If an error occurs, short backtraces are displayed whether or not you
  have debug mode on. The full backtrace is written to
  ~/.emacs.d/.local/doom.error.log.
+ bin/doom now aborts with a warning if:
  - The script itself or its parent directory is a symlink. It's fine if
    ~/.emacs.d is symlinked though.
  - Running bin/doom as root when your DOOMDIR isn't in /root/.
  - If you're sporting Emacs 26.1 (now handled in the elisp side rather
    than the /bin/sh shebang preamble).
+ If a 'doom sync' was aborted prematurely, you'll be warned that Doom
  was left in an inconsistent state and that you must run `doom sync`
  again.

May address #3746
2020-08-24 23:00:32 -04:00
Henrik Lissner
295f8066be
Update gccemacs support
To add support for "update 11", see:
http://akrl.sdf.org/gccemacs.html#org4b11ea1

Also:
+ Move eln files to ~/.emacs.d/.local/cache/eln
+ Disable comp-deferred-compilation by default (now that it is
  enabled-by-default upstream).
2020-08-17 21:24:14 -04:00
Henrik Lissner
8bb47f96d8
cli/doctor: fix native json detection 2020-08-12 16:01:33 -04:00
Henrik Lissner
11be796c9b
cli/doctor: warn if native JSON library is missing 2020-08-12 15:17:15 -04:00
Henrik Lissner
29489aad34
Remove 'doom update'
This command is commonly mistaken for 'doom upgrade'. No longer!
2020-08-06 22:24:41 -04:00
Henrik Lissner
7dab38deea
Add -A/-R switches to 'doom env'
Two new convenience switches for generating envvar files:

  doom env -A x
  doom env -R x

Is equivalent to

  doom env -a x -r .
  doom env -r x -a .
2020-08-01 15:23:10 -04:00
Henrik Lissner
57c0863854
Fix aggressive native recompilation of packages
On `doom sync`
2020-07-28 01:48:09 -04:00
Henrik Lissner
b9b987e1ab
Optimize straight build step
Constant `(require 'comp nil t)` checks are quite slow on systems where the library isn't available, so only do it once.
2020-07-28 01:34:33 -04:00
Andrew Whatson
d8af5c3cad Support native compilation of packages 2020-07-28 15:25:34 +10:00
Henrik Lissner
9ec5428441
Set core.autocrlf = true in repos on Windows #2637
Line encoding issues can plague repos with dirty worktree prompts
updating packages or "Local variables entry is missing the suffix"
errors when installing them.
2020-07-24 01:49:59 -04:00
Henrik Lissner
da1030985d
Minor refactors & reformatting 2020-07-23 01:26:03 -04:00
Henrik Lissner
f7431aa7c9
Fix units of "projectile cache is too large" warning
Labeled MB, but is actually displaying KB.
2020-06-10 21:54:09 -04:00
Henrik Lissner
2a824136ef
Fix #3277: 'doom install' options are ignored 2020-06-02 18:16:32 -04:00
Henrik Lissner
aec94f5bb2
Fix #3228: 'Failed to fetch from upstream' on doom upgrade
Due to git name-rev returning fully qualified refs in some cases.
2020-05-29 19:36:13 -04:00
Henrik Lissner
ca0dbc798d
Use shorter seq.el alternatives 2020-05-26 04:18:20 -04:00
Henrik Lissner
22c7eac897
Add doom-autoloads-files option
So users can scan additional files for autoloads during 'doom sync'.
2020-05-26 04:16:42 -04:00
Henrik Lissner
f4e6d36574
Move 'restart Emacs to see changes' message to 'doom sync'
It isn't the autoloads generator's responsibility to do this. The
"changes" referred to consist of more than just the regenerated
autoloads file.
2020-05-26 04:09:11 -04:00
Henrik Lissner
10a4e6570d
Fix 'doom env' refusing arguments/options 2020-05-26 03:21:27 -04:00
Henrik Lissner
b6cc110f4c
Fix 'wrong-type-arg' error on 'doom upgrade' 2020-05-26 03:12:35 -04:00
Henrik Lissner
894966b1e2
Fix #3221: incorrect usage of doom-cli-execute
The function is variadic in as-of-yet published versions of Doom's CLI;
this usage snuck into a commit.
2020-05-26 02:55:24 -04:00
Henrik Lissner
a814239ec7
Implement daisy-chaining for CLI sessions
elisp lacks an execv implementation (or mature subprocess library), so
we exploit some splenderiffic hackery to get Emacs to execute arbitrary
shell commands after a 'doom ...' command completes. This allows us to
daisy chain doom commands in distinct sessions (wonderful for reloading
doom after a 'doom upgrade', which we do). This minimizes errors when a
'doom upgrade' pulls in breaking changes to Doom's CLI.

We also bring 'doom run' into elisp, since this new functionality
enables us to.
2020-05-26 02:30:54 -04:00
Henrik Lissner
e89b604f5f
Fix 'doom upgrade' when doom is a git submodule 2020-05-26 02:13:02 -04:00
Henrik Lissner
15a58d5b81
Prevent 'doom sync' rebuilding all packages, each time 2020-05-25 18:17:38 -04:00
Henrik Lissner
9f024e549f
Instruct user to rerun 'doom upgrade'
If it fails during reloading of Doom's core.

Relevant to #3131
2020-05-25 16:27:51 -04:00
Henrik Lissner
0bc3f8ea87
doom/purge: refactor & optimize
Reduce how much work it had to do.
2020-05-25 15:55:29 -04:00
Henrik Lissner
e60d8f9cb1
doom/install: refactor template insertion & module init 2020-05-25 15:55:29 -04:00
Henrik Lissner
e6c88e4384
Refactor autoloads generator & reduce to one generated file
We no longer need two separate autoloads files, so I merged them and
optimized its generation logic.

Other changes
- Doom will refuse to start up (with a helpful error) if it's in an
  incomplete state. This should hopefully reduce the number of bug
  reports from folks that have done something weird, e.g.
  1. You've changed Emacs versions without running 'doom sync -b'.
  2. You've updated Doom outside of `doom upgrade` and didn't run `doom
     sync -u`.
  3. You've forgotten to run 'doom sync' in the first place!
  4. If a previous 'doom ...' command was aborted midway without running
     'doom sync' afterwards.
- 'doom sync' will emit reminders that you need to reload/restart Emacs
- Autoloads API now uses the `doom-autoloads-` prefix, intead of
  'doom-cli-autoloads-', as will be the new convention in the coming
  rewrite.
- Errors from within the package autoloads should be easier to invoke
  the debugger on.
- `doom-modules` is now stored in your autoloads file. Your module list
  will soon be frozen between calls to 'doom sync' to allow for our new,
  atomic CLI I'm working on. This will also means the `doom!` block
  won't cost anything in interactive sessions.
2020-05-25 15:55:29 -04:00
Henrik Lissner
be889d09e8
Rename doom-format lib -> doom-output
`format` isn't an appropriate for this library, considering it (and
future additions to it) will be mainly concerned with printing or
capturing output.
2020-05-25 15:55:29 -04:00
Henrik Lissner
3a38fc633c
Change doom-{interactive,debug}-mode suffix to -p
Because these are not really modes.

Also makes `doom-debug-mode` an actual (global) minor mode.
2020-05-25 03:43:40 -04:00
Henrik Lissner
69a25a8468
Make doctor treat missing ripgrep as an error
It's a hard dependency for Doom.
2020-05-19 21:49:01 -04:00