Commit graph

516 commits

Author SHA1 Message Date
Henrik Lissner
d784509abf
Fix #4172: different build path per Emacs version
To prevent byte-code incompatibilities.

We'll need to make 'doom purge' smarter about purging builds for other
versions of Emacs.
2020-10-29 01:41:25 -04:00
Andrew Whatson
bb74d2716f Allow :no-native-compile in package recipes 2020-09-01 20:48:42 +10:00
Henrik Lissner
1884828d22
Add :shadow parameter to package!
For to make replacing built-in packages easier.
2020-08-24 22:27:40 -04:00
Henrik Lissner
f3740d4766
Fix private package declaration order issues
The user's private packages.el is read first, to ensure disabled
packages are recorded as soon as possible, however, this means private
packages are recorded early into `doom-packages`, and so are built
first (and thus, before org-mode, which is later registered by the
lang/org module).

This compilation order can cause lots of issues with org packages
loading the older, built-in version of org included with Emacs, instead
of the newer org-mode.

May address #3172
2020-08-18 17:23:28 -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
8fa5b9406c
Fix #3763: add let-alist to straight-built-in-pseudo-packages
It is included with Emacs 26 and onwards, and was recently removed from
emacs-mirror anyhow.
2020-08-16 21:14:50 -04:00
Henrik Lissner
8df090fb29
Reduce git history downloaded with straight.el
When installing straight.el itself.
2020-08-12 14:56:42 -04:00
Henrik Lissner
0c47a03491
Fix #3655: evil-collection-vterm hangs native comp
Co-authored-by: flatwhatson <flatwhatson@users.noreply.github.com>
2020-07-31 01:51:48 -04:00
Henrik Lissner
da1030985d
Minor refactors & reformatting 2020-07-23 01:26:03 -04:00
Henrik Lissner
6b4af6d544
Remove unused package API functions
We'll see no changes to this API until the CLI rewrite is done, so
remove these unused and unfinished function definitions.
2020-07-17 23:22:48 -04:00
Henrik Lissner
1878a08814
Bump :core
raxod502/straight.el@ffaad60 -> raxod502/straight.el@59c92dd
jwiegley/use-package@d2640fe -> jwiegley/use-package@2b8f8a3

Reverts 33cd837
Fixes #3406
2020-06-18 15:33:03 -04:00
Henrik Lissner
33cd8e7380
Fix #3406: max-lisp-eval-depth on startup
Due to version conflicts between the built-in seq library and the one
installed from upstream.

Revert once raxod502/straight.el#537 is resolved.
2020-06-18 14:56:30 -04:00
Henrik Lissner
8bf902d5f4
General refactors & reformatting across the board 2020-06-04 20:13:28 -04:00
Henrik Lissner
fe7df725f6
Have package manager manage straight.el
We used a clumsy hack in `doom--ensure-straight` to delete straight if
its pinned commit didn't match the current one, to force it to be
reinstalled. With this, Doom's package manager will delete/update
straight like any other package.
2020-05-25 15:58:28 -04:00
Henrik Lissner
944d7ec83f
Extract installation of core packages to function 2020-05-25 15:55:29 -04:00
Henrik Lissner
235b69bd20
Parameterize packages.el filename 2020-05-25 15:55:29 -04:00
Henrik Lissner
ccd1764acb
Remove 'doom sync' from shell.nix
Let user decide what they want to do upon starting the shell. We
accommodate the user that wants simple access to Emacs 26/27/HEAD.
2020-05-25 15:55:28 -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
e00bfc7612
Minor refactors & reformatting 2020-05-25 03:43:40 -04:00
Henrik Lissner
de78d0cc62
Fix #3138: infinite loop when reading package! files 2020-05-17 06:14:37 -04:00
Henrik Lissner
76b133fd98
Install core packages early 2020-05-15 05:37:08 -04:00
Henrik Lissner
0e851ace9b
Backport bits of CLI rewrite
The rewrite for Doom's CLI is taking a while, so I've backported a few
important changes in order to ease the transition and fix a couple bugs
sooner.

