Use new [Interceptable] ctor for source gen#104180
Merged
steveharter merged 8 commits intodotnet:mainfrom Jul 10, 2024
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-extensions-configuration |
tarekgh
reviewed
Jul 2, 2024
src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.cs
Outdated
Show resolved
Hide resolved
tarekgh
reviewed
Jul 2, 2024
| int? interceptableVersion = null; | ||
|
|
||
| #if UPDATE_BASELINES | ||
| const string envVarName = "InterceptableAttributeVersion"; |
Member
Contributor
Author
There was a problem hiding this comment.
Just here. I removed the const and just inlined the string.
tarekgh
reviewed
Jul 2, 2024
src/libraries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.cs
Show resolved
Hide resolved
tarekgh
reviewed
Jul 2, 2024
...aries/Microsoft.Extensions.Configuration.Binder/gen/ConfigurationBindingGenerator.Emitter.cs
Outdated
Show resolved
Hide resolved
tarekgh
reviewed
Jul 2, 2024
| <AnalyzerLanguage>cs</AnalyzerLanguage> | ||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
| <DefineConstants Condition="'$(LaunchDebugger)' == 'true'">$(DefineConstants);LAUNCH_DEBUGGER</DefineConstants> | ||
| <DefineConstants Condition="'$(UpdateBaselines)' == 'true'">$(DefineConstants);UPDATE_BASELINES</DefineConstants> |
Member
tarekgh
approved these changes
Jul 2, 2024
Member
tarekgh
left a comment
There was a problem hiding this comment.
Left minor comments, LGTM otherwise.
We need to decide if we continue to go with the environment variable. Will be good if @RikkiGibson look too. Thanks!
matouskozak
added a commit
to matouskozak/runtime
that referenced
this pull request
Jul 11, 2024
This reverts commit 0413759.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #101079
This changes the use of the experimental
[Interceptable]attribute to use the newer version provided by Roslyn.This affects the test baselines, and depending on the environment there may be an older Roslyn present, so both the original and the new baselines are in this PR. See the linked issue as well as the
ReadMe.mdfile in the changed files here to get more information.To avoid breaking v8, this PR will eventually need to be ported to v8 since the original version of the attribute will eventually no longer be supported. It may be possible to only have the newer baseline for v9, however both are included here, and the plan is to essentially port this PR as-is to v8. Once the original version is no longer necessary, we can remove the "version 0" baselines and perhaps the infrastructure for having two baselines, assuming at that time Rosyln has no plans to add a third version.