If the package is local, the local-repo has absolute local file path,
and straight-modified-dir will return as it is, which always exists.
Fix it by passing package only to straight-modified-dir.
Doom makes multiple attempts to re-clone repos if they failed the first
time, however, if a user provides a :local-repo and that location isn't
a git repo, Doom assumes this it is the result of a failed clone, and so
deletes it to "try" again (which will fail). This can result in lost
work.
This prevents this from happening to packages/repos outside of
$DOOMLOCALDIR (all packages under $DOOMLOCALDIR must be git repos).
Fix: #7785
Amend: 3643c4dadd
Amend: 1fa8d3a4b9
directory-empty-p was introduced in 28.1, but Doom still supports 27.1,
so 27.x users would see this error when running any bin/doom command
that clones packages.
Fix: #7779
Amend: 1fa8d3a4b9
It seems the temporary branch that 'doom upgrade' creates is sometimes
left over after a 'doom upgrade', preventing the next 'git fetch' from
completing.
Ref: #7771
Caused by a regression originally introduced in b6b755d, but incorrectly
fixed in 89c56a3. Don't code while sleep deprived, kids.
Amend: 89c56a3393
Amend: b6b755dea4
12a765c introduced suppression of package-rebuilding prompts on 'doom
upgrade', but inadvertently reversed the check. This fixes that (and
refactors the if/or tree into a `cond`).
Amend: 12a765c509
Prior to this, -B would suppress the prompt for package rebuilding if
your Emacs version or hostname changed. Now, it fully inhibits
rebuilding in either case.
Fix: #7760
Ref: cff091982e
'doom purge' is now deprecated.
Also changes 'doom sync's -p option to --gc. Since GCing causes the loss
of historical data, I'd rather it be a long option to make it a little
harder to do accidentally.
This changes 'doom sync' to be smarter about responding to changed
package recipes/pins, changes in Emacs version, or instances where the user
has copied a config to a new system.
In all these cases, the user would formerly have to know about a
specific combination of 'doom sync -u' and 'doom build' to ensure Doom
is in a good state. With this change, 'doom sync' handles all these
cases.
Also, 'doom build' is now deprecated (and 'doom sync' now has a
--rebuild option to mimic its old behavior).
Also also, sometimes, a package may silently fail when cloned (which
used to result in an empty repo). Now, if this is detected, cloning will
be re-attempted up to 3 times before aborting with much more visible
error.
Note: these are stopgap solutions, until v3 is finished.
Something often reported are file-missing errors when a package that
should be present isn't. This can easily happen if, say, during a 'doom
sync' or 'doom upgrade' a package fails to clone correctly and the user
misses the errors, then tries to carry on as normal. What's worse is
that Straight leaves behind an empty directory, which it treats as a
sign that the package has been cloned correctly, so it doesn't raise any
fuss over them.
With this change, 'doom sync' (and 'doom upgrade') will now try again,
if the clone process fails the first time (up to 3 times) before
aborting the whole process altogether, which should be loud enough for
users not to miss. Note that these failures at 99.99% because of
network (or upstream downtime) issues.
For now, this does leave Doom in an incomplete state (until you try
again when the connection issue is resolved), but a rollback step will
be added in v3 to prevent this, as well as better error messages (as
well as @doomelpa mirror for packages on less reliable hosts, like
codeberg, savannah, etc).
BREAKING CHANGE: This removes the 'doom compile' and 'doom clean'
commands, and offers no immediate replacement for them (and no plan to
include one). In the future, byte-compilation of Doom's internals will
be baked into 'doom sync', but until then, Doom is not optimized to take
advantage of byte-compilation, and forcing it provides no benefit.
If $DOOMPATH is malformed or set to a value that does not contain a
valid path to Doom's CLI library in $EMACSDIR/lisp/cli (see #7608),
bin/doom no longer functions, emitting "a subcommand is required"
errors.
This change ensures that the CLI library is always the last (implicit)
element in doom-cli-load-path, and ensures $DOOMPATH is never written to
the user's envvar file (in case they try to use bin/doom from inside a
terminal within a Doom Emacs session), which should ensure users -- at
least -- never find themselves stranded without the Doom CLI.
Fix: #7608
Co-authored-by: bpizzi <bpizzi@users.noreply.github.com>
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:
IS-MAC -> (featurep :system 'macos)
IS-WINDOWS -> (featurep :system 'windows)
IS-LINUX -> (featurep :system 'linux)
IS-BSD -> (featurep :system 'bsd)
The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.
Fix: #7479
A package's autoloads aren't expunged from Doom's profile init file,
even after that package has been disabled. If a package's autoloads has
side-effects, this can lead to void references/function errors. One such
case is with php-extras, which will try to call
`php-extras-company-setup` after company loads from its autoloads, but
this function naturally won't be loaded if the package is disabled.
This change fixes this, fully expunging orphaned autoloads on `doom
sync`.
BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any
all-the-icons-* function calls or variable references in your private
config will break and should be replaced with their nerd-icons-*
equivalent. That said, Doom will continue to install all-the-icons for
a while, so feel free to load it if you don't want to fully commit to
the change yet.
This change is happening because nerd-icon has wider support for GUI and
TUI Emacs; has a larger, more consistent selection of symbols; plus unicode
coverage.
Fix: #7368Close: #6675Close: #7364
Now that 29.1 is stable, support for it is official. This updates or
docs and doctor checks to take this into account. I've also included a
link to a Discourse post where I track support for Emacs HEAD.
From now on, our documentation will assume your Emacs config lives in
~/.config/emacs, by default, rather than ~/.emacs.d. Support for the
latter is not going away, it will simply be mentioned less in the
literature, as all supported versions of Emacs going forward (and future
versions of Doom) will support (and prefer) XDG conventions.
The user manual will be updated separately.
Close: #6965
Co-authored-by: gagbo <gagbo@users.noreply.github.com>
`doom doctor` throws a type error for enabled modules without a
doctor.el and/or packages.el file. This occurs because, in
in775ee2f04aad, `doom-module-expand-path` was changed to return nil if
the target file did not exist, and the doctor wasn't updated to handle
this. It passes `nil` to `load`, causing this type error.
Amend: 775ee2f04a
Library packages (like compat and transient) offer macros. Therefore,
any package that uses them (dependents) needs to be recompiled when
these are updated, but straight currently doesn't do this. As a
temporary workaround, this commit forces dependents to be rebuilt after
updates.
This is a bit too brute-force, but will do until v3, which will manage
dependency graphs and their complexities more efficiently.
In case straight prompts something like the following:
> In repository "git-modes", HEAD on "master" is behind default branch "main"
1) Abort
2) Checkout "main" (Choose this if unsure)
3) Magit log "master..main" and open recursive edit
This allows for more rapid 'doom sync'ing when testing different module
combinations, but puts the onus on the user to run `doom sync
--purge` (or `doom purge`, which will later be renamed `doom gc`) to
prune orphaned packages/repos.
The doctor would look for stale byte-code in *all* build directories,
which was excessive and produced many false positives for folks who use
multiple versions of Emacs or have recently up/downgraded.
* lisp/cli/help.el (doom help): move to lisp/cli/meta.el, and add :dump
definition.
* lisp/doom-cli.el:
- (doom-before-init-hook): trigger hook after the file is done
loading.
- (doom-cli-backtrace-depth, doom-cli-straight-error-lines,
doom-cli-benchmark-threshold): rename these variables' prefix from
`doom-cli-` to `doom-cli-log-`.
- (doom-cli--plist): rename to doom-cli--group-plist, to better clue
in what changes it.
- (doom-cli-context-parse): remove unused letbind (argsleft).
- (doom-cli-create-context-functions, doom-cli-before-run-functions,
doom-cli-after-run-functions): define with defcustom instead of
defvar, to indicate that they are (especially) intended for end-user
configuration.
A regression introduced in 4efaf68, cause by an incomplete refactoring
of the loop, where not all instances of `key` were changed into `group`
and `name`.
Amend: 4efaf6837bFix: #6840