Skip to content

Fixes two logging source gen bugs - when using "in" or "ref" modifier / when dealing with constraints - #64593

Merged
maryamariyan merged 3 commits into
dotnet:mainfrom
maryamariyan:two-fixes
Feb 2, 2022
Merged

Fixes two logging source gen bugs - when using "in" or "ref" modifier / when dealing with constraints#64593
maryamariyan merged 3 commits into
dotnet:mainfrom
maryamariyan:two-fixes

Conversation

@maryamariyan

@maryamariyanmaryamariyan commented Feb 1, 2022

Copy link
Copy Markdown
Contributor
  • Supports usage of in or ref modifier
  • Improves support for generic constraints

Fixes#58550, #62644

- Supports usage of "in" modifier
- Improves support for generic constraints
Fixesdotnet#58550, dotnet#62644
@ghost

ghost commented Feb 1, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-extensions-logging
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Supports usage of "in" modifier
  • Improves support for generic constraints

Fixes #58550, #62644

Author:maryamariyan
Assignees:-
Labels:

area-Extensions-Logging

Milestone:-

@maryamariyanmaryamariyan changed the title Fixes two logging source gen bugs, when using "in" modifier and when dealing with constraintsFixes two logging source gen bugs - when using "in" modifier / when dealing with constraintsFeb 1, 2022
@maryamariyanmaryamariyan changed the title Fixes two logging source gen bugs - when using "in" modifier / when dealing with constraintsFixes two logging source gen bugs - when using "in" or "ref" modifier / when dealing with constraintsFeb 1, 2022

@elinor-fungelinor-fung left a comment

Copy link
Copy Markdown
Member

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?

while (parent != null)
{
parentClasses.Add($"partial {parent.Keyword} {parent.Name} {parent.Constraints}");
parentClasses.Add($"partial {parent.Keyword} {parent.Name} ");

Copy link
Copy Markdown
Member

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

@maryamariyanmaryamariyanFeb 2, 2022

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

will fix in the next PR


UPDATE: created #64666

@maryamariyan

maryamariyan commented Feb 2, 2022

Copy link
Copy Markdown
ContributorAuthor

Is there a separate issue already tracking failing nicely for out?

No, but will create it


UPDATE: created #64665

@maryamariyan

Copy link
Copy Markdown
ContributorAuthor

Failures in CI seem unrelated and I also seen them in #64573 and #64641

@maryamariyan

Copy link
Copy Markdown
ContributorAuthor

/backport to release/6.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1786699177

maryamariyan added a commit to maryamariyan/runtime that referenced this pull request Feb 4, 2022
… / when dealing with constraints (dotnet#64593)
* Fixes some logging source gen bugs:
- Supports usage of "in" modifier
- Improves support for generic constraints
Fixesdotnet#58550, dotnet#62644
* Apply PR feedback
* Add another test
@ghostghost locked as resolved and limited conversation to collaborators Mar 5, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logging Source Generator fails to compile due to CS0246 and CS0265 errors if type for generic constraint is in a different namespace

6 participants

@maryamariyan@stephentoub@eerhardt@ericstj@tarekgh@elinor-fung