Skip to content

Conversation

@davidwengier
Copy link
Member

@davidwengier davidwengier commented Oct 8, 2025

Found this when running our integration tests locally. I've never see the Debug.Fail in real life, and it didn't break the scenario the integration tests were testing, but they failed at the end because they detected that a Debug.Fail had 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.

@davidwengier davidwengier requested a review from a team as a code owner October 8, 2025 07:55
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);
Copy link
Member Author

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 :)

Copy link
Contributor

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.

Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants