-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[API Proposal]: Obsolete attributes under S.R.CompilerServices with no effect #113042
Comments
Tagging subscribers to this area: @dotnet/area-system-runtime-compilerservices |
Roslyn emits |
The documentation of CompilerGlobalScopeAttribute says:
Do debuggers ignore this attribute nowadays? |
The code comment says "VS 7 debugger": Line 6 in b658cd2
I searched runtime and diagnostics and didn't find usage in production code. However, there is some unit test mentioning it:
|
Code handling runtime/src/coreclr/vm/jitinterface.cpp Line 13477 in b658cd2
|
Nit: This PR is deleting unused flags on obsolete hosting API. Some of these flags served similar purpose as some of the attributes, but this PR is not deleting runtime definition of any attributes. Did you mean to include BTW: There is a lot of attributes in the security namespaces that are candidates for obsoletion as well. For example,
You would have to search the closed source Visual Studio code that's the production debugger code. The attribute is used there as you can tell by looking at the binaries:
You can delete the version number from the comment so that people are confused by it.
Yes, it was deleted in the runtime. However, the Roslyn still emits it and there may be tools out there that may depend on this attribute. We would have to overall plan for these other places to really obsolete it. I do not think it is worth it to bother with obsoleting this one. |
Updated original post. I didn't find other attributes in System namespace that looks obsolete.
Should they be included in one issue? Many of them already have members obsoleted. |
They can be listed in this issue or in a new issue. It does not matter a whole lot.
Vast majority of the obsoletion messages does not mention any version numbers: https://github.com/dotnet/runtime/blob/main/docs/project/list-of-diagnostics.md#obsoletion-diagnostics-syslib0001---syslib0999 . (A few messages do mention a version number. I guess it was an oversight.) |
Background and motivation
In #40622 and #43247,
SuppressIldasmAttribute
andDisablePrivateReflectionAttribute
were obsoleted because the runtime and toolchain no longer respects them. There are other attributes no longer respected by coreclr for a long time. PRs like #112975 are also removing the runtime definition of them. We may like to obsolete these attributes to provide a clear indication.The list of attributes are:
CompilationRelaxationsAttributestill emitted by roslynCompilerGlobalScopeAttributestill used by VS debuggerAPI Proposal
API Usage
N/A
Alternative Designs
How should the IDs and messages be grouped? Grouping related attributes and enum with a same ID seems reasonable.
Should the message say ".NET 5+" or ".NET 10+"? These attributes have not been respected for a long time.
Risks
We shouldn't want to re-introduce these capabilities in the future.
The text was updated successfully, but these errors were encountered: