Skip to content

[release/6.0] Fix Logging Source Generator to handle file-scoped namespaces (#57894) #59100

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

Merged
merged 2 commits into from
Sep 17, 2021

Conversation

maryamariyan
Copy link
Member

@maryamariyan maryamariyan commented Sep 14, 2021

PR Content

Cherry pick of PR #57894
Relates to #57880.

The feedback expressed in #57894 (comment) improves the fix in main branch but we have as-is should be sufficient for release branch.

Customer Impact

Logging Source Generator fails to compile due to CS8795 error with file-scoped namespaces.
The fix will handle usages of file-scoped namespaces for logging method.

Testing

Included in PR

Risk

Low, since file-scoped namespace is a C#10 feature (check here) and the logging source generator is a 6.0 feature and this fix is concerned with these two new features used in combination.

/cc @danmoseley for M2 approval

Handle namespace not being emitted when file-scoped
namespaces are used for a log class.
Relates to dotnet#57880.
@maryamariyan maryamariyan self-assigned this Sep 14, 2021
@ghost
Copy link

ghost commented Sep 14, 2021

Tagging subscribers to this area: @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

Handle namespace not being emitted when file-scoped
namespaces are used for a log class.
Relates to #57880.

cherry pick of PR #57894
we can either take this or I look at feedback expressed on #57894 (comment) to improve this.

/cc @danmoseley for M2 approval

Author: maryamariyan
Assignees: maryamariyan
Labels:

area-Extensions-Logging

Milestone: -

@danmoseley
Copy link
Member

As noted offline please take the time to do the right fix (you mentioned possibly making more changes)

this will also need a template filled out.

@maryamariyan
Copy link
Member Author

@danmoseley updated with template in description

@maryamariyan maryamariyan added the Servicing-consider Issue for next servicing release review label Sep 15, 2021
@danmoseley danmoseley changed the title Handle file-scoped namespaces (#57894) [release/6.0] Fix Logging Source Generator to handle file-scoped namespaces (#57894) Sep 16, 2021
@danmoseley danmoseley added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 16, 2021
@danmoseley danmoseley changed the base branch from release/6.0 to release/6.0-rc2 September 16, 2021 20:45
@danmoseley
Copy link
Member

@maryamariyan there are real build breaks here. could you please take a look?

@ericstj
Copy link
Member

ericstj commented Sep 17, 2021

Right these changes are because @eerhardt made changes later in his source generator refactoring but didn't include those when ported to release/6.0. Order in main was M > E, order in release is E > M. @maryamariyan mentioned she was going to port the part of @eerhardt's change that was missed.

@ericstj ericstj merged commit 3b921ef into dotnet:release/6.0-rc2 Sep 17, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-Logging Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants