Skip to content
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

[release/8.0] Emit interceptor info correctly when invocation expr is on separate line #91218

Merged
merged 4 commits into from
Aug 30, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 28, 2023

Backport of #91107 to release/8.0

/cc @layomia

Customer Impact

Fixes the following issue which users will definitely run into & expect to work.

Same line

Interceptor location is successfully parsed. Project compiles:

var optionsBuilder = services.AddOptions<AppSettings>().BindConfiguration(nameof(AppSettings));

var optionsBuilder = services
    .AddOptions<AppSettings>().BindConfiguration(nameof(AppSettings));

Different line

Parsed interceptor location is inaccurate. Compilation fails with a CSC interceptors error stating that the generated [InterceptsLocation] points to an invalid location.

var optionsBuilder = services.AddOptions<AppSettings>()
    .BindConfiguration(nameof(AppSettings));

var optionsBuilder = services
    .AddOptions<AppSettings>()
    .BindConfiguration(nameof(AppSettings));

Testing

Automated unit tests verify the fix for a wide range of permitted language syntax. Manually verified in showcase ASP.NET app.

Risk

Low. It's a small, contained fix for an off-by-default component.

@ghost
Copy link

ghost commented Aug 28, 2023

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

Issue Details

Backport of #91107 to release/8.0

/cc @layomia

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-Extensions-Configuration

Milestone: -

@layomia layomia self-assigned this Aug 28, 2023
@layomia layomia added the Servicing-consider Issue for next servicing release review label Aug 28, 2023
@layomia layomia added this to the 8.0.0 milestone Aug 28, 2023
@carlossanlop
Copy link
Member

@layomia this needs M2 approval. @ericstj or @jeffhandley do you approve?

* Add comments to binding gen tests for invocations on new lines

* Address feedback & test static method call syntax

* Reorganize and comment the newline/whitespace scenarios

* Reorganize and comment the newline/whitespace scenarios for ConfigurationExtensions

---------

Co-authored-by: Jeff Handley <[email protected]>
Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

This has my support for RC2. It fixes a bug in a new net8 feature, and we would service for this.

@carlossanlop carlossanlop added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 30, 2023
@layomia
Copy link
Contributor

layomia commented Aug 30, 2023

@carlossanlop pls help merge.

@carlossanlop carlossanlop merged commit 8ec6101 into release/8.0 Aug 30, 2023
107 of 108 checks passed
@carlossanlop carlossanlop deleted the backport/pr-91107-to-release/8.0 branch August 30, 2023 21:06
@radical radical mentioned this pull request Sep 26, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants