-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using straight as the package manager #374
Comments
I hear that. I already have straight.el in my crosshairs, as well as a local branch where I'm experimenting with straight.el integration. However, I'm waiting on some key features promised for the v1.0 release (of straight.el) before I can move forward with it. I can't predict when that'll be, but I'll keep this issue open and keep you posted. |
Would it be possible to list which features are still missing in straight? I'd like to make sure that there's progress on those and perhaps work on some of them myself. |
I haven't looked at straight for a while, but at the time this issue was created, what Doom needed most (from straight) was a non-interactive workflow for updating packages ( I had a couple other misgivings about poor error handling, confusing pull/push prompts when you run This week is really busy for me. After the 16th I'll revisit straight and see where we stand. |
All those issues are straight forward except for:
Is this really a blocker though? I don't think there are any issues serious packages out there that aren't hosted on git. |
You're right, it's not really an issue. I was under the impression that there were (relatively common) non-git/svn dependencies out there, which straight would presumably be unable to fetch, much less manage (and so, Doom wouldn't be able to either). Not sure where I got that idea, I'll have to dig around straight's issue tracker. |
There are a few kinks to iron out, but for the most part it's done. Doom Emacs, powered by straight. Goodbye gnutls and elpa/quelpa issues. This update doesn't come with rollback or lockfile support yet, but I will eventually include one with Doom, and packages will be (by default, anyway) updated in sync with Doom. Relevant threads: #1577 #1566 #1473
After a long wait, it's done! I published the I'll be spending the next week ironing out the kinks before merging it in. It'd be a huge help if you could give a try. Here are a few things you should know going in:
For Doom users that have been with us for a while, this may cause some breakages. Sorry for the trouble, but the good news is, these are all the breaking changes I have in store. Let me know if it gives you any trouble. I will keep this thread open until straight makes it to |
Don't know if this is the right place for this, but I tested this branch on Ubuntu 18.04 LTS with a clean Doom Emacs install. It works correctly, the gnutls.el errors (invalid request) are gone. |
I just switched to straight,
|
@ydewit Are you try this out with a pre-existing private config, or a blank one? Also try |
And change TARGETS to PACKAGE, which is a more descriptive name. Mentioned in #374
@hlissner From a blank one. I just tried the same using the latest and it worked without issues. Thank you. |
So quick question, do we now need to switch to using the |
@HaoZeke No, it's business as usual. Your package declarations go in DOOMDIR/packages.el, and your configuration goes into DOOMDIR/config.el. Doom's package management will always follow this declarative paradigm. However, this is just Doom's (strong) suggestion. If you really don't like this paradigm, you could forget about packages.el (delete it if you'd like) and simply load straight (or package.el) right away, in config.el, and install your packages with the |
Switched to straight branch and this is what I get when opening emacs now
Full trace:
|
Before this update, the autoloads files were collected in lexicographical order (by traversing straight's build directory). By using straight--build-cache's keys (which are entered in the order they were registered) we avoid issues like
I tried out this branch this morning. There seems to be something wrong with package management: not all packages get loaded. For example I did the following: (package! move-text)
(use-package! move-text
:commands (move-text-up move-text-down)
:bind (([M-up] . move-text-up)
([M-down] . move-text-down))) In the (package! flycheck-mix)
(use-package! flycheck-mix
:commands flycheck-mix-setup
:init
(defvar elixir-enable-compilation-checking nil)
(add-to-list 'safe-local-variable-values
(cons 'elixir-enable-compilation-checking nil))
(add-to-list 'safe-local-variable-values
(cons 'elixir-enable-compilation-checking t))
(add-hook 'hack-local-variables-hook
(lambda ()
(when (and (or elixir-enable-compilation-checking) (string-equal major-mode "elixir-mode"))
(flycheck-mix-setup)
;; enable credo only if there are no compilation errors
(when (not (member '(warning . elixir-credo) (flycheck-checker-get 'elixir-mix 'next-checkers)))
(flycheck-add-next-checker 'elixir-mix '(warning . elixir-credo))))))
(add-hook 'flycheck-before-syntax-check-hook (lambda ()
(when (string-equal major-mode "elixir-mode")
(setenv "MIX_ENV" "test"))))) This was working when I was using the Am I missing something? Edit: it seems as if |
@ckruse I'm not sure if you combined them for brevity, but just to make sure:
Doom's package management system is declarative. You do not put them in the same file. Your packages.el is not loaded at startup (for interactive sessions) on either branch (until you start using the package management API). However, in both branches, |
@hlissner with the changes you suggested everything works again, thanks. Interestingly I've been using this setup on the I did this because I thought this is how it was meant to do. Sorry for causing unnecessary noise. |
@ckruse No sweat! It's possible you're eagerly loading Once package.el is loaded, Doom pulls in all its package management machinery (and reads all your module packages.el files). There is usually a better way of going about these things, but it's really easy to miss, what with how abysmal the documentation situation in Doom is at the moment. I'm working on it! |
The straight branch has now been merged into develop, so I'll consider this request fulfilled.
cd ~/.emacs.d
rm -rf .local
git pull --rebase
bin/doom refresh
cd ~/.emacs.d
git checkout develop
bin/doom upgrade |
Thank you for your work! |
I'm currently a user of spacemacs, but spacemacs is quite heavy, buggy, and contains lots of cruft I will never use. The layer system in particular is a bit of a nightmare.
But my biggest complaint with spacemacs is that it doesn't use https://github.com/raxod502/straight.el/. I'd really like to use straight as my package manager because I want to use lock files to secure my configuration against random breakage. I'd like a convenient workflow for contributing upstream. And all that other git goodness that comes with having access to the full git history of every package. If doom were to use straight, I'd definitely switch from spacemacs.
The text was updated successfully, but these errors were encountered: