* 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.
* Add DesignerAttribute to types that had it in full framework
* Move DesignerAttributeTests to Primitives and fix test errors
* Remove DesignerAttribute.cs from TypeConverter
* Annotate System.Data.Odbc for nullability
* Annotate System.Data.OleDb for nullability
* Suppress nullable warnings on netcoreapp < 3.0
* Mark System.Data.DataSetExtensions as null-annotated
* Fix null-check bug in System.Data.OleDb
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"
* Mark new obsoletions for .NET 5; update existing obsoletions
* Exclude DirectoryServicesPermission/DirectoryServicesPermissionAttribute from obsoletions for now
* No need to restore SYSLIB0003 at end of Forwards files
* Use a common Obsoletions.cs file for all SYSLIB obsoletions
* Resurrect CER code behind #ifdef in EventSource
* Mark GlobalAssemblyCache overrides as Obsolete
* Suppress Thread.Abort() error in ImageAnimator.Unix.cs
* Unconditionally mark RoAssembly.GlobalAssemblyCache as obsolete
* Rename MSLIB0001 to SYSLIB0001 in ref assembly
* Suppress obsoletion warnings in tests
* Adopt a uniform #ifdef for NET50_OBSOLETIONS
* Fix BinaryFormatter obsoletion message after the rebase
* Use SYSTEM_PRIVATE_CORELIB constant instead of NETCOREAPP
* Remove the code comment on the ifdef
* Apply feedback related to CER obsoletions
* Apply feedback related to CAS
* Update ref assembly to reflect SecurityManager obsoletion
* Fix regression in System.IO.Pipes.NamedPipeServerStream.Windows.RunAsClient