-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Mark APIs as unsupported on Browser WASM #41087
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @CoffeeFlux |
area-VM-meta-mono seems like the wrong area for this since it's purely libraries, but I'm not sure what to use for something that applies to libraries as a whole. area-Meta also seems wrong... |
Tagging subscribers to this area: @safern, @ViktorHofer |
@jeffhandley @adamsitnik while adding the Should we add the attribute to all the implementations in those cases? If we don't do that then regenerating the ref would remove the attribute if you're on a different platform. |
I've been encountering similar stuff with #41209, where we're trying to get the runtime repo ready to receive the analyzer. We don't yet have a solid strategy for this scenario. |
This is what we have been doing so far. |
We have now filed #41354 against the runtime repo to resolve the issues there for RC2. |
It looks like the exception scanner doesn't gather PNSEs thrown from runtime, e.g. something that uses |
Hi Seniors, Is there an alternative way to retrieve assembly version info on Wasm instead of |
@sigmarsson what about using |
@marek-safar i wish to retrieve either the calling or the executing assembly version. |
I see, in that case, the closest approximation would be to read System.Reflection.AssemblyFileVersionAttribute from the assembly. |
All the namespaces mentioned in this issue are covered so I'm closing it as completed |
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:
Namespaces (L# in file above)
Mark some System.Collection APIs as unsupported on Browser WASM #41085) serialization-related infrastructureMark some System.Collection APIs as unsupported on Browser WASM #41085) serialization-related infrastructure[wasm] Mark System.Data.Common APIs as unsupported on Browser #41263) false-positive, obsolete, serialization related[wasm] Mark System.Diagnostics.XmlWriterTraceListener APIs as unsupported on Browser #41327) False Positive[wasm] Mark System.IO.FileSystem.DriveInfo APIs as unsupported on Browser #41328)[wasm] Mark System.IO.MemoryMappedFiles APIs unsupported on browser #41971) false-positiveMdhwang/system linq queryable unsupported #41330) False Positive[wasm] Mark System.Net.SocketAddress APIs unsupported on Browser #41987) false-positiveMark System.Runtime APIs Supported on Windows #42030) False-positives/PNSE all mono/windows only[wasm] Mark System.Threading.Thread APIs unsupported on Browser #41892)[wasm] Mark System.Threading APIs as unsupported on Browser #41888)[wasm] Mark System.Threading.ThreadPoolBoundHandle unsupported on Browser #41884) windows-specific[wasm] Mark System.Transactions.Local APIs unsupported on browser #42027) PNSE all platformscc @steveisok @lewing
The text was updated successfully, but these errors were encountered: