Skip to content

Mark APIs as unsupported on Browser WASM #41087

@MaximLipnin

Description

@MaximLipnin

We can use UnsupportedOSPlatformAttribute("browser") attribute to mark unsupported APIs on Browser WASM so that the analyzer can provide warnings when developers accidentally call platform-specific APIs.
Spec: dotnet/designs#144

We use the scanner (https://github.com/dotnet/platform-compat) to gather the list of all the APIs throwing PNSE on Browser WASM at the moment. Below is the file containing ~4500 PNSE methods.
pnse-17082020.txt

There can be some special cases:

  • APIs can be Windows-specific
  • APIs might throw PNSE for all platforms
  • APIs might not be considered to be marked (e.g. APIs are not meant to be directly called by user code)
  • other cases?

Namespaces (L# in file above)

cc @steveisok @lewing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions