tweak: do *not* download package archives by default

From this point on, Straight will *not* download packages from tarballs
by default. There are too many edge cases for this that catch up
beginners who have BSD tar installed and get undecipherable tar errors,
and Straight offers no fallback or easy way to change what tar
executable it uses.

Packages that have already been installed won't be affected until the
next time they are updated/reinstalled.

Users can still opt back into tarballs by adding this to
$DOOMDIR/packages.el:

  (setq straight-vc-use-snapshot-installation t)

Amend: 8cdddd87d9
Fix: #8530
This commit is contained in:
Henrik Lissner
2025-09-25 19:19:42 -04:00
parent 2acc9c50a0
commit b793fb5642

View File

@@ -55,18 +55,7 @@
;; no affect on packages that are pinned, however (run 'doom sync --gc' to ;; no affect on packages that are pinned, however (run 'doom sync --gc' to
;; compact those after-the-fact). Some packages break when shallow cloned ;; compact those after-the-fact). Some packages break when shallow cloned
;; (like magit and org), but we'll deal with that elsewhere. ;; (like magit and org), but we'll deal with that elsewhere.
straight-vc-git-default-clone-depth '(1 single-branch) straight-vc-git-default-clone-depth '(1 single-branch))
;; Install archives from forges instead of cloning them. Much faster and
;; lighter.
straight-vc-use-snapshot-installation
;; REVIEW: Add GNU tar checks here?
(and (executable-find "tar")
;; Windows and BSD Linux are certain to have incompatible versions of
;; tar out of the box, and straight gives us no way to customize the
;; tar executable it uses, so we simply opt out of snapshots there.
(not (featurep :system 'windows))
(not (featurep :system 'bsd))
t))
(with-eval-after-load 'straight (with-eval-after-load 'straight
;; HACK: Doom relies on deferred compilation, which spares the user 20-50min ;; HACK: Doom relies on deferred compilation, which spares the user 20-50min