Make DocumentationCommentCompiler work after NormalizeWhitespace#47360
Make DocumentationCommentCompiler work after NormalizeWhitespace#47360jcouv merged 6 commits intodotnet:mainfrom
Conversation
fd38951 to
f8d7628
Compare
f8d7628 to
ba3374e
Compare
|
When I look at the binlog of one of the failing builds, I see: I already encountered that assert in #47363, but I don't understand why it would be triggered by this PR. |
You're changing DocumentationCommentCompiler.WriteFormattedSingleLineComment, and the crash is in DocumentationCommentCompiler. So is it possible you've broken an invariant and are now causing a crash? |
8759181 to
e015bed
Compare
e015bed to
365bf00
Compare
|
@CyrusNajmabadi You're right, it was an ordinary bug in my code. I think what confused me is that it caused build error when the compiler compiles itself. The current CI failure seems unrelated to this PR: |
Please add a test that hits this bug so we can avoid having to actually build the compiler to validate it in the future :) |
|
@333fred Those tests already exist. For example, see this failure, where that bug incorrectly caused:
So I think additional tests for this are not necessary. |
src/Compilers/CSharp/Test/Syntax/LexicalAndXml/XmlDocCommentTests.cs
Outdated
Show resolved
Hide resolved
98783bb to
e6c5bf1
Compare
5c45f3e to
ec4a8fe
Compare
|
@dotnet/roslyn-compiler for a second review. |
Youssef1313
left a comment
There was a problem hiding this comment.
From the linked issue:
It seems the call to NormalizeWhitespace() somehow turns the tree into a shape that is not supported by DocumentationCommentCompiler.
Shouldn't the fix be in NormalizeWhitespace so it produces a correct tree?
|
@dotnet/roslyn-compiler for a second review of this community PR please. |
|
Merged/squashed. Thanks! |
|
Sorry, I didn't catch that the CI results were old. So this caused a build break when merged. Feel free to revert the revert commit in a new PR, merge with recent bits from main branch and submit again. Thanks |
| var text = @"namespace Foo | ||
| { | ||
| /// <summary> | ||
| /// This is Foo.Bar |
There was a problem hiding this comment.
Foo [](start = 16, length = 3)
"Foo" is getting flagged by policheck. Please remove usages of this word. from the tests.
Fixes #47278.