oracc / nisaba

GNU General Public License v3.0
3 stars 0 forks source link

Display validation results #53

Closed ageorgou closed 3 years ago

ageorgou commented 3 years ago

Addresses #29. Have commented out the communication with the server temporarily so we can use the mock result.

This

giordano commented 3 years ago

Slightly related to this pull request, in https://github.com/oracc/nisaba/blob/beb2642cc9b5a5a9d8b8553b4fa74fbdb1b2b1e9/src/client/server_result.ts#L77 can we write instead

`${real-file-path}:${line_num}: ${error_msg}.`

(as long as we can get the real path of the local ATF in a sane way)? In this way the file:line will be clickable, matching the behaviour in Nammu.

giordano commented 3 years ago

Clicking on the validate button multiple times I get this error message:

image

I don't see the failure the first time I click on it the first time in a session. I'm trying to figure out what's the problem, but to no avail so far

Edit: after some debugging with Anastasis, we found the culprit: the output channel was stealing focus after clicking the validation button, so when clicking again on the button the output channel would be the active text editor, and editor.document.lineAt(43) would fail because there are not enough lines in the output channel. The solution was to not make the output channel steal focus in our logger

ageorgou commented 3 years ago

I've left the mock result in so that it at least does something! I was planning to work on getting the real ones soon, but I can add that part back in (uncomment the server communication).