Skip to content

Conversation

@KevinRansom
Copy link
Contributor

@KevinRansom KevinRansom commented Feb 10, 2023

We recently encountered issues with IsReadOnlyAttribute on unsupported platforms

This PR, will generate one when the targeted platform does not support IsReadOnlyAttribute ... particularly netstandard2.0

Todo:

  • Clean up the code a bit and do a better job of abstracting out the generated types, because there are other attributes that are based on name matching rather than types.
  • Add some tests, I have an Okay idea how to test this, so I will add a test or two.
  • Attach CompilerGeneratedAttribute, EditorBrowsableAttribute(EditorBrowsableState.Never), DebuggerNonUserCodeAttribute to locally generated System Attribute (I.e. IsReadOnlyAttribute )

Right now I just want to see what tests are broken by this change.

@KevinRansom KevinRansom requested a review from a team as a code owner February 10, 2023 02:51
Copy link
Contributor

@TIHan TIHan left a comment

Choose a reason for hiding this comment

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

It looks good to me so far

@KevinRansom KevinRansom force-pushed the readonlyattribute branch 2 times, most recently from a04d842 to 60af412 Compare February 10, 2023 22:44
@vzarytovskii
Copy link
Member

Does this play well with parallel ilxgen? I presume yes, but just wanted to make sure.
Introduced in #14372

@KevinRansom
Copy link
Contributor Author

Does this play well with parallel ilxgen? I presume yes, but just wanted to make sure. Introduced in #14372

I would expect so. The embedded typedefs are accumulated in a concurrent collection.

@KevinRansom KevinRansom enabled auto-merge (squash) February 22, 2023 09:59
@KevinRansom KevinRansom merged commit 285fb61 into dotnet:main Feb 22, 2023
@KevinRansom KevinRansom deleted the readonlyattribute branch April 29, 2023 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants