Emacs, ENSIME and SBT
Asked Answered
I

2

0

I'm running Emacs + ENSIME and using sbt in an emacs window (M-x term) to compile and run tests. Is there any way to click/select to jump to the failing tests? At the moment I have to scroll up a long way to find what failed, then open the right file and go to the line number. Seems likely there is an easier way.

(Long term eclipse user trying to convert to emacs for Scala)

Infundibulum answered 6/11, 2010 at 11:6 Comment(0)
B
4

You needn't install sbt.el: this functionality is built into ensime. Instead of running sbt in a shell, use

M-x ensime-sbt

This will find the project for the source file you are in and turn on the detection of error-messages automatically.

Burrus answered 6/2, 2011 at 3:5 Comment(0)
M
1

I'm not sure how Emacs+Ensime does it, but the following Emacs plugin for sbt can parse compiler error results, so clicking on the error message jumps to an appropriate position in the failing source file.

https://github.com/stevej/emacs/blob/master/support/sbt.el

I believe that failing tests do not produce information about the file and the line number (but this depends what kind of tests you're running). If they could, perhaps this plugin could work, or be augmented to work..

Mizell answered 8/11, 2010 at 9:18 Comment(1)
Nice plugin. Good point about the line number, I forgot that I only got the number from careful inspection of the stack trace.Infundibulum

© 2022 - 2024 — McMap. All rights reserved.