Replace specialized tracker code in formatters with general APIs #385
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.
Each tracker came with a burden on each formatter that used it that it had to be called at special times and in special ways. This change leverages some recently introduced interfaces so the trackers can take care of most needs themselves, simplifying the job of the formatters.
This includes breaking API changes to the trackers, but we've already made such changes in 2.3, and on the same basis that we aren't aware of any external users of it, it seems like a reasonable opportunity to simplify it.
The$/progress notifications, sadly. When we treat $ /progress as just an ordinary method call it can be processed after the actual result from the method is received and its callback invoked, which creates a "lossy" progress report because any that are processed on the client after the result callback get dropped. So I ensure $/progress reporting happens directly from the formatter (as it was before) to avoid a significant change in behavior.
IProgress<T>
tracker still has one special requirement because of when cleanup happens relative to the