Skip to content
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

Add System.Runtime.CompilerServices.RuntimeFeature.PortablePdb #21714

Closed
tmat opened this issue May 15, 2017 · 10 comments
Closed

Add System.Runtime.CompilerServices.RuntimeFeature.PortablePdb #21714

tmat opened this issue May 15, 2017 · 10 comments
Labels
api-approved API was approved in API review, it can be implemented area-System.Runtime.CompilerServices
Milestone

Comments

@tmat
Copy link
Member

tmat commented May 15, 2017

Currently there is no support for Portable PDBs in Desktop FX. We are finishing support in stack traces for portable and embedded PDBs for 4.7.1. Features that generate code at runtime (such as scripting) would benefit from being able to detect whether the runtime supports Portable PDBs or not, as they could emit Portable PDBs instead of Windows PDBs. Emitting Portable PDBs has perf benefits.

In order to make the feature detection consistent across all platforms we propose to add the following APIs to netstandard as well.

Proposed API

namespace System.Runtime.CompilerServices
{
    public static class RuntimeFeature
    {
        public const string PortablePdb = nameof(PortablePdb);

        // returns true for feature == "PortablePdb"
        public static bool IsSupported(string feature);
    }
}

// Usage

if (RuntimeFeature.IsSupported("PortablePdb")
{
      // Emit code with Portable debug info
}
@tmat
Copy link
Member Author

tmat commented May 15, 2017

@karelz What's the process for approving this API for Desktop FX 4.7.1?

@tmat
Copy link
Member Author

tmat commented May 15, 2017

/cc @noahfalk

@karelz
Copy link
Member

karelz commented May 15, 2017

@tmat email fxdc. @leecow might also help.

@tmat
Copy link
Member Author

tmat commented May 15, 2017

@marek-safar What's the process of adding APIs to Mono? If we added this API to 4.7.1 should it also be added to Mono at the same time or earlier? Do you have a release synchronized with Desktop FX?

@karelz
Copy link
Member

karelz commented May 15, 2017

BTW: Mono is trying to reuse CoreFX source libraries, so it will be likely in the same boat as .NET Core.

@weshaggard
Copy link
Member

In order to make the feature detection consistent across all platforms we propose to add the following APIs to netstandard as well.

The RuntimeFeature API isn't slated for netstandard yet, at least not netstandard2.0. It would be good to get it into .NET Framework 4.7.1 however.

@marek-safar
Copy link
Contributor

@tmat it's enough to cc me on the commit where the change is being worked on for CoreFX or CoreRT. We can add it earlier if the API is approved.

@terrajobst
Copy link
Contributor

Looks good as proposed

jkotas referenced this issue in jkotas/corefx Jan 17, 2018
jkotas referenced this issue in dotnet/corefx Jan 17, 2018
@jcouv
Copy link
Member

jcouv commented Feb 5, 2018

@tmat I see that the RuntimeFeatures "PortablePdb" flag was added. Are we using it in Roslyn at this point?
If we do, I'll use that as an example for a contributor who is working on another feature that needs a flag.

@tmat
Copy link
Member Author

tmat commented Feb 5, 2018

@jcouv We are not using it yet.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.1.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented area-System.Runtime.CompilerServices
Projects
None yet
Development

No branches or pull requests

7 participants