Fixes #2802, #2737, #2386

The big highlights are:

- Fix #2802: We now update recipe repos *before* updating/installing any
  new packages. No more "Could not find package X in recipe repositories".

- Fix #2737: An edge case where straight couldn't reach a pinned
  commit (particularly with agda).

- Doom is now smarter about what option it recommends when straight
  prompts you to make a choice.

- Introduces a new init path for Doom. The old way:
  - Launch in "minimal" CLI mode in non-interactive sessions
  - Launch a "full" interactive mode otherwise.
  The new way
  - Launch in "minimal" CLI mode *only* for bin/doom
  - Launch is a simple mode for non-interactive sessions that still need
    access to your interactive config (like async org export/babel).
  - Launch a "full" interactive mode otherwise.

  This should fix compatibility issues with plugins that use the
  async.el library or spawn child Emacs processes to fake
  parallelization (like org's async export and babel functionality).

- Your private init.el is now loaded more reliably when running any
  bin/doom command. This gives you an opportunity to configure its
  settings.

- Added doom-first-{input,buffer,file}-hook hooks, which we use to queue
  deferred activation of a number of packages. Users can remove these
  modes from these hooks; altogether preventing them from loading,
  rather than waiting for them to load to then disable them,
  e.g. (after! smartparens (smartparens-global-mode -1)) -> (remove-hook
  'doom-first-buffer #'smartparens-global-mode)

  Hooks added to doom-first-*-hook variables will be removed once they
  run.

  This should also indirectly fix #2386, by preventing interactive modes
  from running in non-interactive session.

- Added `doom/bump-*` commands to make bumping modules and packages
  easier, and `doom/bumpify-*` commands for converting package!
  statements into user/repo@sha1hash format for bump commits.

- straight.el is now commit-pinned, like all other packages. We also
  more reliably install straight.el by cloning it ourselves, rather than
  relying on its bootstrap.el.

  This should prevent infinite "straight has diverged from master"
  prompts whenever we change branches (though, you might have to put up
  with it one more after this update -- see #2937 for workaround).

All the other minor changes:

- Moved core/autoload/cli.el to core/autoload/process.el
- The package manager will log attempts to check out pinned commits
- If package state is incomplete while rebuilding packages, emit a
  simpler error message instead of an obscure one!
- Added -u switch to 'doom sync' to make it run 'doom update' afterwards
- Added -p switch to 'doom sync' to make it run 'doom purge' afterwards
- Replace doom-modules function with doom-modules-list
- The `with-plist!` macro was removed, since `cl-destructuring-bind`
  already serves that purpose well enough.
- core/autoload/packages.el was moved into core-packages.el
- bin/doom will no longer die if DOOMDIR or DOOMLOCALDIR don't have a
  trailing slash
- Introduces doom-debug-variables; a list of variables to toggle on
  doom/toggle-debug-mode.
- The sandbox has been updated to reflect the above changes, also:
  1. Child instances will no longer inherit the process environment of
     the host instance,
  2. It will no longer produce an auto-save-list directory in ~/.emacs.d
2020-05-15 01:33:52 -04:00
Henrik Lissner
aca1599a81
Only resolve package :local-repo if relative path exists
This allows you to specify a :local-repo relative to the directory your
packages.el is in. If it doesn't exist, it'll assume you meant a
directory in ~/.emacs.d/.local/straight/repos
2020-04-29 00:29:17 -04:00
Henrik Lissner
c963038308
Use straight master branch by default
raxod502/straight.el@d28fd41930 causes breakage; preventing users from
installing Doom. It's about time we stop living dangerously and use
straight's master branch instead.

Addresses #2937
2020-04-19 14:47:05 -04:00
Henrik Lissner
b78fc4eb76
Minor refactor & reformatting across the board 2020-04-08 15:30:10 -04:00
Henrik Lissner
8a7763337d
doom refresh -> doom sync
refresh isn't going anywhere, but sync will be the canonical command
here on out, because it is more appropriate for kind of work it will be
doing in the future.
2020-02-19 23:34:16 -05:00
Henrik Lissner
097972bd9d
Refactor package pinning
- Make doom/info package details more concise
- Removed doom-pinned-packages variable (pin info now stored in
  doom-packages metadata)
- Fix unpin! not actually unpinning some packages
2020-01-28 20:47:45 -05:00
Henrik Lissner
c6518498b9
Fix void-variable targets when using unpin! macro 2020-01-28 14:07:08 -05:00
Henrik Lissner
99fc55f75c
General, minor refactors in doom core 2020-01-27 00:51:32 -05:00
Henrik Lissner
dadd54604b
Refactor package update logic
Still needs more work.
2020-01-26 21:21:06 -05:00
Henrik Lissner
f600605de3
Add "unpin" section to doom/info
Important when debugging potential upstream issues.
2020-01-25 19:02:01 -05:00
Henrik Lissner
a9402cfb55
Fix #2373: bring back package pinning
This needs some serious refactoring...
2020-01-25 19:02:00 -05:00
Henrik Lissner
d866592beb
Fix unpin! with variadic module lists 2020-01-15 00:45:43 -05:00
Henrik Lissner
835f3f2c53
Eval unpin! logic at runtime 2020-01-15 00:31:12 -05:00
Henrik Lissner
4b2a9c8c38
Polish unpin! user story and docstring 2020-01-14 23:05:17 -05:00
Henrik Lissner
f3a9d0c03c
Resolve pinned packages based on overridden recipes
And rearrange "Checking out ..." message during 'doom upgrade' to
display package first, then commit (and abbreviated), rather than the
other around. It's easier to read.
2020-01-14 21:57:58 -05:00
Henrik Lissner
7326d2b4dc
Add unpin! macro for easy package unpinning 2020-01-14 21:39:19 -05:00
Henrik Lissner
b8b0f73edc
Resolve packages to repo for pinned packages
- Allow :pin SHA's to be abbreviated.
- Print out the repo being updated, rather than the package.
2020-01-14 21:18:59 -05:00
Henrik Lissner
9745f41ded
Add :no-byte-compile & :no-autoloads support to package! :recipe #2370 2020-01-14 19:25:24 -05:00
Henrik Lissner
f6852a2c9f
Add --discard switch to 'doom upgrade' #2224
Also rewrites straight prompt-in-batch-Emacs hack, and move it to
core-cli.el.
2020-01-09 03:36:00 -05:00
Henrik Lissner
309e322037
Add (Recommended) after certain straight prompts
When a package's worktree is dirty (or its recipe was changed), straight
prompts you with options to deal with it. To make it easier for less git
savvy folks, the recommended option has been marked.
2020-01-08 22:07:34 -05:00
Henrik Lissner
7a348f8784
Refactor how we indent straight's progress output
More work up front, less work in the trenches.
2020-01-01 19:34:30 -05:00
Henrik Lissner
b592e58c97
Fix warning when disabling core packages 2019-12-31 14:10:52 -05:00
Henrik Lissner
e5602c1802
Move async.el out of baseline packages
It isn't needed anywhere atm. Perhaps we don't need it in core at all?
2019-12-27 01:52:45 -05:00
Henrik Lissner
0ff68e5a7f
Don't handle straight transactions anymore
Since raxod502/straight.el@e45f726, straight handles its transactions in
non-interactive sessions.
2019-12-27 01:44:41 -05:00
Henrik Lissner
a02cfdc365
No-op package--ensure-init-file completely
Rather than setting package--init-file-ensured to nil. It's less work
for Emacs at startup and is functionally equivalent.
2019-12-27 01:44:40 -05:00
Henrik Lissner
09b49ee83a
Silence unused retval warnings from package! 2019-12-26 02:44:23 -05:00
Henrik Lissner
c1ff03ebed
Expand :local-repo relative to containing file 2019-12-26 02:40:56 -05:00
Henrik Lissner
28e36222ed
Reformat package! macro 2019-12-24 02:35:07 -05:00
Henrik Lissner
ebc30232a3
Fix package manager ignoring :disable 2019-12-24 02:25:37 -05:00