`System.Data.Tests.AppDomainsAndFormatInfo.Bug55978` fails sometimes for
wasm:
```
Assert.Equal() Failure
Expected: 2
Actual: 3
Stack trace
at System.Data.Tests.AppDomainsAndFormatInfo.Bug55978()
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
```
To debug the issue, this dumps some state when the test fails.
Issue: https://github.com/dotnet/runtime/issues/47968
* Remove old fwlink from Obsolete messages and make message improvements
* Thorough review and update of Obsolete messages
* Cleanup
* Make messages about unsupported APIs more consistent
* Update RequiresUnreferencedCodeAttribute messages to be consistent between ref and src
* Cleanup
* Cleanup
* Use 'not supported' instead of 'no longer supported'
* Omit unnecessary error:false from Obsolete attributes. Fix message typo.
* Remove old comment
* PR feedback
* Update linker warning suppressions
https://github.com/mono/linker/pull/2145 warns when accessing members
annotated with DynamicallyAccessedMembers using reflection, and
https://github.com/mono/linker/pull/2162 updates the warning origin of
warnings for DynamicallyAccessedMembers on types.
This adds suppressions for the new warnings.
* Add windows-specific suppressions
* Update dependencies from https://github.com/mono/linker build 20210729.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21379.2
* Fix failures and address feedback
- Annotate mono's EnumBuilder and TypeBuilder
- Add (non-unique) readable short names to the warning codes
* Update dependencies from https://github.com/mono/linker build 20210730.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21380.2
* Suppress IL2111
* Update dependencies from https://github.com/mono/linker build 20210802.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21378.1 -> To Version 6.0.100-preview.6.21402.2
* Feedback
- Suppress IL2111 in trimming tests
- Remove unnecessary DynamicDependency
- Fix indentation
* Update readable warning names
Co-authored-by: Sven Boemer <[email protected]>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Allow implementations of DbBatchCommandCollection to hide the indexer
with a narrower-typed version for their own implementation of
DbBatchCommand, as elsewhere in ADO.NET.
Fixup for #54467, part of #28633
* Update dependencies from https://github.com/mono/linker build 20210715.1
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21362.3 -> To Version 6.0.100-preview.6.21365.1
* Update dependencies from https://github.com/mono/linker build 20210716.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21362.3 -> To Version 6.0.100-preview.6.21366.2
* Suppress type hierarchy warnings
Suppress type hierarchy warnings for
DynamicallyAccessedMembers attribute on types that
have members with RequiresUnreferencedCode (or derived
types with such members).
* Feedback
Remove unnecessary local method
* Fix typo
* Update dependencies from https://github.com/mono/linker build 20210719.3
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21362.3 -> To Version 6.0.100-preview.6.21369.3
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Sven Boemer <[email protected]>
* Use more string interpolation
I previously did a pass looking for opportunities. Finding a few more, as well as fixing some misuse of existing methods.
* Update src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
Co-authored-by: halgab <[email protected]>
* Apply suggestions from code review
Co-authored-by: Jan Kotas <[email protected]>
Co-authored-by: halgab <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
* 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