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

[Binding SG] Removed deprecated InterceptsLocationAttribute #27145

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

jkurdek
Copy link
Member

@jkurdek jkurdek commented Jan 15, 2025

Description of Change

Roslyn team marked Interceptors as stable and started deprecating old APIs dotnet/roslyn#76312. This PR updates the InterceptsLocationAttribute to use the overload recommend by the Roslyn team.

This PR attempts to reduce the dependence on the new API in order to minimize visible impact to customers and make bumping version of the API in the future easy.

Issues Fixed #27144

@jkurdek jkurdek added this to the .NET 10 Planning milestone Jan 15, 2025
@jkurdek jkurdek requested a review from simonrozsival January 15, 2025 12:12
@jkurdek jkurdek self-assigned this Jan 15, 2025
@Copilot Copilot bot review requested due to automatic review settings January 15, 2025 12:12
@jkurdek jkurdek requested a review from a team as a code owner January 15, 2025 12:12
@jkurdek jkurdek added the area-xaml XAML, CSS, Triggers, Behaviors label Jan 15, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 12 changed files in this pull request and generated 3 comments.

Files not reviewed (7)
  • src/Controls/src/BindingSourceGen/Controls.BindingSourceGen.csproj: Language not supported
  • src/Controls/tests/BindingSourceGen.UnitTests/Controls.BindingSourceGen.UnitTests.csproj: Language not supported
  • src/Controls/tests/BindingSourceGen.UnitTests/BindingRepresentationGenTests.cs: Evaluated as low risk
  • src/Controls/tests/BindingSourceGen.UnitTests/IntegrationTests.cs: Evaluated as low risk
  • src/Controls/tests/BindingSourceGen.UnitTests/BindingTransformerTests.cs: Evaluated as low risk
  • src/Controls/tests/BindingSourceGen.UnitTests/IncrementalGenerationTests.cs: Evaluated as low risk
  • src/Controls/tests/BindingSourceGen.UnitTests/BindingCodeWriterTests.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)

src/Controls/src/BindingSourceGen/BindingSourceGenerator.cs:44

  • [nitpick] The variable name 'location' is ambiguous. It should be renamed to 'simpleLocation'.
var location = binding.SimpleLocation;

@jkurdek jkurdek force-pushed the fix-binding-sg-location-attribute branch from 38e0713 to 7c5553b Compare January 15, 2025 15:30
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

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

dotnet/roslyn is making some API changes for [InterceptsLocationAttribute], so we need to make changes here to react.

We are suppressing CS9270 for .NET 10:

So, after this is merged we will also need to take these changes to the net10.0 branch.

Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

Tested and made sure this fixes the build errors I was seeing with 9.0.200

@jonathanpeppers jonathanpeppers enabled auto-merge (squash) January 23, 2025 21:47
@PureWeen PureWeen disabled auto-merge January 24, 2025 16:10
@PureWeen PureWeen merged commit 58f7227 into dotnet:main Jan 24, 2025
100 of 104 checks passed
jonathanpeppers pushed a commit that referenced this pull request Jan 28, 2025
Fixes: #27315

Backport of #27145 for .NET 10.

* [Binding SG] Updated InterceptsLocationAttribute

* Added System.Diagnostics.Conditional attribute
rmarinho pushed a commit that referenced this pull request Jan 28, 2025
…e` (#27408)

* [Binding SG] Removed deprecated `InterceptsLocationAttribute` (#27145)

Fixes: #27315

Backport of #27145 for .NET 10.

* [Binding SG] Updated InterceptsLocationAttribute

* Added System.Diagnostics.Conditional attribute

* Restore `#pragma warning disable RSEXPERIMENTAL002`

---------

Co-authored-by: Jeremi Kurdek <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Feb 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-xaml XAML, CSS, Triggers, Behaviors
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Binding SG] Use recommended InterceptsLocationAttribute API
4 participants