[FIX] Fixes skip faulty warning being shown #4564
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When the server takes too long to respond to a
/parse
request, the front-end assumes that this must be because it is recompiling the program after finding errors, due to this code inapp.ts
This essentially means: wait for 500 ms for response, if it answers before you don't execute the function and hides any possible errors. I changed that and now we only show the warning box if we find errors we skipped in the source map. This means that we are not relying on the response time of the server, and will reliably show the warning.
I changed also the wording of the warning and now it says this: "You made a mistake! Don't worry, we still ran the program". However, @Felienne can you tell me if this is a good wording, I'm not sure this is clear enough.
How to test
Easiest way to reproduce is:
/parse
endpointDepends-On: #4560