Closed whompyjaw closed 5 months ago
You also download ag
and ripgrep
... How come? Why not choose one or the other based on which binary is used? I exclusively use ripgrep
and don't have ag
in my path. Why would that package get installed?
Hi @whompyjaw
Thanks for opening an issue. I am trying to constantly improve the package and I appreciate having user feedback.
Even though you are commenting out the flycheck
and lsp-mode
features in the :init
section of use-package
elisp code, these are being downloaded because they belong to the Package-Requires
header of the verilog-ext
package. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Headers.html
As far as I know, package managers such as package.el
or straight.el
use this header to determine what are the dependencies of a package at download time. Thus downloading of these dependencies cannot be made conditionally. What is made conditionally with the verilog-ext-feature-list
is the loading of these dependencies at run time. This prevents loading of unused features/packages and can help reducing Emacs startup time.
This is the best solution that I have thought about so far to make setup of the verilog-ext
package as simple as possible for the average user. However as you have pointed out it relies on having downloaded all the dependencies/packages first.
The optimal solution would be to integrate the code of features such as lsp-mode
or flycheck
into their respective packages. However this would require opening Pull Requests on their Git repos for each change, making development slower. Once verilog-ext
proves to be mature enough I will try to make this integration.
Anyway if you can think of a better approach or solution I would be more than happy to try it.
Thanks!
Hi @gmlarumbe, I completely understand. Thanks for elaborating on the "behind the scenes". Your package is super helpful, so it's work eating that storage cost. It seems you have created the best solution, and if I really want to, I can remove those packages from that header file :)
And, sadly, I am not a proficient elisper (working on it), so I don't have any recommendations at this moment. I assume it's not possible to have the header as a modifiable variable? Maybe for the :init
macro for use-package? If that's not feasible, feel free to close this, as your current solution seems to be the best!
Hi @whompyjaw
Thanks a lot for your understanding. I am happy to read that you find the package useful!
I assume it's not possible to have the header as a modifiable variable?
Some time ago I looked if that was possible but I did not find anything. The syntax of the Package-Requires
field in the header seems very simple.
Maybe for the :init macro for use-package?
I also looked at straight.el
integration with use-package
to see if that was possible, but could not find anything either...
I am closing the issue, but feel free to reopen if there is a better short/mid-term solution than the integration of flycheck
or lsp-mode
into their respective packages.
I uncommented out
lsp-mode
andflycheck
in theverilog-ext-feature-list
but those package still download... That is counterintuitive... For very limited resources I have to be careful what packages I install.