haxe
haxe copied to clipboard
Compiler error messages
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?
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?
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).
Changing this would probably break every IDE out there.
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
Also pretty errors solve this problem I think, and are now enabled by default.