hvesalai / emacs-sbt-mode

An emacs mode for interacting with scala sbt and projects
GNU General Public License v3.0
126 stars 38 forks source link

sbt-hydra `testQuick` support #145

Closed logc closed 6 years ago

logc commented 6 years ago

The Ensime.github.io web warns against using ~test on a buffer running the sbt shell:

However, you should consider using the more granular and lightweight commands of ENSIME to trigger actions interactively (...). Triggered execution in sbt uses filesystem polling which is shown to be inefficient and expensive to use, especially on a large codebase. -- https://ensime.github.io/editors/emacs/sbt-mode/

I can see how to run test or testOnly from the hydra, but I do not see support for testQuick. Having that command triggered on file save is my preferred development workflow. Is there actually a way to use this?

VlachJosef commented 6 years ago

@logc Adding testQuick to hydra is straightforward. Do you wanna to give it a try? If not I will add it.

logc commented 6 years ago

I would love to give it a try, but I really would need some hints. I do not know much of emacs-lisp, or emacs development in general ...

VlachJosef commented 6 years ago

By look at https://github.com/ensime/emacs-sbt-mode/pull/146/commits/4ec391502702b2e9c852295d490eb96c84ee4564 you can see that adding new commands to hydra is pretty easy.

You may find it convenient to extends hydra with any other command of yours which you are using frequently just for your personal usage. I do that pretty frequently.

logc commented 6 years ago

Thanks! I may not do that right away, but the commit is a great reference for later on ... 😄