TL;DR: Is there a way to have straight.el
not check out a package via git repo, and have it download slim melpa packages like package.el
does? Also, is there a way to have it refrain from automatically downloading a lesser-used package until I manually tell it to?
I'm trying to switch to straight.el
from package.el
because reproducible configs and seamless integration of non-MELPA packages sound very attractive. I've added the bootstrap code to init.el
, added (straight-use-package 'use-package)
, and put :straight t
on all use-package
s. Unfortunately, this makes straight.el
pull eeeeeverything from git repos. This creates two problems:
- My
~/.emacs.d
has inflated from 82MB to 2.4GB and counting. I cannot afford this much storage on one of my laptops, especially considering that 99% of that storage is wasted: I'm never going to hack on most of those packages! - The initial checkout takes forever. When I said "and counting", I meant it's been taking about 30 minutes just to check out a single package, and there are a dozen more. It's currently stuck on
mozc
, which is a 78KB single-file elisp program living in a gargantuan C++ project.straight.el
is trying to pull the whole 1GB+ repo so I can get access to a long history of C++ files that won't even get compiled.
So I would like to have straight.el
just download MELPA packages for things that are on MELPA and that I don't intend on modifying. But writing e.g. (straight-use-package '(mozc :source (melpa gnu-elpa-mirror))
doesn't help; straight.el
still pulls the repo. Seeing the official docs' notes on backends, I'm guessing that getting packages from anywhere besides git is an unimplemented feature, but is this right?
As an additional, related goal, I'd like straight.el
to refrain from automatically downloading every single package on startup. For instance, I don't want lsp-mode
installed until and unless I open a file whose major mode is set up to use lsp-mode
. But I can't seem to find any info on this. Is there a way to configure packages without downloading them until there's demand?
straight.el
is doing exactly what it was intended to do, and your use case is not compatible with its current feature set. I think your options are to usepackage.el
with MELPA stable, or (which is what I do), usepackage.el
and MELPA for things where you just want the 'slim' version, and install direct from Github for the things you want more control over (with or withoutstraight.el
).mozc
package (git) must be cloned on your computer and the executables must be built/installed according to the procedure suitable for your OS - see the installation documentation. The filemozc.el
is the interface between Emacs andmozc
application (which will be the server in this case) and it is not part of building/installing. Later must be added directly in yourinit.el
withoutstraight
- simply add ``` (load-file "/path/to/mozc.el") (setq default-input-method "japanese-mozc")```.straight
bloating.mozc.el
, cutting down space, and making sure it appears on the path--, and AFAICT introducingstraight.el
takes away those benefits. And for what? I don't need or want developer access tomozc.el
. The insistence ofstraight.el
on checking out git repos for everything just doesn't make sense, because no one is a contributor to every single package they use. I think it can really use an option to coexist with "use-only" packages, which is what I was hoping to learn how to do.