-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fixes two logging source gen bugs - when using "in" or "ref" modifier / when dealing with constraints #64593
Conversation
- Supports usage of "in" modifier - Improves support for generic constraints Fixes dotnet#58550, dotnet#62644
Tagging subscribers to this area: @dotnet/area-extensions-logging |
...ons/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorParserTests.cs
Outdated
Show resolved
Hide resolved
.../tests/Microsoft.Extensions.Logging.Generators.Tests/TestClasses/ConstaintsTestExtensions.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Parser.cs
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Logging.Abstractions/gen/LoggerMessageGenerator.Emitter.cs
Show resolved
Hide resolved
.../tests/Microsoft.Extensions.Logging.Generators.Tests/TestClasses/ConstaintsTestExtensions.cs
Show resolved
Hide resolved
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.
if the log method has ... out we would not support it and just give out the diagnostic
Is there a separate issue already tracking failing nicely for out
?
@@ -86,7 +86,7 @@ namespace {lc.Namespace} | |||
// loop until you find top level nested class | |||
while (parent != null) | |||
{ | |||
parentClasses.Add($"partial {parent.Keyword} {parent.Name} {parent.Constraints}"); | |||
parentClasses.Add($"partial {parent.Keyword} {parent.Name} "); |
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.
nit: you can probably remove the trailing space too
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.
No, but will create it UPDATE: created #64665 |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1786699177 |
… / when dealing with constraints (dotnet#64593) * Fixes some logging source gen bugs: - Supports usage of "in" modifier - Improves support for generic constraints Fixes dotnet#58550, dotnet#62644 * Apply PR feedback * Add another test
in
orref
modifierFixes #58550, #62644