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

Using fewer dependencies #218

Closed
phikal opened this issue Mar 15, 2023 · 1 comment
Closed

Using fewer dependencies #218

phikal opened this issue Mar 15, 2023 · 1 comment

Comments

@phikal
Copy link

phikal commented Mar 15, 2023

Hi,

when taking a look as Elsa I was first overwhelmed by the number of dependencies. Perhaps I am misunderstanding something, but I was expecting a command like M-x elsa-check-buffer that runs through the file and its dependencies to generate a buffer with messages. Could you perhaps explain the need for some of the these packages:

;; Package-Requires: ((emacs "26.1") (trinary "0") (f "0") (dash "2.14") (cl-lib "0.3") (lsp-mode "0") (ansi "0") (async "1.9.7"))

What is f used for? Why is cl-lib needed if the minimum version of Emacs is 26.1. Why the hard dependency on lsp-mode? Why is ansi needed? A lot of these packages are only available on MELPA, which not everyone uses. Would it be imaginable to try and simplify the code or modularize the code base into multiple packages?

@Fuco1
Copy link
Member

Fuco1 commented Mar 15, 2023

Hi. Thanks for your interest in trying this out.

Dependencies exist to reuse code and make development faster. I use some which helped me to make things faster. In the future, we might replace some with built-in functions.

F is used for working with files. Some of the functions have since been implemented in Emacs, but I did not refactor it yet. It's not a high priority.

I don't know why cl-lib is needed, it was necessary in 2018 and I did not remove it. If it's no longer needed, we can remove it.

lsp-mode is used to implement the Elsa language server.

Ansi is used for printing colorful output to the terminal.

Elsa is complex and it currently can't run from user session Emacs and most likely never will. There is many ways to run Elsa mentioned in the Readme. Currently no other ways are supported, but I'm sure it's possible. Elsa is not a linter like "checkdoc", it is a full evaluation engine for Emacs Lisp, it's a gradual type system, it's a language server, it's a refactoring tool. It will be more things in the future. You should imagine it being a separate program that you run alongside Emacs, not inside Emacs.

The code won't be split to multiple packages, that would introduce too much overhead and honestly would serve little purpose.

@Fuco1 Fuco1 closed this as completed Jun 21, 2023
@phikal phikal changed the title Using less dependencies Using fewer dependencies Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants