-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Bug fix issue 30351 #46436
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
Bug fix issue 30351 #46436
Conversation
Added failing unit tests that demonstrate Issue dotnet#30351 with the IndentedTextWriter.
Added overrides for async methods on IndentedTextWriter that call the respective async methods on the underlying TextWriter. Fix dotnet#30351
|
Tagging subscribers to this area: @buyaa-n, @krwq Issue DetailsThis fixes issue 30351. I noticed there weren't any unit tests for System.CodeDom.IndentedTextWriter, so I went ahead and added those as well.
|
I can fix issue dotnet#30351 without modifying the API of IndentedTextWriter. Fix dotnet#30351
Apparently some of the CI tests run on a machine in a locale where commas are used as the decimal point. This caused some unit tests to fail. I've changed those tests to use the invariant culture. Fix issue dotnet#30351
src/libraries/System.Private.CoreLib/src/System/CodeDom/Compiler/IndentedTextWriter.cs
Show resolved
Hide resolved
src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/IndentedTextWriterTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.CodeDom/tests/System/CodeDom/Compiler/IndentedTextWriterTests.cs
Outdated
Show resolved
Hide resolved
Corrected errors in refs. Added a unit test for parameterless WriteLineAsync method. Cleaned up unit test with pointless interpolated string.
|
Commenter does not have sufficient privileges for PR 46436 in repo dotnet/runtime |
VS made useless changes to System.Runtime.sln file.
|
Thank you @NewellClark, the PR looks good to me, i have 2 questions for @stephentoub and @carlossanlop
|
I have just a few comments:
|
Sorry for late response @NewellClark, I was in doubt if its need to go through API review, in general all APIs added to ref should, but it is just adding missing overloads not adding anything new. I talk with @stephentoub offline and confirmed we don't need API review here
That is good point, those are also looks like missing implementation, as synchronous versions already in the ref
Yeah it is confusing, from namespace i would think it is related to |
|
@buyaa-n Sounds good. I'll move the tests to |
- Added OutputTabsAsync() - Added WriteLineNoTabsAsync(string)
buyaa-n
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.
Thank you very much @NewellClark, looks good to me, lets wait for System.IO area owner @carlossanlop's review/approval
src/libraries/System.Private.CoreLib/src/System/CodeDom/Compiler/IndentedTextWriter.cs
Show resolved
Hide resolved
carlossanlop
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.
Looks good. I left a few suggestions for you to consider. Please add documentation so it can be approved.
|
@carlossanlop I've implemented your suggested changes. |
|
Thank you @NewellClark, we can merge it now |
This fixes issue 30351. I noticed there weren't any unit tests for System.CodeDom.IndentedTextWriter, so I went ahead and added those as well.