Граф коммитов

170 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge fa4689b533
[main] Update dependencies from dotnet/installer (#12481)
## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency* attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 6.0.100-preview.6.21416.1 to 6.0.100-preview.6.21419.1 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer

- **Subscription**: df3e6147-3e41-4928-6775-08d8f479343c
- **Build**: 20210823.21
- **Date Produced**: 8/24/2021 12:53 AM
- **Commit**: 5f5d8bb4a209810fb93c86ce6b0b3172bd909134
- **Branch**: refs/heads/release/6.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 6.0.100-rc.1.21417.3 to 6.0.100-rc.2.21423.21][1]
  - **Microsoft.NET.ILLink.Tasks**: [from 6.0.100-preview.6.21416.1 to 6.0.100-preview.6.21419.1][2]

[1]: 8c86609...5f5d8bb
[2]: 5b2391c...5851f6d
2021-08-25 09:43:54 +02:00
Rolf Bjarne Kvinge 55146dc3db
[tests] Remove some ignores for issues that have been fixed. (#12527) 2021-08-25 09:23:30 +02:00
Rolf Bjarne Kvinge 197b564c21 Merge remote-tracking branch 'origin/main' into darc-main-971a17ce-2b67-4dbe-bb13-8308d33e5f58 2021-08-24 07:26:26 +02:00
Rolf Bjarne Kvinge 3e728faa77 [tests] Update tests that use HttpClientHandler to get matching behavior with legacy Xamarin. 2021-08-24 07:26:19 +02:00
Rolf Bjarne Kvinge d3c9f4b1b6
[dotnet] Make CoreCLR the only option for macOS. Fixes #12477. (#12480)
* [dotnet] Make CoreCLR the default for macOS.

* [dotnet] Show an error if trying to use MonoVM on macOS.

Fixes https://github.com/xamarin/xamarin-macios/issues/12477.

* [xharness] Remove CoreCLR variations for macOS tests.

The default is using CoreCLR for macOS, so having a specific variation for it
doesn't make sense.

* [tests] Adjust linker tests to work on CoreCLR as well.
2021-08-20 09:53:40 +02:00
Rolf Bjarne Kvinge 335d7575fc
[tests] Fix the build for link sdk tests on .NET/macOS. (#12475)
Fixes these errors:

    xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs(1140,41): error CS0246: The type or namespace name 'NSApplication' could not be found (are you missing a using directive or an assembly reference?)
    xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs(1156,4): error CS0103: The name 'NSApplication' does not exist in the current context
    xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs(1157,4): error CS0103: The name 'NSApplication' does not exist in the current context
2021-08-19 07:49:40 +02:00
Rolf Bjarne Kvinge ef61ab51f6
[tests] Add .NET version of link sdk for macOS. (#12462)
* [tests] Add .NET version of link sdk for macOS.

* [src] Add linker substitution files for macOS and Mac Catalyst.
2021-08-18 10:01:26 +02:00
Rolf Bjarne Kvinge cd60fc7123
[tests] Add .NET version of link all for macOS. (#12436)
This also required changing some linker code to not have platform-specific conditional compilation,
because dotnet-linker is built only once for .NET (same binary for all platforms).
2021-08-17 16:39:43 +02:00
Rolf Bjarne Kvinge 874a6f93b6
[tests] Add .NET version of dont link for macOS. (#12432) 2021-08-13 22:49:03 +02:00
Sebastien Pouliot cc3b88c2ed
[tests][linker] Re-enable the metadata reducer test case for dotnet (#12404)
It's been enabled (on dotnet side) for a while, even in debug.

Fix https://github.com/xamarin/xamarin-macios/issues/9612
2021-08-11 14:52:35 -04:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Sebastien Pouliot a20d417bf7
[dotnet][linker] Enable the sealer optimization (#12009)
when (by default)
* the interpreter is not enabled (since new code might subclass or override the members analyzed at build time)
* building for release

Reverts c56b893b68
Fix https://github.com/xamarin/xamarin-macios/issues/9573

Notes

* Even if possible (in metadata) there is no point in setting `final` on
a method if we remove `virtual`. This match ILLink version of the sealer
and makes the same test pass on both.

* Don't apply optimization on non-AOT builds, e.g. simulators, since some
features (like XML serialization) checks for
`RuntimeFeature.IsDynamicCodeSupported` and that requires some types
to be subclassed thru SRE
2021-08-10 16:01:30 -04:00
Rolf Bjarne Kvinge 6d078c2ac8
[tests] Add debug spew to track down #xamarin/maccore@2414. (#12354) 2021-08-06 09:45:55 +02:00
Rolf Bjarne Kvinge b06baea3c8
[tests] Merge the Main function into the AppDelegate class in numerous tests. (#12356)
Also use a non-obsolete overload of UIApplication.Main.

This shrinks our code and file count a bit.
2021-08-06 09:44:58 +02:00
Rolf Bjarne Kvinge a91e34f01b
[xharness] Automatically inline Imports to a "shared.csproj" when cloning projects. Fixes #12316 and #12277. (#12322)
This way we process the shared.csproj that we use in our .NET test projects.
The main effect is that we'll clone any project references included in the
shared.csproj, which will fix #12316. On another hand, it means that we'll
add/remove defines in referenced projects, which fixes #12277.

It also allows us to put more code in the "shared.csproj" files.

Fixes https://github.com/xamarin/xamarin-macios/issues/12316.
Fixes https://github.com/xamarin/xamarin-macios/issues/12277.
2021-08-04 18:13:02 +02:00
Rolf Bjarne Kvinge 7986b2f2af
[dotnet] Globalization works for Mac Catalyst now. Fixes #11392. (#12247)
Fixes https://github.com/xamarin/xamarin-macios/issues/11392.
2021-07-28 09:12:22 +02:00
Rolf Bjarne Kvinge 7260f267d9
[tests] Remove workaround for #dotnet/runtime@47120, it's been fixed. (#12253) 2021-07-28 09:08:13 +02:00
Rolf Bjarne Kvinge 0f62f57ac9
[link sdk] Fix incorrect test logic in HttpClientHandlerTest for Mac Catalyst. Fixes #xamarin/maccore@2472. (#12179)
Fixes https://github.com/xamarin/maccore/issues/2472.
2021-07-23 09:10:11 +02:00
Rolf Bjarne Kvinge 76c8461764
[main] Update dependencies from dotnet/installer (#12064)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer

- **Subscription**: df3e6147-3e41-4928-6775-08d8f479343c
- **Build**: 20210720.12
- **Date Produced**: 7/21/2021 6:57 AM
- **Commit**: d7279fc09fcfb108c5fb97fa290dbbb11c4c441b
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 6.0.100-preview.7.21330.1 to 6.0.100-rc.1.21370.12][1]
  - **Microsoft.NET.ILLink.Tasks**: [from 6.0.100-preview.6.21329.2 to 6.0.100-preview.6.21370.1][2]

[1]: 823ff33...d7279fc
[2]: f549b4e...6eae019

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 6.0.100-preview.6.21329.2 to 6.0.100-preview.6.21370.1 (parent: Microsoft.Dotnet.Sdk.Internal)
2021-07-22 10:32:32 +02:00
Rolf Bjarne Kvinge b4dd54bbce [dont link] Ignore the Calendar tests on Mac Catalyst. 2021-07-21 09:32:12 +02:00
Rolf Bjarne Kvinge 28989758ba [link sdk] The SpecialFolder.ProgramFiles path may or may not exist. 2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge c7fe2fefd5 [link sdk] Adjust the Bug2000_NSPersistentStoreCoordinator test to create file in a temporary directory.
It would create a file in the current directory, which is the root directory of the app bundle.

This would work in the simulator (because the directory is read-write), fail
on device (because the directory is read-only), and cause rebuilds to fail
with Mac Catalyst (because the directory is read-write the test would succeed,
but it would write files in the root directory of the app bundle, which is not
allowed for macOS apps, and thus codesign would fail when rebuilding the app).

So change the test to create any files in a temporary directory, and adjust it
to always expect the file to be created.

And just in case also delete the file at the end of the test.
2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge 56baf35c79 [tests] Adjust 'link all' to work on Mac Catalyst. 2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge ad50c76a88 [tests] Add proper .NET project files for dont link, link sdk and link all tests.
This includes adding a Mac Catalyst variation as well, and adding helpful Makefile
targets for simple execution.

This is a partial fix for #10833.
2021-07-20 15:54:48 +02:00
Rolf Bjarne Kvinge 7e37fe622e [monotouch-test] Adjust HttpClientHandler tests.
Adjust HttpClientHandler tests to cope with
https://github.com/dotnet/runtime/issues/50859 and
https://github.com/xamarin/xamarin-macios/issues/11392.
2021-07-20 14:54:02 +02:00
Rolf Bjarne Kvinge f90a2f5c75 [monotouch-test] Adjust HttpClientHandler tests to cope with https://github.com/dotnet/runtime/issues/55986. 2021-07-20 14:54:02 +02:00
Sebastien Pouliot c5170b1331
[dotnet][tests] Remove workaround for dotnet/runtime #46908 (#11958) 2021-06-16 19:47:42 -04:00
Sebastien Pouliot 974aad0a26
[tests][link sdk] Re-enable test for Ping for dotnet (#11951)
ref: https://github.com/dotnet/runtime/issues/41355

Unlike what we have today for legacy support for Ping was added in
https://github.com/dotnet/runtime/pull/52240
2021-06-16 14:03:36 -04:00
Sebastien Pouliot 2ecbb07068
[tests] Re-enable tests ignored due to dotnet/runtime #36897 (#11939)
They should now work (even if some tests required more changes) and
will be able to validate other changes.

ref: https://github.com/dotnet/runtime/issues/36897
2021-06-16 09:41:27 -04:00
dotnet-maestro[bot] 0d3ecfc065
[main] Update dependencies from dotnet/installer (#11747)
* Update dependencies from https://github.com/dotnet/installer build 20210530.2

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.6.21274.3 -> To Version 6.0.100-preview.6.21280.2

Dependency coherency updates

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.5.21271.1 -> To Version 6.0.100-preview.6.21277.2 (parent: Microsoft.Dotnet.Sdk.Internal

* Bump to MSBuild.StructuredLogger v2.1.500 to get support for log format v14.

* [tests] Skip code that needs System.ComponentModel.Composition or System.Json due to #11710.

Ref: https://github.com/xamarin/xamarin-macios/issues/11710

* [tests] Adjust logic to find MSBuild items after the last MSBuild.StructuredLogger update.

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-06-02 07:48:29 +02:00
Sebastien Pouliot 54fe91cc36
[dotnet][linker] Use substitutions to stub debug helpers in UIApplication (#11679)
Both
* EnsureEventAndDelegateAreNotMismatched
* EnsureDelegateAssignIsNotOverwritingInternalDelegate

are helpers that will warn, on console, if ObjC delegates are mis-used
inside the application. Those message are not useful at runtime and we
can use ILLink's substitutions to remove the content of the checks for
release builds.
2021-05-26 09:21:43 -04:00
Sebastien Pouliot 52c75d30b4
[dotnet][linker] Use substitution files to remove UIButton debug code (#11623)
The debug code is removed only on release builds.

Unlike the _legacy_ linker the method itself is still present (not
removed) from the assembly - but it will be empty (no code).

Unit test was adapted to work under all conditions.

Fixes https://github.com/xamarin/xamarin-macios/issues/9613
2021-05-20 09:36:05 -04:00
Sebastien Pouliot 9591a47ac3
[dotnet][tests][link all] Ignore failures on devices (#11551)
Already known issues (already filled for similar tests in Link SDK)
2021-05-13 20:42:52 -04:00
Sebastien Pouliot 30c877ce45
[dotnet][tests][link sdk] Remove [Ignore] for https://github.com/dotnet/runtime/issues/49201 (#11549) 2021-05-13 20:39:50 -04:00
Sven Boemer dc320a3606
Update to new linker custom steps API (#11374)
* Update to new linker custom steps API

* PR feedback

- Fix indentation
- Add Initialize(LinkContext) to ExceptionalMarkHandler
- Remove unnecessary ifdef
- Use IsSetter/IsGetter
- Use [0] instead of Single()
- Avoid allocating empty collections

* Note override issue

* Clean up comments

* Move `DynamicRegistrationSupported` change earlier, along with the
detection code.

This solve the issue that `ILLink` does a similar job _before_ we have
the chance to disable the dynamic registrar.

* ILLink does not support considering other attributes as `[Preserve]`

when it is itself preserved at the assembly-level.

This ignored test is checking that feature so it cannot be enabled
for `NET`

Added to known breaking changes https://github.com/xamarin/xamarin-macios/issues/8900

* Fix removal of the dynamic registrar on legacy

* Fix IntPtr size inlining

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
2021-05-12 12:26:54 -04:00
Sebastien Pouliot bbee8a0a57
[tests][link all] Fix nunit silent exception causing some tests not to be enabled (#11287)
This exposed a few tests that are failing on dotnet (adjusted or fixed)
Also fix a typo in an exception message in `src/ObjCRuntime/PlatformAvailability.cs`
and a build warning in `tests/common/TestRuntime.cs`

Fix part of https://github.com/xamarin/xamarin-macios/issues/11243
And allows enabling the tvOS/dotnet link all tests
2021-04-22 09:14:33 -04:00
Sebastien Pouliot 5accd102cf
[dotnet][tvos] Enable ICU (instead of using Invariant) and additional tests (#11247) 2021-04-21 20:19:05 -04:00
Alex Soto 8b926000a6
Merge branch 'main' into alex-xcode12.5-main 2021-04-08 17:42:32 -04:00
Sebastien Pouliot 99892d79f9
[tests] Revert manual preservation of InternalsVisibleToAttribute.ctor(string) (#11160)
The issue https://github.com/mono/linker/issues/1913 was fixed a while ago.
2021-04-08 13:01:35 -04:00
Alex Soto bc1d8513a6 Merge remote-tracking branch 'xamarin/xcode12.5' into alex-xcode12.5-main 2021-04-02 21:46:31 -04:00
Sebastien Pouliot 710604a867
Revert "[tests] Ignore the XmlSerializationTest.Bug1820_GenericList test in .NET due to a linker bug." (#11053)
This reverts commit 9cbf14500b.

The original issue https://github.com/mono/linker/issues/1454 -> https://github.com/dotnet/runtime/issues/41389 was fixed a while ago.

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
2021-04-02 00:05:02 -04:00
Peter Collins 5c12fdfac9
[build] Use arcade dependency management tooling (#10890)
* [build] Use arcade dependency management tooling

* Apply feedback

* Apply second round of feedback

* Always make dotnet.config before trying to read it

* Debugging

* Update dependencies, trim tabs and spaces

* [dotnet] Remove the existing workload shipped with .NET and install our locally built ones.

The new version of .NET ships with our workloads, but those aren't
the workloads we want to use, so replace them with our own.

* Update .gitignores.

* Bump to 6.0.100-preview.3.21181.5

That required renaming simulator runtime packs...

* More rename for simulator packages

* moar (hopefully all)

* Bump to 6.0.100-preview.3.21201.11

This fix the issue with `Wait` that failed several tests in monotouch-tests

However it does not include the fix for AppConext.GetData on device (AOT)

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Sebastien Pouliot <sebastien@xamarin.com>
2021-04-02 00:02:27 -04:00
Sebastien Pouliot 35ddc1fcb0
Revert "[tests] Ignore CommonLinkSdkTest.TypeDescriptor_A7793 in .NET due to a linker bug." (#11054)
This reverts commit dea6580c78.

This was fixed a while ago https://github.com/mono/linker/issues/1451 -> https://github.com/dotnet/runtime/issues/41390

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
2021-04-01 23:47:21 -04:00
Sebastien Pouliot 747cc9a2b8
[dotnet] Fix device builds (#11036)
With P3 addition on ICU we must now link the native executable as C++.

Remove an old workaround, in many tests, referencing old (5.0/previews)
packages that caused native link time failures.

ref: https://github.com/mono/linker/issues/1139
2021-03-31 12:59:07 -04:00
Sebastien Pouliot f663072514
Revert "[tests] Ignore LinkSdkRegressionTest.AsQueryable_Enumerable due to an issue in .NET" (#11041)
This reverts commit ae0649f4e5.

Original issue https://github.com/dotnet/runtime/issues/41392 was fixed long ago
2021-03-31 09:10:04 -04:00
Sebastien Pouliot bf8bcda9fe
Revert "[tests] Ignore linkall's DataContractTest in .NET due to a linker bug." (#11042)
This reverts commit bc668916e7.

Original issue https://github.com/dotnet/runtime/issues/41525 was solved a while ago.
2021-03-31 09:06:47 -04:00
Sebastien Pouliot b186bd675a
[dotnet] Call monovm_initialize before mono_jit_init (#11014)
Those are called respectively inside `xamarin_vm_initialize` and
`xamarin_bridge_initialize` functions.

This fix the **AppContext.GetData always return null for iOS** issue
https://github.com/dotnet/runtime/issues/50290

Thanks for @filipnavara for diagnosing this quicker than anyone else!

Added unit tests to ensure `AppContext.GetData` can read back the values
we're providing at startup.
2021-03-29 16:23:38 -04:00
Rolf Bjarne Kvinge b30777f420
Bump to .NET 6.0.100-preview.3.21161.23 (#10772)
* Bump to .NET 6.0.100-preview.3.21152.10

* Bump to 6.0.100-preview.3.21152.10.

* Bump to 6.0.100-preview.3.21161.7.

* Bump to .NET 6.0.100-preview.3.21161.23.

* [dotnet-linker] Bump ILink and use the supported method of getting an assembly's location.

* Bump to MSBuild.StructuredLogger 2.1.364 to get support for newer binlog versions.

* Fix build failure

Fixes:

    TestHelpers/BuildEngine.cs(161,24): error CS0433: The type 'ProjectEvaluationFinishedEventArgs' exists in both 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'StructuredLogger, Version=2.1.0.0, Culture=neutral, PublicKeyToken=d4c7181801cb6448' [/Users/builder/azdo/_work/1/s/xamarin-macios/tests/msbuild/Xamarin.MacDev.Tests/Xamarin.MacDev.Tests.csproj]

* Update parsing binlog properties.

* Be more defensive.

* [tests] Make sure the InternalsVisibleToAttribute constructor isn't linked away.

* [tests] Implement better printing of binlogs.

The latest MSBuild.StructuredLogger made some internal changes to the Message
property which confuses some of our test logic. So implement manual printing
of the log entries that we care about to make sure they conform to the
expected format by the tests (the output is mimicing what 'msbuild /v:diag
foo.binlog' would show).
2021-03-24 16:59:33 +01:00
Manuel de la Pena f7b208b980
[Xcode12.5] Fix regression test not to crash. fixes #10918 (#10919)
The api does not longer allow you to pass a null ptr. Create a dummy
controller:

fixes https://github.com/xamarin/xamarin-macios/issues/10918
2021-03-19 17:25:56 -04:00
Sebastien Pouliot 00a69e1654
[dotnet] Update `Min*` constants and fix builds for tests (#10835)
We're bumping the minimum OS versions for all supported platforms
https://github.com/dotnet/core/blob/master/release-notes/6.0/6.0-supported-os.md

Intro's `Introduced` test is ignored as it require (a lot of) changes. This
will be fixed in separate PRs and gradually re-enabled.

iOS
```
[FAIL] Introduced : 7573 API with unneeded or incorrect version information
```

tvOS
```
[FAIL] Introduced : 299 API with unneeded or incorrect version information
```

Tracking progress in https://github.com/xamarin/xamarin-macios/issues/10834
2021-03-13 10:38:46 -05:00