- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Compiler error reporting in Eclipse SDT
Sat, 2010-03-20, 07:18
IMO Eclipse's "Problems View", where Scala compiler errors are reported, is itself a problem.
It allocates a single-line, non-scrollable table cell in which to report each error message. Probably sufficient to report the simple errors of the pre-generics Java that existed when that part of Eclipse was designed. But Scala's richer, deeper type system inevitably results in richer, deeper compiler errors, not infrequently exceeding 200 chars in length. The default Problems UI is simply not designed to, nor capable of, reporting these effectively. I end up copying them into a text buffer just so I can read them in full.
In terms of how it "ought to work", perhaps the ideal would be to keep within Problems view, for Java & other tool interop, but modify it to support multi-line cells, that would wrap error text rather than truncating it. Ive no idea how feasible that kind of mod is; Im guessing it'd need some AOP interception to do.
Alternately, it could be treated as an Eclipse, and not SDT, issue, since its affects any plugin that emits lengthy problem messages. Getting things changed in Eclipse core can be a very slow and chancy process, however, from what Ive seen.
No easy options...
-Ben
It allocates a single-line, non-scrollable table cell in which to report each error message. Probably sufficient to report the simple errors of the pre-generics Java that existed when that part of Eclipse was designed. But Scala's richer, deeper type system inevitably results in richer, deeper compiler errors, not infrequently exceeding 200 chars in length. The default Problems UI is simply not designed to, nor capable of, reporting these effectively. I end up copying them into a text buffer just so I can read them in full.
In terms of how it "ought to work", perhaps the ideal would be to keep within Problems view, for Java & other tool interop, but modify it to support multi-line cells, that would wrap error text rather than truncating it. Ive no idea how feasible that kind of mod is; Im guessing it'd need some AOP interception to do.
Alternately, it could be treated as an Eclipse, and not SDT, issue, since its affects any plugin that emits lengthy problem messages. Getting things changed in Eclipse core can be a very slow and chancy process, however, from what Ive seen.
No easy options...
-Ben
Sat, 2010-03-20, 11:17
#2
Re: Compiler error reporting in Eclipse SDT
Ben Hutchison writes:
> IMO Eclipse's "Problems View", where Scala compiler errors are reported, is
> itself a problem.
>
> It allocates a single-line, non-scrollable table cell in which to report
> each error message. Probably sufficient to report the simple errors of the
> pre-generics Java that existed when that part of Eclipse was designed. But
> Scala's richer, deeper type system inevitably results in richer, deeper
> compiler errors, not infrequently exceeding 200 chars in length. The default
> Problems UI is simply not designed to, nor capable of, reporting these
> effectively. I end up copying them into a text buffer just so I can read
> them in full.
>
> In terms of how it "ought to work", perhaps the ideal would be to keep
> within Problems view, for Java & other tool interop, but modify it to
> support multi-line cells, that would wrap error text rather than truncating
> it. Ive no idea how feasible that kind of mod is; Im guessing it'd need some
> AOP interception to do.
>
> Alternately, it could be treated as an Eclipse, and not SDT, issue, since
> its affects any plugin that emits lengthy problem messages. Getting things
> changed in Eclipse core can be a very slow and chancy process, however, from
> what Ive seen.
>
> No easy options...
I agree this is a problem. My workaround is to locate the error in the
source file. The tooltips displayed on the error marker (red cross in
the left margin) shows the complete error message.....
/Jeppe
Sat, 2010-03-20, 11:27
#3
Re: Compiler error reporting in Eclipse SDT
On Sat, Mar 20, 2010 at 10:16 AM, Jeppe Nejsum Madsen wrote:
> I agree this is a problem. My workaround is to locate the error in the
> source file. The tooltips displayed on the error marker (red cross in
> the left margin) shows the complete error message.....
Even though this works at times, one issue with this is that the
presentation compiler and build compiler don't always agree. The
Problems View is more reliable as it shows the output of the build
compiler so it would be good if it had a tooltip too.
Best,
Ismael
Sat, 2010-03-20, 15:17
#4
Re: Compiler error reporting in Eclipse SDT
On Sat, Mar 20, 2010 at 7:00 PM, Ismael Juma <mlists@juma.me.uk> wrote:
Rather than a tooltip hover, what something like Show In Error Detail View, a really simple wrapped Text View?
My problem with hovers is simply that you cannot navigate around source And view the error at the same time. To understand some complex Scala errors can often involve looking at several inter-locking pieces of code. With tooltip hovers, one needs to store the the error in your head while navigating around, and keep checking back to it.
-Ben
I think the easy option is to show the text in a multi-line tooltip
when someone hovers over it. Not a full fix, but it would help a lot.
Rather than a tooltip hover, what something like Show In Error Detail View, a really simple wrapped Text View?
My problem with hovers is simply that you cannot navigate around source And view the error at the same time. To understand some complex Scala errors can often involve looking at several inter-locking pieces of code. With tooltip hovers, one needs to store the the error in your head while navigating around, and keep checking back to it.
-Ben
Sat, 2010-03-20, 15:27
#5
Re: Compiler error reporting in Eclipse SDT
It has to be a tooltip that can be brought to focus and selected (I think those are the ones that say "press F2 for focus"), because sometimes those error messages need to be shown to other people, and I know I won't transcribe them.
David
On 2010-03-20, at 4:00 AM, Ismael Juma wrote:
> On Sat, Mar 20, 2010 at 6:18 AM, Ben Hutchison wrote:
>> It allocates a single-line, non-scrollable table cell in which to report
>> each error message. Probably sufficient to report the simple errors of the
>> pre-generics Java that existed when that part of Eclipse was designed. But
>> Scala's richer, deeper type system inevitably results in richer, deeper
>> compiler errors, not infrequently exceeding 200 chars in length. The default
>> Problems UI is simply not designed to, nor capable of, reporting these
>> effectively. I end up copying them into a text buffer just so I can read
>> them in full.
>
> I've had this issue too. If you select the error, it's also shown in
> the status bar, which helps a little.
>
>> No easy options...
>
> I think the easy option is to show the text in a multi-line tooltip
> when someone hovers over it. Not a full fix, but it would help a lot.
>
> Best,
> Ismael
Sat, 2010-03-20, 22:57
#6
Re: Compiler error reporting in Eclipse SDT
On Sat, Mar 20, 2010 at 3:24 AM, Ismael Juma wrote:
> On Sat, Mar 20, 2010 at 10:16 AM, Jeppe Nejsum Madsen wrote:
>> I agree this is a problem. My workaround is to locate the error in the
>> source file. The tooltips displayed on the error marker (red cross in
>> the left margin) shows the complete error message.....
>
> Even though this works at times, one issue with this is that the
> presentation compiler and build compiler don't always agree.
That, IMO, is a far bigger problem ... please report every instance of
this that you see. Thanks.
Point taken about the other issue, tho': could someone open an
enhancement ticket for it in Trac ... would be lovely if there was a
patch attached (I like Ismael's tooltip suggestion best).
Cheers,
Miles
Sun, 2010-03-21, 09:57
#7
Re: Compiler error reporting in Eclipse SDT
On Sat, Mar 20, 2010 at 9:48 PM, Miles Sabin wrote:
> That, IMO, is a far bigger problem ... please report every instance of
> this that you see. Thanks.
Sure. There have been many fixes in trunk in this area and I haven't
moved to that yet (a bit of work to recompile all Scala dependencies).
With the RC near, seems like a good time to move and then I'll report
any issues of that type that I still see (if any).
Best,
Ismael
Mon, 2010-03-22, 04:07
#8
Re: Compiler error reporting in Eclipse SDT
On Sun, Mar 21, 2010 at 8:48 AM, Miles Sabin <miles@milessabin.com> wrote:
Done.
https://lampsvn.epfl.ch/trac/scala/ticket/3200
But no patch... yet. I'll try to implement it, doesn't seem particularly hard, although a View is my preference over hovers.
-Ben
Point taken about the other issue, tho': could someone open an
enhancement ticket for it in Trac ... would be lovely if there was a
patch attached (I like Ismael's tooltip suggestion best).
Done.
https://lampsvn.epfl.ch/trac/scala/ticket/3200
But no patch... yet. I'll try to implement it, doesn't seem particularly hard, although a View is my preference over hovers.
-Ben
On Sat, Mar 20, 2010 at 6:18 AM, Ben Hutchison wrote:
> It allocates a single-line, non-scrollable table cell in which to report
> each error message. Probably sufficient to report the simple errors of the
> pre-generics Java that existed when that part of Eclipse was designed. But
> Scala's richer, deeper type system inevitably results in richer, deeper
> compiler errors, not infrequently exceeding 200 chars in length. The default
> Problems UI is simply not designed to, nor capable of, reporting these
> effectively. I end up copying them into a text buffer just so I can read
> them in full.
I've had this issue too. If you select the error, it's also shown in
the status bar, which helps a little.
> No easy options...
I think the easy option is to show the text in a multi-line tooltip
when someone hovers over it. Not a full fix, but it would help a lot.
Best,
Ismael