-
Notifications
You must be signed in to change notification settings - Fork 221
Allow publishing to fail, and just report that we're not synchronized #12301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| public async Task PublishAsync(TextDocument document, SynchronizationResult synchronizationResult, string htmlText, CancellationToken cancellationToken) | ||
| public async Task<bool> PublishAsync(TextDocument document, ChecksumWrapper checksum, string htmlText, CancellationToken cancellationToken) | ||
| { | ||
| Assumed.True(synchronizationResult.Synchronized); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the only thing that used the Synchronized field of the passed in result, and the passed in result always hardcoded it to true.
Sometimes it's not good to look back at your past code :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I experience this a lot, but I just consider PreviousTodd as a completely different idiot than current Todd.
...Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/HtmlDocumentPublisher.cs
Outdated
Show resolved
Hide resolved
ToddGrun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
Found this when running our integration tests locally. I've never see the
Debug.Failin real life, and it didn't break the scenario the integration tests were testing, but they failed at the end because they detected that aDebug.Failhad occurred 🤦♂️I think when I originally wrote this might have been before we had synchronization or something, because looking at the code I couldn't see why we would fail and just let Html go stale, rather than just returning false, not synchronizing, and let each feature deal with "the Html LSP request didn't work" in whatever way is best for them.