Olivia5k / makefile-executor.el

Emacs helpers to run things from makefiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Switch to/fall back on project.el if missing projectile?

patrickt opened this issue · comments

Hey there 👋🏻 I’m loving this package: with vertico and marginalia and friends, the interface is top-notch.

I have a suggestion: since Emacs 27.1, the builtin project.el library has shipped with Emacs itself. Though projectile offers a few more functions than does project.el, makefile-executor doesn’t take advantage of any of them besides projectile-commander: the only projectile function that’s called in most paths is projectile-project-root, which is equivalent to (project-root (project-current)) with the built-in package. I have a branch that uses project.el and I notice a significant speedup in large projects with makefile-executor-execute-project-targets. Would you accept a patch that added a dependency on project.el, or perhaps a more conservative one (a la how projectile is required now) that fell back on project.el if projectile is not present? I’d be happy to whip up a PR if so.

Hello!

Glad to hear that you're enjoying the package! I haven't used it all that much in the last few years since I left the employer that used Makefiles the most behind. But, I've been happy to see how well it has integrated with the new set of interface packages!

I would absolutely accept a patch for that. I also left projectile behind and have been using the project.el things for my newer projects as well. I personally don't need it to be backwards compatible with the projectile things - I feel like most of us have left it behind. I was hoping that the compat library would have support for project.el, but it seems it doesn't.

How complex would the "conservative" logic be, do you think? If it's too much, I would say that we just go with project.el.

Thanks for getting back to me! I've filed a PR (#11) to replace uses of projectile-project-root and friends with corresponding invocations from project.el. This patch doesn't try to do the conservative logic to handle the case where someone might have projectile but not project.el installed; I think it's fairly unlikely that people will hit this, given that project.el has been present for the last two major releases and can be installed trivially from GNU ELPA for stragglers. Let me know what you think.

I've merged the PR now since it looked good! Thanks again!

I think this issue can be closed now. Feel free to reopen it if this is me being in the wrong. 😅