Skip to content
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

Remove razor source generator hack #74651

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Conversation

chsienki
Copy link
Contributor

@chsienki chsienki commented Aug 5, 2024

A while back we added a razor specific hack to remove any documents the razor SG generated. Razor is supposed to be able to operate in a 'suppressed' mode where it doesn't produce anything, but a bug in the generator meant it wasn't respecting that flag. Rather than trying to service the SDK we took a tactical hack to just remove the docs in Roslyn.

We're now at the point in razor co-hosting where we want razor to produce documents, but this hack of course just removes them. The razor SG is no longer loaded out of the SDK, but comes from tooling, where the suppression has been fixed, so this hack is no longer required anyway.

@chsienki chsienki requested a review from a team as a code owner August 5, 2024 17:54
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Aug 5, 2024
@@ -282,7 +282,7 @@ private partial class RegularCompilationTracker : ICompilationTracker
if (compilationWithStaleGeneratedTrees != null)
{
var generatedTreeCount =
runResult.Results.Sum(r => IsGeneratorRunResultToIgnore(r) ? 0 : r.GeneratedSources.Length);
runResult.Results.Sum(r => r.GeneratedSources.IsDefaultOrEmpty ? 0 : r.GeneratedSources.Length);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is another case of the bug that was fixed here: #74507

@chsienki
Copy link
Contributor Author

chsienki commented Aug 5, 2024

@dotnet/roslyn-ide for review please :)

Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

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

yaay. i always found this code impossible to understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants