radian-software / straight.el Goto Github PK
View Code? Open in Web Editor NEW๐ Next-generation, purely functional package manager for the Emacs hacker.
License: MIT License
๐ Next-generation, purely functional package manager for the Emacs hacker.
License: MIT License
We currently prune the build cache on a successful init. We should also prune the build directory. This should be easy to implement, and harmless.
We should automatically remove no-longer-present packages from versions.el
each time it is written using straight-save-versions
.
M-x straight-freeze-versions
is supposed to install all packages, even ones not needed on the current system. Therefore, there needs to be a way to register a package with straight.el without actually installing it.
The current algorithm is O(n) in the number of packages at Emacs init. We could reduce this to O(n) in the number of packages loaded at Emacs init, if the user enables an option to only check packages for rebuilds when they are actually loaded. This option should be disabled by default since it requires putting advices on require
and load
.
One potential complication is that it's not clear how we could figure out what features are supposed to be require
-able, if the packages are not built yet. Perhaps this indicates that #41 is a better way to improve performance.
Fix it:
(defun straight--update-package (recipe)
;; FIXME
(error "Don't know how to update packages yet"))
We need some proper documentation in the README.
Currently that has no effect.
Why?
This is a tracking issue for issues that need to be closed for the 1.0 release of straight.el:
straight.el
needs to manage itself as a package. Otherwise it remains unversioned in versions.el
, and also pbl
does not have its autoloads activated.
Although the profile system allows for adding your own packages without putting them in other lockfiles, there is no way of overriding the revision of a package from another profile. This can be corrected with a new function straight-override-package
, which will also allow for overriding the recipe ahead of installation time.
Jonas uses some heuristics (for example, to calculate the load path) in order to handle the variety of packages on the EmacsMirror. These should be incorporated into straight.el, since otherwise some packages from EmacsMirror will not be usable without providing a custom :files
directive.
Version control code should be self-hosted. We can drop support for non-Git VCS systems.
MELPA/GNU ELPA/Emacsmirror is hardcoded in. This is bad, it should be extensible.
Currently, straight--set-head
will just fail if you have unstaged changes. It should offer to do a hard reset, clean the working directory, and so on, if necessary.
My startup time was 0.5s before using straight.el
; now it's 0.9s.
Currently dependencies are not necessarily explained very well, since only the direct cause is reported (e.g. a dependency could cause MELPA to be cloned, and the message displayed is then unhelpful). I would like the whole chain to be shown.
All packages are built on every init.
Here's another problem I noticed with it. If you delete the build directory, it fails to notice and errors out trying to load the autoload file.
It seems that evaluating a use-package form causes a package rebuild every time.
This would rebuild any packages that needed to be rebuilt. Handy if you're testing something like esup
where the new instance of Emacs won't pick up your changes because it's bypassing the normal init process.
Currently if you evaluate a use-package
form and then change its recipe, you will just get an error because the recipe has changed. This is arguably correct but definitely annoying. There needs to be a way to handle this without resorting to mutating multiple undocumented internal hash tables.
During init, the same package is built more than once.
We need docstrings.
Cloning Git repos can take a while. It would be nice to offer a config option to clone repositories shallowly by default.
After #44 is implemented, we'll want to automatically use it when the use-package
keyword :if
is present.
It's probably better to keep track of TODO items in a proper issue tracker rather than having lots of scattered FIXME notices.
After #25, we may want to consider enhancing the Git support. In particular, I'd like explicit support for a fork-based workflow. Something like:
(straight-use-package
'(use-package
:repo (github . "raxod502/use-package")
:upstream (github . "jwiegley/use-package")))
It would certainly be possible to automatically transform MELPA recipes into this style, so this is doable.
เฒ _เฒ
We need package.el for package-built-in-p
at runtime, so we know whether or not to signal an error due to a missing package. Unfortunately, this means we now have a runtime dependency on package.el. I think the most amusing way to solve this problem is to persistently cache the complete list of built-in packages, and update the cache whenever we detect that the output of M-x emacs-version
has changed.
Over time, you can accrue a large number of unused Git repositories that were cloned at various points but are no longer used. I don't want to prune these (they might contain useful development history), but some people who don't modify their Emacs packages might.
I just realized that versions.el
is going to have not only Radian's packages, but also the packages I declare in my local dotfiles. These need to be separate, so straight.el
needs to have an idea of multiple package declaration sources, which can be stored in separate versions.el
files.
Like melpa-stable.
If the recipe specifies a branch or particular revision, that needs to be checked as well.
Even if there are no unit tests or documentation yet, I would at least like to validate that there are no byte-compiler warnings.
If a package depends on Org, it probably depends on the latest version, not whatever version is shipped with Emacs. Even if package.el insists a package is built-in, we should still try to install it. The arguably most correct solution would be to attempt to install all packages, but then only signal an error on missing dependencies if those dependencies are built-in. I'm tempted to just say that missing dependencies are not an error, given how loose the rest of dependency handling in straight.el is. But this is probably going too far.
Currently, straight--get-head
and straight--set-head
only work for Git. They should also work for other VCS's.
I think this is a pretty simple problem but I don't currently have time to debug it.
If I evaluate a straight-use-package
form after init, then the dependencies don't seem to get properly saved in the build cache, and so they are not activated the next time Emacs is started.
This could also be a problem with another Emacs instance overwriting the build cache. That is a problem that needs to be solved! Perhaps an intelligent merge could be done. Although, I think the build cache should be loaded and saved only for the evaluation, not on Emacs kill.
Currently, if any packages have changed, we discard the results of our bulk find(1) operation (from straight--cached-packages-might-be-modified-p
) and check each package individually. This is slower. It would be preferable to stick the results in a hash table so that we can skip checking all cached packages, even if some are modified.
straight.el
should save the recipe in build-cache.el
and rebuild the package if the recipe has changed by the next check.
I got this:
Warning (straight): Packages "esup" and "esup" have incompatible recipes (:branch cannot be both "radian-1" and nil)
Warning (straight): Package "esup" has two incompatible recipes (:branch cannot be both "radian-1" and nil)
I think the first warning is superfluous.
Currently if there is an error during init, all the packages will be rebuilt next init because the build cache is written to disk (and not all of the packages had been enabled yet).
This would help with #9. Probably we should also handle some simple cases like the build directory or repository being deleted, which users might try if they didn't know about straight-rebuild-package
.
I think we can move the current definition of straight-use-package
to straight--use-package
, and then expose a new version of straight-use-package
that omits the arguments currently marked as "internal use only".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.