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

10611 Коммитов

Автор SHA1 Сообщение Дата
Emanuel Fernandez Dell'Oca 7415b898f8
[dotnet] Sets missing ILLink parameter from Windows (#11319)
This was making the linker to not behave correctly, and apps were crashing on the simulator.
2021-04-26 10:06:34 +02:00
Rolf Bjarne Kvinge 7b5a1c251c
[runtime] There's no need to attach/detach the current thread in CoreCLR. (#11307) 2021-04-26 07:46:55 +02:00
Alex Soto 1f65e8bdca [Versions] Bump version after d16-10 branch creation 2021-04-25 22:20:21 -04:00
Manuel de la Pena fee57615f9
[CI] Add the context in the failed device bots. (#11318) 2021-04-24 06:46:09 -04:00
Manuel de la Pena 541bfded17
[Maccore] Bump maccore to the latests. (#11312)
Commits:

* [Xamarin.Hosting] Show installation progress for higher verbosity (#2424) cddbd1915d

Full diff: d11721f55e..cddbd1915d
2021-04-23 17:25:52 -04:00
Manuel de la Pena 26d64a1a24
[CI] Unify both failing statuse. (#11311) 2021-04-23 16:45:59 -04:00
Rolf Bjarne Kvinge 5d42c933f1
[runtime] Move xamarin_create_managed_ref internal call to managed code. (#11271)
Move the xamarin_create_managed_ref internal call to managed code, to ease things
with CoreCLR.

In order to preserve performance, this wasn't a straight forward port.

* monotouch_create_managed_ref used to detect if there already was a GCHandle for
  a native object. To avoid a managed->native transition, this logic has now been
  moved into the code that sets the GCHandle (the xamarinSetGCHandle🎏 / xamarin_set_gchandle_trampoline
  code), and these methods return a value saying whether the GCHandle was set or
  not.

* xamarin_create_gchandle will check the retain count to determine whether to create
  a weak or a strong GCHandle for the managed object. In this particular case we
  should never need to create a strong GCHandle, which means that we don't need to
  check the retain count (saving a managed->native transition).

Using the new perftest (#11298), I get very similar numbers for both old code and new code: https://gist.github.com/rolfbjarne/e0fc2ae0f21da15062b4f051138679af (multiple runs). Sometimes the old code is faster, sometimes the new code is faster (although the old code tends to be the one who wins).

In any case there aren't any significant performance hits due to this change, so it should be good to go.
2021-04-23 18:42:11 +02:00
Emanuel Fernandez Dell'Oca 9afd2aa300
[msbuild] Fixes DebugType for VS (#11297)
We stopped converting full pdbs to mdbs on Windows, so we need to override the `DebugType` property to `portable` if it's `full`, otherwise the debugger won't work from Visual Studio.
2021-04-23 15:55:05 +02:00
Emanuel Fernandez Dell'Oca b4afe27f75
[msbuild] Removes explicit Mqtt dependency (#11302)
There were 2 "problems":
1- Messaging depends on `System.Net.Mqtt` and not in `System.Net.Mqtt.Server`. It still worked because the latter depends on the former package, but we were restoring unnecessary dependencies.
2- We don't need an excplicit reference, since `Xamarin.Messaging.Build.Client` already depends on it, and by removing it we avoid having another dependency to keep up to date.
2021-04-23 15:53:36 +02:00
Rolf Bjarne Kvinge d15f683500
[tests] Add a performance test using BenchmarkDotNet. (#11298) 2021-04-23 13:29:06 +02:00
Jonathan Peppers b1080ee9bf
[catalyst] remove splash screens (#11300)
Context: https://github.com/dotnet/maui/pull/807

When implementing a new `@(MauiSplashScreen)` feature for .NET MAUI, I
found out that Catalyst doesn't have support for splash screens.

I even tested this in Xcode:

* Create a new Objective-C iOS app
* Make `LaunchScreen.storyboard` red and `Main.storyboard` green.
* Check the new `macOS` checkbox in project settings to enable
  Catalyst and be a multiplatform app.

I see red, then green on iOS but only green on macOS. I think Catalyst
completely ignores `UILaunchStoryboardName`.

This removes splash screens from the `dotnet new maccatalyst` template
as well as the `MyCatalystApp` sample project.
2021-04-23 07:38:05 +02:00
Sebastien Pouliot 095b7e1105
[dotnet] Enable more trimming switches (#11295)
Documentation
https://github.com/dotnet/runtime/blob/main/docs/workflow/trimming/feature-switches.md

Very small effect on the final app size.

Before
https://gist.github.com/spouliot/9f6fa4f15c117149905141f80fbad399

After
https://gist.github.com/spouliot/c9cefac8aa77c8c68edb9bbc77f553d0
2021-04-22 20:37:02 -04:00
Manuel de la Pena 9c2ca9ccf5
[CI] Add triggers for new release branches. (#11303) 2021-04-22 18:50:47 -04:00
Sebastien Pouliot 94caf968cc
Bump Touch.Unit to fix/report silently skipped fixtures (#11294)
Commit list for spouliot/Touch.Unit:

* spouliot/Touch.Unit@be72947 Report the reason why a fixture is being skipped by the runner
* spouliot/Touch.Unit@c3ac172 Fix grammar in comment. (#101)

Diff: f19eb45cb6...be7294761e
2021-04-22 15:33:04 -04:00
Rolf Bjarne Kvinge a3613a187f
[tools] Fix a typo in the error message for MX2301 that caused a format exception. (#11291)
Makes this error show properly:

> error MM2301: The linker step 'Setup' failed during processing: This version of {0} requires the {1} {2} SDK (shipped with Xcode {3}). Either upgrade Xcode to get the required header files or use the dynamic registrar or set the managed linker behaviour to Link Platform or Link Framework SDKs Only in your project's Mac Build Options > Linker Behavior} (to try to avoid the new APIs).. String.Format failed! Arguments were: "Microsoft.macOS" "macOS" "11.3" "12.5". Please file an issue to report this incorrect error handling.
2021-04-22 20:51:58 +02:00
Manuel de la Pena 196b4fa371
[CI] Fix pwsh. (#11296) 2021-04-22 14:01:02 -04:00
Rolf Bjarne Kvinge 0924ce55ef
Remove dead code. (#11289) 2021-04-22 16:03:05 +02:00
Filip Navara be14188892
Use the SDK UseMonoRuntime property instead of _XamarinRuntime in MSBuild (#11255)
* Use the SDK UseMonoRuntime property instead of _XamarinRuntime in MSBuild

* Fix typo

* Update Xamarin.Shared.Sdk.targets

Mono -> MonoVM
2021-04-22 16:02:56 +02: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
Rolf Bjarne Kvinge add11fbe39
[mmp] Use the resolver (and configure it correctly) when using --runregistrar. (#11288)
* Extract the code we use to configure the assembly resolver during a normal
  mmp run to make it usable for --runregistrar.
* Configure the assembly resolver we use for --runregistrar.
* Pass the assembly resolver to the registrar so that it's actually used.
* Adjust the System.Void lookup to look everywhere even if we find a corlib,
  since behavior changes a bit now that we're using an assembly resolver:
	* Previous behavior:
		1. In .NET mode, look for a corlib named System.Private.CoreLib, and fail to find it.
		2. Look in all the loaded assemblies for System.Void (and find it in System.Runtime.dll).
	* Broken behavior as a result of the resolver changes:
		1. Find corlib as System.Private.CoreLib.dll
		2. Fail to find System.Void in System.Private.CoreLib.dll, since we'd only look in corlib.
	* New behavior
		1. Find corlib as System.Private.CoreLib.dll
		2. Fail to find System.Void in System.Private.CoreLib.dll, but find it in System.Runtime.dll,
		   since we're now looking in all the loaded assemblies.

This is required to make VSMac's usage of --runregistrar
2021-04-22 14:47:47 +02:00
Emanuel Fernandez Dell'Oca 965ab98b84
[msbuild] Fixes archiving and copying files to Windows (#11277)
* [msbuild] Fixes Windows task namespace

* [msbuild] Fixes unzipping files from Windows

This is the same approach we're using on the Xamarin.iOS.Tasks project, we need to replace the System.Text.Encoding.CodePages reference assembly by it's runtime implementation before ilmerging it, otherwise when trying to unzip files from Windows we'll get a null ref exception because that's what the ref assembly implemented.

* [msbuild] Try to copy output to Windows before ending the XMA connection

When relying on BuildDependsOn we can end up running the targets after _SayGoodBye, which ends the XMA connection. `CopyDSYMFromMac` and `CopyAppBundleFromMac` need an active connection, since both copy files from the Mac to Windows.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-22 12:02:38 +02:00
Rolf Bjarne Kvinge 94ca4e7a03
[ObjCRuntime] Print to stderr if using xamarin_log fails. Fixes #11239. (#11262)
* [ObjCRuntime] Print to stderr if using xamarin_log fails. Fixes #11239.

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

* Update xtro.
2021-04-22 11:57:41 +02:00
Rolf Bjarne Kvinge e2082fd04c
[CoreCLR] Implement mono_jit_exec. (#11264)
This required adding a helper method to get the assembly name for a given
MonoAssembly, since that's what CoreCLR uses to determine what to execute.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-22 07:46:56 +02:00
Manuel de la Pena 25715b8b5f
[CI] Remove duplicated status. (#11274) 2021-04-21 21:34:27 -04:00
Mauro Agnoletti 8f0dffebfc
Updated Xamarin.Messaging version (#11245) 2021-04-21 21:34:07 -04:00
Peter Collins 7a5c28f6cc
[msbuild] Rename $(_UsingXamarinSdk) to $(UsingAppleNETSdk) (#11270)
The `$(_UsingXamarinSdk)` property has been renamed to help improve
external usability.  This change increases parity with the Android SDK,
which currently defines `$(UsingAndroidNETSdk)` for internal and
external use.
2021-04-21 21:32:33 -04:00
Manuel de la Pena fac9cdc52f
[CI][VSTS] Remove redudant status. (#11267)
VSTS already provides a status per job, since the governance tests do
not give much feedback in the comments and just set a status, we can use
the default provided by the VSTS app.
2021-04-21 21:24:13 -04:00
Manuel de la Pena bceac54356
[CI] The env var is not provided in the CI builds, just PRs. (#11268) 2021-04-21 21:23:25 -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
Manuel de la Pena 78ef8b8d03
[CI] Remove Mac OS devices that will not happen. (#11272)
Remove those devices of Mac OS X that will not happen because we cannot
run the agent in such and old device. This is due to the fact that the
agent runs using c# and we do not support such and old OS.

Also add a new stage to run tests on catalina. ATM older OS as not
working, but Catalina should work with our trusted pool.
2021-04-21 17:47:10 -04:00
Manuel de la Pena 0ad8144f17
[CI] Reduce the number of statuses when we build nugets. (#11242)
We move from having a status per nugets to two statues:

1. xamarin-macios (Nugets built) -  to let us know that we did build
   nugets.
2. xamarin-macios (Nuvets published) - to let us know tat we did pubish
   the nugets.
2021-04-21 15:51:30 -04:00
Rolf Bjarne Kvinge 0854e5a1a0
[xtro] Update MacCatalyst todos. (#11253)
Fixes:

    ?fixed-todo? Entry '!missing-pinvoke! AudioSessionAddPropertyListener is not bound' in 'MacCatalyst-AudioToolbox.todo' is not found in corresponding 'MacCatalyst-AudioToolbox.raw' file
    ?fixed-todo? Entry '!missing-pinvoke! AudioSessionGetProperty is not bound' in 'MacCatalyst-AudioToolbox.todo' is not found in corresponding 'MacCatalyst-AudioToolbox.raw' file
    ?fixed-todo? Entry '!missing-pinvoke! AudioSessionGetPropertySize is not bound' in 'MacCatalyst-AudioToolbox.todo' is not found in corresponding 'MacCatalyst-AudioToolbox.raw' file
    ?fixed-todo? Entry '!missing-pinvoke! AudioSessionInitialize is not bound' in 'MacCatalyst-AudioToolbox.todo' is not found in corresponding 'MacCatalyst-AudioToolbox.raw' file
    ?fixed-todo? Entry '!missing-pinvoke! AudioSessionSetActive is not bound' in 'MacCatalyst-AudioToolbox.todo' is not found in corresponding 'MacCatalyst-AudioToolbox.raw' file
    ?fixed-todo? Entry '!missing-pinvoke! AudioSessionSetActiveWithFlags is not bound' in 'MacCatalyst-AudioToolbox.todo' is not found in corresponding 'MacCatalyst-AudioToolbox.raw' file
    ?fixed-todo? Entry '!missing-pinvoke! AudioSessionSetProperty is not bound' in 'MacCatalyst-AudioToolbox.todo' is not found in corresponding 'MacCatalyst-AudioToolbox.raw' file
    ?fixed-todo? Entry '!missing-enum! NSTextWritingDirection not bound' in 'MacCatalyst-UIKit.todo' is not found in corresponding 'MacCatalyst-UIKit.raw' file
    Sanity check failed (8)
    make: *** [classify] Error 8
2021-04-21 15:11:35 -04:00
VS MobileTools Engineering Service 2 78e62f8564
[main] [xcode12.5] Bump for Xcode 12.5 RC (#11263)
and add the few new bindings added in the SDKs
2021-04-21 15:07:17 -04:00
Rolf Bjarne Kvinge 6d127660d5
[runtime] Move the code to wrap every managed thread with an NSAutoreleasePool to the MonoVM bridge. (#11257)
The current implementation is MonoVM-specific, and won't work with CoreCLR
(something else will have to be implemented for CoreCLR, which is tracked
here: https://github.com/xamarin/xamarin-macios/issues/11256).
2021-04-21 16:21:09 +02:00
Rolf Bjarne Kvinge 76666ccbef
[msbuild] Accept 'UseInterpreter' as an alternative for 'MtouchInterpreter'. Fixes #11138. (#11252)
Accept 'UseInterpreter' as an alternative for 'MtouchInterpreter', so that we
support the same variable name between iOS and Android.

Fixes https://github.com/xamarin/xamarin-macios/issues/11138.
2021-04-21 15:37:16 +02:00
Manuel de la Pena d0c09eb437
[CI] Fix import issue in device test templates. (#11249) 2021-04-21 09:30:50 -04:00
Rolf Bjarne Kvinge 320527a29b
[CoreCLR] Implement mono_assembly_get_object. (#11254) 2021-04-21 15:00:10 +02:00
Manuel de la Pena 0455d94ba8
[CI][VSTS] Ensure statuses are set in the correct commit and not the merge commit. (#11250)
On a pull request, Azure DevOps does not build the exact version of the code that you pushed,
but a version merged with your target branch. This means that the commit
we see in the Buid.Revision is not the one of the last commit of the PR,
which makes some statuses get "lost" and checks be missed.

We make a distintion on which variable to used base on the build reason.
2021-04-21 06:11:36 -04:00
Rolf Bjarne Kvinge 405441f544
[mtouch] It seems watchOS simulators can automatically choose the right architecture from fat apps. (#11241)
* [mtouch] It seems watchOS simulators can automatically choose the right architecture from fat apps.

So we can build a fat simulator app, and not depend on mlaunch copying in the
specific architecture at launch time.

A partial fix for https://github.com/xamarin/maccore/issues/2411.

* Bump maccore.

New commits in xamarin/maccore:

* xamarin/maccore@d11721f55e [Xamarin.Hosting] Xcode seems to have changed some logic with regards to getting the primary instruments server. (#2416)
* xamarin/maccore@d27297a098 [Xamarin.Hosting] Don't copy single-arch executable over a fat executable. (#2417)
* xamarin/maccore@6c305d4aa7 [Xamarin.Hosting] Launching may succeed even if the launch request fails. Don't fail in that case. (#2415)
* xamarin/maccore@bccc91d6a0 Support ARM64 and ARM64e simulators (#2418)

Diff: c89fd6a694..d11721f55e
2021-04-21 08:00:02 +02:00
Rolf Bjarne Kvinge a026aa71b3
Make the quiet version of 'dotnet build' quieter. (#11240)
Ref: https://github.com/dotnet/sdk/issues/7986#issuecomment-604959822
2021-04-20 21:38:37 +02:00
dotnet-maestro[bot] e8f437319a
[main] Update dependencies from dotnet/installer (#11175)
* Update dependencies from https://github.com/dotnet/installer build 20210408.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21208.1

* Update dependencies from https://github.com/dotnet/installer build 20210409.4

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21209.4

* Update dependencies from https://github.com/dotnet/installer build 20210410.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21210.1

* same P4 specific fix as ccb43cba56
but the ICU support was added based on P3 but merged after ^

* Update dependencies from https://github.com/dotnet/installer build 20210412.5

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21212.5

* Update dependencies from https://github.com/dotnet/installer build 20210413.70

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21213.70

* Update dependencies from https://github.com/dotnet/installer build 20210414.14

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21214.14

* Update to new package names

Thanks @pjcollins for the heads up https://github.com/xamarin/xamarin-macios/pull/11175#issuecomment-819936692

* Update dependencies from https://github.com/dotnet/installer build 20210415.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21215.1

* Fix build (path changed to include '.mono')

* remove more '.mono' special case that are not needed anymore

* Update dependencies from https://github.com/dotnet/installer build 20210415.12

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21215.12

* Fix building apps (it now finds the native libs)

Credits to @filipnavara

8325f8dadc

* Add back IsTrimmable (or nothing gets linked)

* Update dependencies from https://github.com/dotnet/installer build 20210418.6

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21218.6

* Keep downloading the CoreCLR runtime packs.

* [runtime] Adjust the build to link with the correct runtime library for CoreCLR.

* [tests][monotouch-test] Ignore NSTimeZoneTest / All_28300 on dotnet as it hangs

Introduced with https://github.com/dotnet/runtime/pull/48931

Issue https://unicode-org.atlassian.net/browse/ICU-21591
PR https://github.com/unicode-org/icu/pull/1699

* [dotnet][msbuild] Add more (missing) '\'

Fix satellite/location assemblies and some unit tests

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-04-20 09:09:56 -04:00
Sebastien Pouliot 7d2b389ae6
[maccatalyst] Increase iOS compatibility by removing `XAMCORE_3_0` (#11238)
`XAMCORE_3_0` was added in tvOS and watchOS where binary compatibility
was not a consideration. The work to update source code for `XAMCORE_3_0`
was also minimal.

The former is not the always the case for MacCatalyst, while the latter
is still true.

Fix https://github.com/xamarin/xamarin-macios/issues/11237 and https://github.com/xamarin/xamarin-macios/issues/11236
2021-04-20 08:59:37 -04:00
Peter Collins dec81b602a
[ci] Fix artifact upload in post build pipeline (#11231)
The artifact upload task in post-build-pipeline.yaml was not indented
correctly and the automatic pipeline triggers were not firing as a
result.
2021-04-16 16:01:39 -04:00
Sebastien Pouliot 289053b1e3
[dotnet] Use `[AssemblyMetadata ("IsTrimmable", "True")]` in platforms assemblies (#11228)
Fix https://github.com/xamarin/xamarin-macios/issues/10673
2021-04-16 15:08:19 -04:00
Sebastien Pouliot 3511995fd7
[linker] Obsolete 'LinkerSafeAttribute' in favor of `AssemblyMetadata` (#11229)
In this case we can obsolete the attribute on both legacy and dotnet
since the replacement attribute is available on both. However this does
require a small update to the legacy linker (and is part of the PR).

Fix https://github.com/xamarin/xamarin-macios/issues/10674
2021-04-16 15:06:49 -04:00
Sebastien Pouliot 0373f77bb3
[dotnet] Add `[Uns|S]upportedOSPlatformAttribute` to manual bindings (part 1) (#11230)
Once complete the `LegacyAttributes` can be enabled in introspection to
ensure no old attributes are introduced.
2021-04-16 15:05:02 -04:00
Sebastien Pouliot 7926009d7e
[dotnet][msbuild] Copy dylibs for macOS and Mac Catalyst (#11226)
Fix crash for monotouch-test running on macOS / dotnet

Fix https://github.com/xamarin/maccore/issues/2413
2021-04-16 09:59:21 -04:00
Manuel de la Pena bc24d3b379
[MaciosBinaries] Bump macios-binaries to pick the latests malaunch. (#11217) 2021-04-15 17:30:01 -04:00
Manuel de la Pena 6e7205a5f4
[CI] Avoid other not needed steps on provisioning issues. (#11199) 2021-04-15 17:25:30 -04:00
Jonathan Peppers 3b890b2d4b
[dotnet] move WorkloadManifest.* files to /data/ folder (#11221)
Context: https://github.com/dotnet/designs/pull/188/files#diff-8fcaa29d8e6f00b34b3cb1830d93f33e75f04424780a66a3c658c7021048e74fR125

The future `dotnet workload install` commands will be expecting that
the `.nupkg` for a workload will contain:

* `data/WorkloadManifest.json`
* `data/WorkloadManifest.targets`

This was done so that we don't interfere with NuGet's spec for layout
of a `.nupkg` file. You are allowed to put whatever you like in a
`/data/` folder.

The layout on disk in `/usr/local/share/dotnet`, etc. is unchanged, so
we don't need any changes to our installers, etc.

Android side:

https://github.com/xamarin/xamarin-android/pull/5843
2021-04-15 17:18:40 -04:00