Robin Green
Robin Green

Reputation: 33033

Omit package names in Scala compilation errors

Our package names are quite long, and when you include the fact that there can be multiple type parameters in types mentioned in a type mismatch error, some of the compilation errors I get from scalac can be quite long, and it is annoying having to mentally skip over the package names in the error messages.

Ideally I would like all identifiers to be displayed in the same way as they are in the corresponding source file (i.e. qualified if they are qualified, just simple names if they are not) but I realise this is probably too hard to achieve. So I would settle for just the option to hide the package names.

I use ENSIME so it would be nice to be able to hide/show package names in compilation errors in ENSIME.

Upvotes: 3

Views: 92

Answers (1)

Rex Kerr
Rex Kerr

Reputation: 167871

You need package names to avoid nonsense like

error: type mismatch
found   : Iterable[Int]
expected: Iterable[Int]

As an option, it sounds like it could be convenient. A patch would have a decent chance of being accepted, I expect.

Upvotes: 1

Related Questions