Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Add System.Runtime.CompilerServices.ReadOnlyAttribute#10777

Merged
jkotas merged 1 commit intodotnet:masterfrom
OmarTawfik:System.Runtime.CompilerServices.ReadOnlyAttribute-proposal
Apr 7, 2017
Merged

Add System.Runtime.CompilerServices.ReadOnlyAttribute#10777
jkotas merged 1 commit intodotnet:masterfrom
OmarTawfik:System.Runtime.CompilerServices.ReadOnlyAttribute-proposal

Conversation

@OmarTawfik
Copy link

@OmarTawfik OmarTawfik commented Apr 6, 2017

Proposal is in: https://github.com/dotnet/corefx/issues/17741

Questions for area owners:

  1. Is this the correct branch to use? is a rebase needed?
  2. Do I need to run any additional tools? I see that model.xml is no longer used in the repo.
  3. Is there any additional work needed to copy this to corert repo? or is the mirroring tool going to handle it?

cc @VSadov @jcouv @dotnet/roslyn-compiler

// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.


Copy link
Member

@jaredpar jaredpar Apr 6, 2017

Choose a reason for hiding this comment

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

Double blank line #Resolved

Copy link
Author

@OmarTawfik OmarTawfik Apr 6, 2017

Choose a reason for hiding this comment

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

Convention of other files in the same folder :( #Closed


namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.All, Inherited = false)]
Copy link
Member

@jaredpar jaredpar Apr 6, 2017

Choose a reason for hiding this comment

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

Should add doc comment detailing this is an attribute used by the compiler to trakc additional metadata. Should not be used by developers manually. #Resolved

Copy link
Member

@jcouv jcouv Apr 6, 2017

Choose a reason for hiding this comment

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

Maybe mark type with EditorBrowsableAttribute(EditorBrowsableState.Never)?
On the other hand, I think the entire CompilerServices namespace is already meant for compiler consumption (but not general consumption), so may be superfluous. #Resolved

Copy link
Member

@stephentoub stephentoub Apr 7, 2017

Choose a reason for hiding this comment

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

I think the entire CompilerServices namespace is already meant for compiler consumption (but not general consumption), so may be superfluous

There are types in the compiler namespace that folks use, though, like ConditionalWeakTable, StrongBox, even AsyncTaskMethodBuilder. I think adding the EditorBrowsable attribute would be reasonable. #Resolved

Copy link
Author

@OmarTawfik OmarTawfik Apr 7, 2017

Choose a reason for hiding this comment

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

My plan for now is to produce errors when users use it in their source code, same as we do for Dynamic attribute anyways. Will add the comment. #Closed

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Could you please add this under src\mscorlib\shared so that it is added for both CoreCLR and CoreRT?

@OmarTawfik
Copy link
Author

@terrajobst @karelz do I need sign off from API before merging in?

@jkotas jkotas merged commit 42ca75d into dotnet:master Apr 7, 2017
@jkotas
Copy link
Member

jkotas commented Apr 7, 2017

The API issues is marked as approved. There is no additional sign off required (except regular PR review).

@OmarTawfik OmarTawfik deleted the System.Runtime.CompilerServices.ReadOnlyAttribute-proposal branch April 7, 2017 22:05
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants