* Add ILLink annotations to S.D.Common related to DbConnectionStringBuilder
* address some feedback
* Make GetEvents() safe
* make GetProperties safe
* Mark GetProperties with RUC
In effort to assess the state of the iOS library tests, a number of tests will be skipped
Test suites that crash, hang, or have a significant number of failures (mostly 20+ failing unique test methods) are skipped on at the `tests.proj` level. Otherwise, `[ActiveIssue]` attributes have been attached to either the individual test methods that fail or the entire class if the whole test class fails. Any pre-existing `ActiveIssue` attribute associated with iOS had been reassessed to either remain or be closed.
A few test suites have been skipped because they fail with some form of `PlatformNotSupportedException`. `[SkipOnPlatform]` attributes are attached to the failing test methods.
All of the Issues can be tracked at https://github.com/dotnet/runtime/projects/48#column-9236436
The ActiveIssues and `tests.proj` exclusions have been tested on https://github.com/dotnet/runtime/pull/49917 as well.
-----------
This PR makes the following changes in the following files:
`src/libraries/System.IO.Ports/tests/System.IO.Ports.Tests.csproj` - Removed `$(NetCoreAppCurrent)-iOS` from target frameworks as it is stated to currently only supported on Windows.
`src/libraries/tests.proj` - Update the test suites that need to be skipped at the project level, reducing the number and categorizing as a skip due to PNSE, a skip due to numerous failures, and a skip due to the suite crashing.
The remaining files changed are either:
`[ActiveIssue("<issue-url>", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]`
`[SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS, "Not supported on iOS or tvOS.")]`
Co-authored-by: Mitchell Hwang <[email protected]>
Co-authored-by: Tammy Qiu <[email protected]>
- Both EAT, and AOT builds are completely green now.
- Number of tests for EAT goes from 147 -> 185
- Number of tests for AOT goes from 147 -> 174 (the difference is because of aot only failures)
- Test run on a regular wasm build runs 206 libraries
We have a bunch of test assemblies that don't make sense on some platforms, e.g. Browser.
Right now we're skipping them via `[SkipOnMono("reason", TestPlatforms.Browser)]` but there's nothing that inherently ties this to Mono other than the current implementation.
The more generic `SkipOnPlatform` attribute can be used instead.
We can also use it in places where we do `[PlatformSpecific(~TestPlatforms....)]` to avoid the double inversion.
* Resolve ILLink warnings in System.ComponentModel.TypeConverter (Round 3)
Contributes to #45623
* Mark GetProperties as RequiresUnreferencedCode.
PropertyDescriptors are not trim compatible because we can't guarantee the PropertyType is annotated as DynamicallyAccessedMembers.All.
* Mark GetConverter as RequiresUnreferencedCode.
NullableConverter requires the underlying type to be annotated with DynamicallyAccessedMembers.All, but it cannot be statically annotated.
* Mark GetDefaultEvent and GetDefaultProperty as RequiresUnreferencedCode.
GetDefaultProperty is not trim compatible because it calls GetProperties, which isn't trim compatible since the PropertyType can't be annotated.
GetDefaultEvent can technically be considered trim compatible when not passing in an object "instance" and only a Type. But this would require trim warning suppressions which aren't worth the risk since most of ICustomTypeDescriptor is already RequiresUnreferencedCode.
* Resolve ILLink warnings in System.ComponentModel.TypeConverter (Round 2)
Contributes to #45623
* Change ComNativeDescriptorProxy so the linker can see the Type (when it is available) by using Type.GetType.
* Resolve ILLink warnings in System.ComponentModel.TypeConverter (Round 1)
Contributes to #45623
* Update the AttributeCollection message
* Add trimming test for SimplePropertyDescriptor.IsReadOnly
* Update the ref source with DynamicallyAccessedMembers attributes
* Add new MemoryExtensions.SequenceEqual overloads
* Use MemoryExtensions.SequenceEqual in Enumerable.SequenceEqual
* Use MemoryExtensions.SequenceEqual in a few more places
* Update dependencies from https://github.com/mono/linker build 20210201.1
Microsoft.NET.ILLink.Tasks
From Version 6.0.0-alpha.1.21079.1 -> To Version 6.0.0-alpha.1.21101.1
* Update dependencies from https://github.com/mono/linker build 20210201.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.0-alpha.1.21079.1 -> To Version 6.0.0-alpha.1.21101.2
* Update dependencies from https://github.com/mono/linker build 20210203.1
Microsoft.NET.ILLink.Tasks
From Version 6.0.0-alpha.1.21079.1 -> To Version 6.0.0-alpha.1.21103.1
* Add warnings to baseline
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Mateo Torres Ruiz <[email protected]>
Co-authored-by: Marek Safar <[email protected]>
* Add Stream argument validation helpers and use throughout dotnet/runtime
* Delete unnecessary code in Stream
Stream.Null was using BlockingBegin/EndRead/Write, but the operations are nops (they don't even do argument validation), so the functionality was unnecessary complication. We can just use TaskToApm instead, with already completed tasks, and then also delete the SynchronousAsyncResult that was used by these operations.
Also, the Begin/EndRead/Write methods were checking CanRead/Write and throwing if they return false, but this is a private sealed type with CanRead/Write hardcoded to return true! Delete.
Finally added consistency across Stream.Null to checking for cancellation.
* Clean up some style on Stream
Also consolidate a few resources and use a few existing ThrowHelpers where appropriate.
* Fix a few issues, and remove duplicative tests missed in conformance tests rollout
* Address PR feedback
* Add granular suppressions for linker warnings
* Add suppressions for mono SPC
* Misc additions
* Add suppressions for Debug config
* Fix Android xml file
* Include System.ComponentModel.Annotations suppressions
* Add suppressions for System.Security.Cryptography.X509Certificates on Linux
* Fix TargetOs exists check
* Add IL2077 to System.Security.Cryptography.X509Certificates on Android
* Generalize some System.Security.Cryptography.X509Certificates suppressions to 'NonWindows'
* Remove ref to catch-all System.Security.Cryptography.X509Certificates file
* Misc clean up and some feedback
* Use ILLinkDirectory in CreateRuntimeRootILLinkDescriptorFile.targets
* Update paths for directories
* Set TargetPath as part of include
* Delete bin-placing TODO
* Include more xml files during per-library run
* Include more xml files during per-library run, pt 2
* Include more xml files during per-library run, pt 3
* Try including System.ComponentModel.Annotations based on BuildingNETCoreAppVertical
* Switch to BuildAllConfigurations
* Include xml extension in file paths
* Remove version number from assembly suppression files
* Delete ILLink.Suppressions.xml
* Try removing IL2035 nowarn
* Remove version from Microsoft.VisualBasic.Core assemly name
* Revert "Make Enumerable.Cast<T> and friends return IEnumerable<T?> (#40929)"
This reverts commit e756708893.
* Redo annotation of Enumerable.Cast and friends to use oblivious T
Some folks aren't happy with the fallout of Cast being annotated to return a `TResult?`, and others aren't happy with having it be `TResult`. Consensus is to make the TResult oblivious, such that we don't declare one way or another what it is, since there's no good way to annotate it appropriately.
* Add nullable annotations for XmlDataDocument
* Address code review feedback
* More code review feedback
* Address Eric's feedback
* Annotate _dataSet as not null when AttachDataSet is called
* Fix GetElementById return type annotation
In order to match with src
Co-authored-by: Jeff Handley <[email protected]>
Co-authored-by: David Cantú <[email protected]>
* Port nullability annotations to refs XmlDocument and XmlSerializer
* Fix new System.Data.Common nullability related errors
* Switch nullability of parameter in SoapElementAttribute ctor
* Port nullability annotations to System.Xml.ReaderWriter contract assembly
* Port annotations of recently updated members in Xml/Serialization
* Fix anontations on XmlElement discovered while updating System.Data.Common Xml related annotations
* Fix Xml related annotations on System.Data.Common
* address feedback
Co-authored-by: Krzysztof Wicher <[email protected]>
* Move EditorAttribute to System.ComponentModel.Primitives
* Add EditorAttribute to types that had it in netfx and fix some DesignerSerializableAttributes
* PR Feedback
* PR Feedback
* Move DesignerSerializerAttribute to S.CM.Primitives and add to StringDictionary
* Add TolboxItemAttribute to types that had it in Desktop
* Remove TypeDescriptionProviderAttribute from DefaultGenApiDocIds
* PR Feedback, fix build
When running the new nullable constructor analysis on runtime we
discovered what appears to be a missing annotation in
`DataTableReaderListener`.
Note: the second `if` check in the constructor seems like dead code.
It's checking for the field to be non-null before ever setting the field
to a value. Probably could be deleted.