Skip to content

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

Merged
ericstj merged 2 commits into
dotnet:release/6.0-rc2from
maryamariyan:cp-fs-namespace
Sep 17, 2021
Merged

[release/6.0] Fix Logging Source Generator to handle file-scoped namespaces (#57894)#59100
ericstj merged 2 commits into
dotnet:release/6.0-rc2from
maryamariyan:cp-fs-namespace

Conversation

@maryamariyan

@maryamariyanmaryamariyan commented Sep 14, 2021

Copy link
Copy Markdown
Contributor

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.
@maryamariyanmaryamariyan self-assigned this Sep 14, 2021
@ghost

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

@danmoseley updated with template in description

@maryamariyanmaryamariyan added the Servicing-consider Issue for next servicing release review label Sep 15, 2021
@danmoseleydanmoseley changed the title Handle file-scoped namespaces (#57894)[release/6.0] Fix Logging Source Generator to handle file-scoped namespaces (#57894)Sep 16, 2021
@danmoseleydanmoseley 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-rc2September 16, 2021 20:45
@danmoseley

Copy link
Copy Markdown
Contributor

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

@ericstj

Copy link
Copy Markdown
Member

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-rc2Sep 17, 2021
@ghostghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Extensions-LoggingServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@maryamariyan@danmoseley@ericstj@martincostello