haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Compiler error messages

Open mockey opened this issue 6 years ago • 4 comments

The character columns are only displayed sometimes in the error messages. I get messages like: src/Video.hx:98: characters 7-43 : Void -> Void should be Null<js.lib.PromiseHandler<Void, Unknown<0>>> with columns and messages like: src//Layer.hx:116: lines 116-118 : Void -> Void should be Null<js.lib.PromiseHandler<Unknown<0>, Unknown<1>>> with line numbers instead. Was it always like this or is this something new? I see that for the second error the function causing it runs over 3 lines, like:

func(
  arg1, arg2, arg3
)

so the error message sort of makes sense, but having no columns at all is not so good. Wouldn't it be possible to always have start line and start column for an error?

mockey avatar Jun 21 '19 14:06 mockey

It was always only lines if the error position is not on single line.

Still, could you provide a reproducible example of your error so we can check if the reported position is accurate?

nadako avatar Jun 21 '19 14:06 nadako

It was always only lines if the error position is not on single line.

I noticed it for the first time. Maybe I didn't have much functions over multiple lines, functions in promises take some space...

Still, could you provide a reproducible example of your error so we can check if the reported position is accurate?

The position is accurate, lines 116-118 are correct. It only would be nice to always have the start position (column).

mockey avatar Jun 21 '19 15:06 mockey

Changing this would probably break every IDE out there.

Simn avatar Aug 06 '19 12:08 Simn

This is (very) arguably solved by message.absolute-positions ... which vscode should probably be using in the background alongside message.reporting=ident to display exact positions

kLabz avatar Feb 06 '24 08:02 kLabz

Also pretty errors solve this problem I think, and are now enabled by default.

kLabz avatar Jul 19 '24 20:07 kLabz