[display] Config to disable populating cache from display requests #11224
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.
Since 7321f18, successful "full typing" display requests (which includes diagnostics, find references/implementations) can populate compilation server cache.
This can lead to some issues while this feature is not 100% working yet, like #11177 or #11184 (which would have a proper fix with #11220). Some projects might come across different issues or even do things differently in
#if display
(that would not impact diagnostics but would impact find references/implementations I think?) that could result in types that would not be suited for final generation.This PR adds a compilation server configuration to opt out of this, so default behavior is supposed to be left unchanged. I also added tests for above issues, commented out for now with default config (failing until #11220 is merged) and only running with custom config.
This configuration option can be useful as a workaround for such issues, for personal preferences (I'd personally take slow cache over corrupted cache) or for troubleshooting the source of an issue.
I will open a couple PRs on vshaxe / Haxe LSP to allow the configuration to be edited, if this is accepted.