Skip to content

SecurityTransparent should be removed from Collections.Immutable #24122

@VSadov

Description

@VSadov

SecurityTransparent is a bit of a vestige nowdays, but is still enforced on desktop runtime.
As such the presence of the attribute is a blocker for the new language/runtime features such as ref returns, readonly references, spans...

Use of readonly references, in particular, makes a lot of sense, since the collections are Immutable

NOTE: Nearly no other library in CoreFx uses SecurityTransparent. ( https://github.com/dotnet/corefx/search?utf8=%E2%9C%93&q=SecurityTransparent&type= )

It is surprising that Collections.Immutable still does.

I think the attribute needs to be removed and soon since it is already causing troubles.
(Example: change dotnet/corefx@fc4b1ad when upgrade to C#7.2 had to be paired with disabling certain optimizations - we are not even using new features yet)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions