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

10785 Коммитов

Автор SHA1 Сообщение Дата
VS MobileTools Engineering Service 2 73977364cb
[xcode12.5] [CI] Fix pool selector (#11057)
* [VSmac] Bump max version to the new stable. (#11025)

* Remove not needed code.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-03-31 23:00:46 -04:00
Manuel de la Pena 0db6ec065a
[CI] Run the dotnet tests by default ONLY on main. (#11060) 2021-03-31 21:41:21 -04:00
VS MobileTools Engineering Service 2 c70658cc7a
[CI] 50gb is a lot. Reduce to 20gb since our device bots are old. (#11049)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-03-31 19:38:26 -04:00
VS MobileTools Engineering Service 2 2d17be0670
[CI][Xharness] If we are use the tcp tunnel do not try to get IPs. (#11050)
The main reason why we use the Tcp Tunnel is because we do have
networking issues, one of them is related to the DNS server. If we use
the tunnel we have made a choice and we are sure we will not need the
IPs.

This solves a case in which we have a network failure when we try
to retrieve the IP address using the DNS lookup.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-03-31 18:30:48 -04:00
VS MobileTools Engineering Service 2 4ba01d16f3
[ObjCRuntime] Fix a GCHandle leak. (#10981)
Make sure to free the weak GCHandles we create to track NSObjects, just
removing them from our dictionary doesn't cut it.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-03-31 17:58:28 -04:00
Manuel de la Pena d32edd2ba8
[CI] Fix pool selector (#11032) 2021-03-31 17:25:46 -04:00
TJ Lambert 444d412f9a
[Localization] Changing the Build.SourceBranchName Variable (#11052)
Remove the need to check if we are in a PR, just execute the translations when we are in main, that reduces the complexity of the condition and works.

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-03-31 16:53:12 -04:00
Manuel de la Pena d0069abd4a
[CI] Remove steps that are never used. (#11026) (#11046) 2021-03-31 13:57:44 -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
TJ Lambert 0aea33ad6a
[Localization] Trigger OneLocBuild only on Merges to Main (#11033)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2021-03-31 11:08:00 -05:00
Manuel de la Pena 42776ce64d
[CI][Xharness] If we are use the tcp tunnel do not try to get IPs. (#11027)
The main reason why we use the Tcp Tunnel is because we do have
networking issues, one of them is related to the DNS server. If we use
the tunnel we have made a choice and we are sure we will not need the
IPs.

This solves a case in which we have a network failure when we try
to retrieve the IP address using the DNS lookup.
2021-03-31 11:38:54 -04:00
VS MobileTools Engineering Service 2 2506ebf311
[xcode12.5] [CI][XHarness] Ensure we filter the tests to run. (#11044)
VSTS does not longer have a file with the pat yet it does allow to use
an env variable with the pat provided by the keyvault. Before this
change we have been running all the tests which results in several extra
hours when we do not need to. For example, if nothing was changed in
msbuild, do not run its tests which are 45 mins long.

Changes are:

* provide pat in the env.
* update xharness to use an env var, do not longer read from a file.

fixes: https://github.com/xamarin/xamarin-macios/issues/10923


Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-03-31 11:24:03 -04:00
Manuel de la Pena 6a7d0f71fe
[CI] 50gb is a lot. Reduce to 20gb since our device bots are old. (#11031) 2021-03-31 10:54:58 -04:00
Jonathan Peppers 5e18eae0ca
[dotnet] suppress IL2026 linker warning (#11043)
We started using `$(SuppressTrimAnalysisWarnings)` by default, because
ILLink started emitting warnings by default in .NET 6 Preview 3.

7bf3e8d8 fixed *most* of these warnings except for `IL2026`:

16aedd6e72/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets (L52-L57)

I get around 20 instances of this warning when building dotnet/maui.

`IL2026` occurs because this logic is evaluated much earlier than the
`PrepareForILLink` MSBuild target:

16aedd6e72/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ILLink.targets (L202)

The MSBuild evaluation order right now is:

* Sdk/Sdk.props
* Microsoft.[platform].Sdk.props
* Xamarin.Shared.Sdk.props
* Microsoft.NET.ILLink.targets
* Microsoft.[platform].Sdk.targets
* Xamarin.Shared.Sdk.targets

We need to set `$(SuppressTrimAnalysisWarnings)` earlier in
`Xamarin.Shared.Sdk.props` to solve the issue here.

On the Android side I got lucky, and it worked first try without
thinking too much. We import a `*.DefaultProperties.targets` before
`Microsoft.NET.ILLink.targets`, and that is why it worked.
2021-03-31 09:07:02 -05: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
VS MobileTools Engineering Service 2 61ff7cd33d
[CI] VSdrops uris are case sensitive. (#11039)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-03-31 07:35:47 -04:00
VS MobileTools Engineering Service 2 e8d18c7a7c
[CI] Remove noise that was added while testing. (#11038)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-03-31 07:35:13 -04:00
Manuel de la Pena b686ab69c8
[CI][XHarness] Ensure we filter the tests to run. (#11035)
VSTS does not longer have a file with the pat yet it does allow to use
an env variable with the pat provided by the keyvault. Before this
change we have been running all the tests which results in several extra
hours when we do not need to. For example, if nothing was changed in
msbuild, do not run its tests which are 45 mins long.

Changes are:

* provide pat in the env.
* update xharness to use an env var, do not longer read from a file.

fixes: https://github.com/xamarin/xamarin-macios/issues/10923
2021-03-31 07:18:35 -04:00
Manuel de la Pena 113ae06622
[CI] VSdrops uris are case sensitive. (#11030) 2021-03-30 20:38:49 -04:00
Rolf Bjarne Kvinge 7bc45c097a
[runtime] Don't start the toggle ref machinery in CoreCLR. (#10990)
The implementation will be completely different, where the hook into CoreCLR
is in managed code.

We still need to initialize the framework_peer_release_lock mutex, so move
that code out of gc_enable_new_refcount.
2021-03-30 18:06:23 -04:00
Rolf Bjarne Kvinge d1c5a49e05
[ObjCRuntime] Add a NSObject.HasManagedRef property (#10987)
* [ObjCRuntime] Add a NSObject.HasManagedRef property

* Fix boolean logic.
2021-03-30 18:05:36 -04:00
Rolf Bjarne Kvinge 6ce364860c
[CoreCLR] Implement xamarin_gchandle_new[_weakref] and xamarin_gchandle_free. (#10985) 2021-03-30 18:04:44 -04:00
Rolf Bjarne Kvinge 77b470cfaf
[CoreCLR] Implement mono_domain_get. (#10992) 2021-03-30 17:46:36 -04:00
Manuel de la Pena ee6129b376
[CI] Remove noise that was added while testing. (#11028) 2021-03-30 17:40:02 -04:00
Manuel de la Pena 8041d36d35
[CI] Remove steps that are never used. (#11026) 2021-03-30 17:39:27 -04:00
Manuel de la Pena 36a2df3904
[VSmac] Bump max version to the new stable. (#11025) 2021-03-30 09:51:02 -04:00
TJ Lambert 42014b1d24
[Localization] Adding Merge Conditional (#11021)
Adding in a conditional to trigger OneLocBuild task only on merges

Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2021-03-29 17:07:48 -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
Sebastien Pouliot 9c0d46674a
[generate-type-forwarders] Reduce string allocations (#11000)
Output should be identical and since all other PR are merged it
also produce an output with no breaking changes.

https://gist.github.com/92f759e37e2cd193266ca190a741cc24
2021-03-27 12:04:40 -04:00
Mike Bond 0a1df1f411
[Xcode12.5] Target new xamarin-macios agent pools to be ready for BS. 2021-03-26 16:50:58 -04:00
Jonathan Peppers 7bf3e8d83a
[dotnet] default $(SuppressTrimAnalysisWarnings) to true (#10970)
Fixes: https://github.com/xamarin/xamarin-macios/issues/10887

After bumping to .NET 6 Preview 3, we get hundreds of ILLINK warnings.
This is because of:

https://github.com/dotnet/sdk/pull/16327

We need to default `$(SuppressTrimAnalysisWarnings)` to ignore these
warnings for now.

We should continue to use `TrimMode=link`, as that is the behavior
Xamarin developers get today.
2021-03-26 13:50:35 -05:00
Sebastien Pouliot 114b01bc2a
[generate-type-forwarders] Fix final properties (#10973)
The type implementation of an interface member does not need to be
`virtual` but, since it's done by _sealing_ the member.

Example

```diff
 public virtual ---final--- int Count { get; }
```
2021-03-26 09:36:28 -04:00
Sebastien Pouliot cf94879d83
[generate-type-forwarders] Fix parameter arrays used by-reference (#10975)
Removed method:

```csharp
public static GLKMesh[] FromAsset (ModelIO.MDLAsset asset, out ModelIO.MDLMesh[] sourceMeshes, out Foundation.NSError error);
```

Added method:

```csharp
public static GLKMesh[] FromAsset (ModelIO.MDLAsset asset, out ModelIO.MDLMesh sourceMeshes, out Foundation.NSError error);
```
2021-03-26 09:35:26 -04:00
Sebastien Pouliot fc5c571ab7
[generate-type-forwarders] Fix incorrect overrides on methods and properties (#10978)
Examples

Modified properties:

```diff
-public virtual SceneKit.SCNScene Scene { get; set; }
+public override SceneKit.SCNScene Scene { get; set; }
```

Modified methods:

```diff
-public virtual void CancelRequest (Foundation.NSError error)
+public override void CancelRequest (Foundation.NSError error)
```
2021-03-26 09:34:09 -04:00
VS MobileTools Engineering Service 2 9f4390cc65
[xcode12.5] Link FrameworkList.xml to a place where MSBuild SDK actually expects it (#10955)
* Link FrameworkList.xml to a place where MSBuild SDK actually expects it

* Create necessary directories

* Fix symlinks for packaging

* Add test case

* Minor tweak to test case

* Fix cut & paste error

Co-authored-by: Filip Navara <navara@emclient.com>
2021-03-26 07:21:50 -04:00
Rolf Bjarne Kvinge 0971b6bb83
[ObjCRuntime] Fix a GCHandle leak. (#10967)
Make sure to free the weak GCHandles we create to track NSObjects, just
removing them from our dictionary doesn't cut it.
2021-03-26 08:13:41 +01:00
Alex Soto 29890ea644 [OneLocBuild] Disable autocompletion of localization PRs 2021-03-25 19:46:23 -04:00
Alex Soto c77db16b76 Revert "Localized file check-in by OneLocBuild Task"
This reverts commit 92e847b68e.
2021-03-25 19:43:47 -04:00
VS MobileTools Engineering Service 2 9d7252d193
[xharness] Bump timeout to evaluate MSBuild properties by running msbuild. (#10963)
Sometimes msbuild wants to restore packages during this process, which may
take a while.

Hopefully fixes errors like this:

    Harness exception for 'Tests for C6353E8B-BFDA-4F54-93D9-FF0F838BF8EE': System.Exception: Unable to evaluate the property OutputPath.
        at Xharness.AppBundleLocator.GetPropertyByMSBuildEvaluationAsync (System.Xml.XmlDocument csproj, System.String projectPath, System.String evaluateProperty, System.String dependsOnTargets, System.Collections.Generic.Dictionary`2[TKey,TValue] properties) [0x00327] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/AppBundleLocator.cs:109
        at Xharness.AppBundleLocator.LocateAppBundle (System.Xml.XmlDocument projectFile, System.String projectFilePath, Microsoft.DotNet.XHarness.iOS.Shared.TestTarget target, System.String buildConfiguration) [0x000d2] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/AppBundleLocator.cs:49
        at Microsoft.DotNet.XHarness.iOS.Shared.AppBundleInformationParser.ParseFromProject (System.String projectFilePath, Microsoft.DotNet.XHarness.iOS.Shared.TestTarget target, System.String buildConfiguration) [0x00147] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/AppBundleInformationParser.cs:71
        at Xharness.AppRunner.InitializeAsync () [0x00046] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/AppRunner.cs:120
        at Xharness.Jenkins.TestTasks.RunSimulator.SelectSimulatorAsync () [0x002df] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:108
        at Xharness.Jenkins.TestTasks.AggregatedRunSimulatorTask.ExecuteAsync () [0x00335] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs:63
        at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x00226] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:283

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-03-25 15:59:44 -04:00
VS MobileTools Engineering Service 2 1812a46af3
Localized file check-in by OneLocBuild Task: Build definition ID 13947: Build ID 4592372
Localized file check-in by OneLocBuild Task
2021-03-25 12:26:11 -07:00
VS MobileTools Engineering Service 2 92e847b68e Localized file check-in by OneLocBuild Task 2021-03-25 12:25:59 -07:00
TJ Lambert a401654dc7
[Localization] Adding Check-In Capability (#10965) 2021-03-25 14:22:49 -05:00
TJ Lambert cae0be6e73
[Localization] Adding OneLocBuildPat Variable (#10942)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
Co-authored-by: Connor Adsit <connor.adsit@gmail.com>
2021-03-25 09:59:39 -05:00
Rolf Bjarne Kvinge cfe0a309dc
[CoreCLR] Add support for mono_assembly_open. (#10962)
This requires a few things:

* [runtime] Add support for generating managed delegates only for CoreCLR.

    However, since our managed code is shared between CoreCLR and MonoVM, the
    best we can do is to make these CoreCLR-only delegates .NET-only.

* [runtime] Make it possible to implement Mono Embedding API in the CoreCLR bridge

    By making it possible to skip the automatically generated Mono Embedding

* [runtime] Add a MonoObject implementation for CoreCLR.

    We need a way to represent a managed object in native code, and since most
    our existing runtime code uses MonoObjects, we use the same for the
    CoreCLR bridge, just our own version of it. In Mono, the MonoObjects are
    tracked by the GC (which scans the stack), but we can't make CoreCLR scan
    the stack, so we use a reference counted version of MonoObject instead -
    we just put the GCHandle into a reference counted MonoObject, and when the
    MonoObject is freed, then we free the GCHandle as well.

* Go through all uses of mono_assembly_open, and make sure they release the
  returned assembly.
2021-03-25 15:56:56 +01:00
Rolf Bjarne Kvinge 1d9c9baf25
[msbuild] Fix ItemName vs PropertyName confusion in task output. (#10936)
There doesn't seem to have been any ill effects from the confusion, but it's
better done the right way.
2021-03-25 15:51:37 +01:00
Sebastien Pouliot 8e3be82e44
[tests] Fix introspection tests running on macOS 11.3 (beta 5) (#10947) 2021-03-25 09:09:30 -04:00
Sebastien Pouliot 7706c42b5c
[generate-type-forwarders] Add interfaces to types (#10960)
and that requires ensuring all (implicit/explicit) interface members are
generated...

**Example**

Removed interfaces:

```csharp
IARAnchorCopying
Foundation.INSCoding
Foundation.INSCopying
Foundation.INSSecureCoding
```
2021-03-25 09:07:18 -04:00
Manuel de la Pena 08b13589c7
[CI][APDiff] Fix pattern matching. (#10961) 2021-03-25 08:35:22 -04:00
Rolf Bjarne Kvinge a82575189b [CoreCLR] Add support for mono_assembly_open.
This includes going through all uses of mono_assembly_open, and make sure the release
the returned assembly.
2021-03-25 07:32:32 +01:00