Only reload contents of client-side file after compilation if compilation changed the file #1575
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.
This PR modifies the post-compile reloading of client-side files to only occur if compilation changed the file's contents (for example, modifying the Storage). The current behavior always reloads the file's contents. This is rarely necessary and leads to a bunch of extra REST requests and file system events.
Created this as a draft because while it's an improvement architecturally, I'm not sure if it necessarily improves UX. The reloading will replace the contents of classes with the contents in the server "canonical" form. Even when not necessarily functionally, some users may want this enforced to avoid larger source control diffs when the class does actually need to be reloaded due to compilation.