Skip to content
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

Elpaca and Setup.el #31

Open
nullomata opened this issue Dec 2, 2022 · 7 comments
Open

Elpaca and Setup.el #31

nullomata opened this issue Dec 2, 2022 · 7 comments

Comments

@nullomata
Copy link

I noticed that you migrated from straight.el to elpaca. I have been contemplating trying elpaca for a while, so I will probably use your usage as a guide, so thank you for that! I was wondering if you have any thoughts on using setup.el in place of use-package? It looks like you've opted to just use elpaca-use-package instead. Do you have any thoughts on elpaca's built-in functionality vs. setup.el?

@d12frosted
Copy link
Owner

@danielclucas feel free to. But keep in mind that Elpaca is designed for different workflow, so I had to patch/workaround some things. I still find it more pleasant and straightforward (no puns intended), even though there are some quirks.

I was wondering if you have any thoughts on using setup.el in place of use-package?

What is setup.el? I think I've heard about it, but can't seem to find it now.

Do you have any thoughts on elpaca's built-in functionality vs. setup.el?

Worth mentioning that elpaca is a package manager and not 'package declaration' (e.g. configuration) tool. elpaca-use-package is a very simple wrapper around use-package that just understands elpaca recipes. So at the moment I use elpaca to manage my packages and use-package to configure them. It's a little bit interleaved, hence might be confusing.

BTW, worth mentioning that I would gladly use package.el to manage my packages (e.g. no straight, no elpaca, just the built-in package manager), but it doesn't support non-ELPA installations (e.g. git-hosted packages).

@nullomata
Copy link
Author

Elpaca seems more straightforward and less complex by comparison to straight, so that appeals to me. Its author is also an active maintainer of straight, so I believe it was designed with some of the problems of straight in mind.

Here's the link to the wiki article on setup.el https://www.emacswiki.org/emacs/SetupEl. It's my understanding that setup.el is a package configuration tool in the same vein as use-package. It's less declarative by comparison, and it doesn't do as much out of the box as use-package, but I find the more readable code base appealing (but I'm a novice in macros).

Maybe as a newcomer I just like tools that I can read and sort of understand 😅

@d12frosted
Copy link
Owner

Here's the link to the wiki article on setup.el https://www.emacswiki.org/emacs/SetupEl. It's my understanding that setup.el is a package configuration tool in the same vein as use-package. It's less declarative by comparison, and it doesn't do as much out of the box as use-package, but I find the more readable code base appealing (but I'm a novice in macros).

Thanks for the link. Indeed, it looks like they solve pretty much the same problem and it's just a matter of preferences/taste. I guess the main difference is that use-package is more declarative, and this is the reason I like it. But I have never used setup.el, so can't say anything meaningful about it. If you are going to try it, I would appreciate your thoughts.

Maybe as a newcomer I just like tools that I can read and sort of understand 😅

Aye, I totally understand that. Though I wonder, what makes use-package less easy to understand? And I also think that my setup is not the easiest to understand as well 😅

@nullomata
Copy link
Author

If you are going to try it, I would appreciate your thoughts.

I will indeed let you know once I have some experience with it!

Aye, I totally understand that. Though I wonder, what makes use-package less easy to understand? And I also think that my setup is not the easiest to understand as well sweat_smile

Ah, well using use-package is straightforward enough, but I have difficulty understanding its internal workings. Setup.el is still difficult for me to understand fully, but I find the codebase a bit more accessible is all. In either case It would probably help if I better understood macros.

@nullomata
Copy link
Author

Hi, I just recently tried to migrate over to elpaca. I based my configuration on how you did it, but I'm running into an error that I'm not sure how to diagnose. When using eldev build :autoloads for the first time it seems to build and compile elpaca successfully, but none of the other packages. Here is the output:
build-output.txt
Which is followed by

Error (use-package): Cannot load <package>
...
Unknown virtual target ':autoloads'

Once this has been done, subsequent attempts at eldev build :autoloads or eldev compile both just output

waiting for installation to complete...

and never complete. Here's a link to my config: https://github.com/Cloudcolour/flux-emacs.

I've probably made some silly error, but I can't seem to figure where I've gone wrong at the moment. I would really appreciate it if you could take a look!

@nullomata
Copy link
Author

I was able to resolve the issues I was having with a deep dive into how Eldev and Elpaca work. I hope my request for help wasn't too much of an annoyance!

Though I do have one lingering question, which is the need for elpa-block-until-ready. You state in the docstring:

  "Block Emacs until all packages are installed.
Unfortunately, `elpaca' is asynchronous-only, but there are
flows (like scripts using `init'), where you need to do perform
some actions *when* environment is ready."

Can you provide an example of what sort of script you mean, or of another flow that would require blocking? I don't think I need to use such a function currently, but I would like to understand what problem that solves.

Thanks again for all of your resources and code.

@d12frosted
Copy link
Owner

@Cloudcolour apologies for silence. Overly busy and crazy days. Will try to answer this week :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants