Fix LSP false positive and diagnostic suppression due to imports resolution #8585
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.
Because
WaitingOnImportswere only checked once, if they are not in the stateisReadyduringtryUnblocktheprocessfunction would return and the build would continue as usual leaving them in limbo even after they are finally ready later on. Any remaining imports are now being checked later down the pipeline to be processed properly. This was essential for single threaded build which has no global queue so they were always forgotten.Credits to @Acepie for picking up on this.
This doesn't solve imports not being considered by the LSP, but the
WaitingOnImportswas causing other diagnostics to be suppressed as soon as the file contains a platform import. With that being fixed, the editor was still receivingUNDEFINED VARIABLEerrors for functions imported from platform. As a bandaid theUNDEFINED VARIABLEdiagnostic are now silence if they are referring to functions from a platform. This allow normal diagnostics to get through while preventing false positive.