Hey everybody, the compiler actually knows a lot more about errors than it tells you, especially when using the http_sophia
it’s often thin-lipped and the reported lines and columns semantically not always match with where the mistake is actually occurring. Also, the error is not really well parsable as of for now, unless you like using regex for parsing error strings
This is the error format I would like to propose, is there anything missing? What would you like to have added?
{
"file": "MyContract.aes",
"contract": "someContract",
"startLine": "42",
"startColumn": "42",
"endLine": "42", // if applicable
"endColumn": "42", // if applicable
"errorCode": "1",
"message": "Forbidden token - only Ulf Norell is allowed to use virtual semicolons",
"quickfix": "Use a real semicolon instead"
}
About the quickfix: There already some quite intelligent suggestions happening in the cli version of the compiler, like telling you how to edit your code to adhere to the newer sophia syntax using entrypoints. So if there is something available for that, we might break the quickfix property down further into an array of further issue
objects like the one above.
What do you think ?