-
Notifications
You must be signed in to change notification settings - Fork 155
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
Discussion: using package.el and straight.el together #128
Comments
Well, I would say that There should be no trouble at all with using both The thing you have to be concerned about is duplicate packages. There is no inherent harm in loading a package twice, other than that your init may be slower and you might get some weird side effects if the two versions being loaded are not the same. You should be especially concerned about dependencies, since if you use package manager X to load package Y, then you also need to use package manager X to load all of the dependencies of package Y—otherwise you'll get duplicate packages if you load those dependencies also using package manager Z. Another consideration is that
instead of
In order for the Does this answer your question? Let me know if any other information would be helpful. |
Also, for the question of "is it safe to use" in general, see the new known issue FAQ section. |
Hi, what is "different use-package forms" you mentioned? Are you recommend to use such style
for every package installed? Currently I set config with
only. It seems works. |
@caadar No, that's just for @rgrinberg's particular use case. What you're doing is already recommended. 😀 |
Correct, the problem only arises when you want to use |
@raxod502 thanks for the reassuring response. I'm trying out straight.el and things are going great except for one situation. There are some packages where I'd like straight to simply install them from an existing local repositories instead of trying to clone them. Those are usually packages that aren't just emacs packages and hence need to be located where they are in other (non emacs) contexts. For example, the
Ideally, straight-el should simply assume that this package is cloned and just build it. But I can't figure out how to do that. |
Currently The quick fix is to symlink the repository into |
Thanks, this workaround is adequate. I think straight supporting local repos anywhere on the filesystem would be a useful feature. |
I've created #133 to track this feature separately. Feel free to either close this issue or follow up with other questions. |
Thanks again :) I will create new issues/questions as necessary |
Actually, I have another question that probably doesn't deserve its own issue: Is there a way to prevent straight from hacking |
for more info, Integration with |
OK, thanks. |
… except for the part where |
Before, it just existed as a variable that was not referenced anywhere in the code. I'm not sure how this got through. See #128 (comment)
Fixed on develop. |
@raxod502 said "package.el which insists on activating all the packages you ever installed with it." I would like to point out that this is not necessarily the case if you call package-initialize with non-nil optional argument, e.g.,
This is how I have always use package.el so that I can have many installed packages, but activate only some of them by using a different init file when emacs starts. |
@emacs18 You're right. It's only the default behavior which is flawed, at least in this case. If you have a suggestion for a corresponding update to the comparisons section in the README, I'd be glad to consider it. |
@raxod502 I'll look into providing a patch later. In the mean time, I would like to ask you if the following could allow me to use straight.el along with spacemacs without duplicating packages:
I'm in the process of testing this idea. I also considered writing use-package-ensure-straight similar to use-package-ensure-elpa to be set as the value of use-package-ensure-function variable. However just advising package-installed-p seemed like a simpler idea. |
@emacs18 Your advice doesn't take into account the case where a package was previously loaded using
At some point it may be a good idea to expose some user-facing functions for getting information from the caches. That said I can't guarantee that advising By the way, |
Actually, your original advice doesn't work at all. It always returns |
Yes I forgot to add (file-directory-p) call. |
The way
Where I only pull from origin and only push to rgrinberg. Is there a way to make straight respect this convention? Since I do have some emacs package repositories that live outside of straights control. |
Lol that's just because I swapped the arguments to
instead.
This shouldn't be necessary if you are checking the
I am really confused about why you are doing all this manually instead of using the bootstrap snippet. The latter should have the same effect. All this said, even though |
OK. With the following minified
I observe an |
Note, by the way: you will observe very very poor performance of In particular, your profiling
will have terrible performance compared to if you wrap the Addendum: if you look in your profiling results, it's clear that Addendum 2: any questions about the transaction system? Or suggestions on how I can make the important considerations more obvious in the documentation? |
Also, food for thought. Would anybody be interested in me making a pull request to Spacemacs to add an option for using |
@raxod502 This thread may interest you in that case (or maybe not 🤷♀️): quelpa/quelpa#93 (comment) |
Created syl20bnr/spacemacs#9505. |
Thanks for all the feedback. I found out why things were taking so long.
If I do not use -Q and setup my ~/.emacs to do the equivalent thing, then the startup |
See also this snippet from the user manual, which explains the proper way to load
|
@emacs18 any chance you want to share your most recent versions of |
Closing this issue since we have a Gitter for general discussion now. For requesting a better-supported way to use |
@rgrinberg Note that using |
Does that mean straight-enable-use-package-integration should be deprecated? |
I don't see why; can you explain? |
I thought most of the idea with |
Everything you said is correct, except that you are omitting the part where in the default (i.e. non-deprecated) configuration, |
straight.el looks like a real awesome package manager and I'd like to start using it right away. But I already have a massive spacemacs based config, so I'm wondering if I can make a gradual change towards straight somehow. For example, only using it to manage a few packages to start. Wondering if this is a good idea and is possible at all.
The text was updated successfully, but these errors were encountered: