emacs-elsa / Elsa

Emacs Lisp Static Analyzer and gradual type system.
GNU General Public License v3.0
640 stars 26 forks source link

docs(README.md): Add another way to start Elsa with Eask #199

Closed jcs090218 closed 1 year ago

jcs090218 commented 1 year ago

This is a question rather than a request.

There are already two methods to start Elsa with Eask, and here is eask lint elsa ..., the easiest (IMO) way to start. Here are the pros and cos,

Pros

  1. Elsa will be installed before the linting process
  2. From Pt. 1, it's Easier for beginners
  3. Better UX overall

Cons

  1. People can get confuse with these many methods
  2. One more place to think while developing Elsa

WDYT? Would you consider to support this method? If the answer is YES, I would like to add test for this method as well. ;)

BTW, there is a bug with this method right now, but only occurs in snapshots (29.0.50 and 30.0.50). See the log https://github.com/emacs-eask/cli/actions/runs/4191637568. Let me know if you want me to open an issue for this!

Fuco1 commented 1 year ago

I find the lint interface nice because I can just do eask lint and there's a help output with all the possible linters. So adding Elsa there is definitely useful.

What is the cons 2.? What do we need to think about while developing Elsa itself? I think this is only Eask responsibility, no?

I think calling eask exec elsa... is a low-level entry point, for advanced users or for tools like flycheck. But in principle to lint the whole project, eask lint seems indeed like the best UX.

Fuco1 commented 1 year ago

BTW, I think I broke it :D elsa-analyse-file now takes two arguments, the file name and the global state object (you can create with (elsa-global-state).

In princple, you could reuse the global state object for multiple analyzed files, the missing dependencies will be added on the fly.

jcs090218 commented 1 year ago

Yes, is Eask responsibility. I was hoping some help or a notification when API changes, etc. 😁

BTW, I think I broke it :D elsa-analyse-file now takes two arguments, the file name and the global state object (you can create with (elsa-global-state).

This is an example I wish Elsa can notify me. 😅 It's good, I can keep an eye on it when it breaks! 😉

Fuco1 commented 1 year ago

Yea, sorry about that. Things are still bound to change from time to time.