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

10653 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge f0a0d08aeb
[runtime] Call into managed code to handle runtime exceptions. (#11381)
* [runtime] Call into managed code to handle runtime exceptions.

This makes things easier for CoreCLR.

There should be no significant performance hits; this code path is
exceptional, and exceptions are already very heavy-weight anyways.

* Update to use xamarin_free instead of mono_free as per review.

* Port more to managed code.
2021-05-04 08:19:46 +02:00
Sebastien Pouliot 72a6d60d2b
[tests][dotnet] Bump MSBuild.StructuredLogger to 2.1.472 to fix ArgumentNullException in our tests (#11422) 2021-05-03 19:51:52 -04:00
Manuel de la Pena b720b44827
[CI] Just requests translations in the cron job. (#11420)
Execute the loc step + the creation of a PR only in the cron job and
skipt it in anyother build.
2021-05-03 11:35:18 -04:00
Manuel de la Pena 19482a71ae
[CI] Allow to enable or disable the dotnet builds. (#11358)
Create a new parameter that can be used to decide if we build or not the
dotnet parts of the project. If we do not, we make sure that we do not
have any errors in all the other steps.
2021-05-02 20:31:42 -04:00
Manuel de la Pena 47f273b4f6
[Tests] Update xamarin domain to make tests not fail. (#11408)
A wrong implementation of a redirect was added and returns a 403 and not
a 302 resulting in an error. Update to the final destination of the
redirect and be happy.

fixes https://github.com/xamarin/maccore/issues/2432
2021-05-02 20:11:16 -04:00
Manuel de la Pena cc05e967a4
[Generator Diff] Ignore file we are not interested in. (#11409) 2021-05-02 20:08:51 -04:00
Sebastien Pouliot 5ef7fb2784
[dotnet][msbuild] Strip symbols from native executable (#11378)
We have to consider (setup and process) `libSystem.Globalization.Native`
in order not to remove the required symbols when stripping the native
executable.

Ignore `libSystem.Globalization.Native` for dotnet / catalyst
ref: https://github.com/xamarin/xamarin-macios/issues/11392
2021-05-02 15:06:11 -04:00
Connor Adsit 88554a71d6
Enable setting provisionator channel as parameter (#11377)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-30 16:47:15 -04:00
Manuel de la Pena 4d93be60c6
[CI] Add a prefix to make it nicer to humans when several builds happen. (#11391) 2021-04-30 08:24:12 -04:00
Emanuel Fernandez Dell'Oca 2aa6c5aa6b
[dotnet] Fixes _RunILLink from Windows for Preview 4 (#11390)
There were some changes on the original target.
2021-04-30 08:46:51 +02:00
Rolf Bjarne Kvinge 8e9f86aad8
[runtime] Implement mono_method_get_class for CoreCLR. (#11389) 2021-04-30 07:53:30 +02:00
Rolf Bjarne Kvinge 6f743fd292
[build] Skip building stuff that isn't enabled. (#11385) 2021-04-30 07:51:58 +02:00
Rolf Bjarne Kvinge 4b8c328a48
[mlaunch] Only build if both iOS and macOS are enabled. (#11384) 2021-04-30 07:50:14 +02:00
Rolf Bjarne Kvinge 655f2f921f
[runtime] Implement xamarin_get_reflection_method_method for CoreCLR. (#11383) 2021-04-30 07:49:25 +02:00
Rolf Bjarne Kvinge cb32305434
[msbuild] Show tool output with high importance if the tool fails. (#11380)
Build failures will now include things like this for quiet builds:

    Tool xcrun execution finished (exit code = 1).

    Undefined symbols for architecture x86_64:
      "_GlobalizationNative_LoadICUData", referenced from:
         -u command line option
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
2021-04-30 07:44:27 +02:00
Rolf Bjarne Kvinge c96ae4c73d
[bgen] Ship all files published by 'dotnet publish' for bgen. Fixes #11269. (#11362)
Ship all files published by 'dotnet publish' for bgen, not only files prefixed
by 'bgen*'. This way we ship Mono.Options.dll too (and we won't crash at
launch trying to look for it).

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

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-30 07:41:50 +02:00
Manuel de la Pena 993c744347
[CI] Re-enable API and Generator diff. (#11187)
Use the jenkins script as a base to get the PAI & generator from stable
diff back to the CI. Comment is not perfect, but does provide the
required information. The comment can be improve in a later commit since
this is getting too large.
2021-04-29 17:53:06 -04:00
Sebastien Pouliot e2d65529dc
[tests][xtro] Fix recent failures (#11386)
New file was not committed (should have been with a rename)
2021-04-29 15:46:20 -04:00
Alexander Köplinger d7d69a6bf8
[dotnet][msbuild] Fix property for native http handler (#11388)
We were documenting the wrong name (fix in https://github.com/dotnet/runtime/pull/52055) which lead Sebastien to change it to the wrong one in 095b7e1105
2021-04-29 15:40:41 -04:00
Sebastien Pouliot 426d6d6bea
[tests][xtro] Fix catalyst changes with xcode12.5 RC (#11340)
xtro should soon be re-enabled and spot those on the (backport) PR
2021-04-29 10:14:05 -04:00
Sebastien Pouliot 8679482cc0
[dotnet] Fix release builds on devices (#11367)
Fixed by removal of
```
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
```
which is (should be) the default.

All our local usage compare with it with `true` so this likely comes from
somewhere else (sdk / runtime).

It does not really have a huge impact on build size (and the small diff
is probably the source of the crash)

* fails (17,479,981): https://gist.github.com/spouliot/6f8defb8f940e68314ba167ea76dc9bf
* works (17,502,741): https://gist.github.com/spouliot/d06f0b1b95e114fe469ce49081c70e33

Also fix target to run a release (no debug) build, which is more helpful
"out of the box" :)

Tracking issue with: https://github.com/xamarin/xamarin-macios/issues/11366
2021-04-29 09:44:14 -04:00
Rolf Bjarne Kvinge 174bafe9b0
[runtime] MapKit is available on macOS/arm64. (#11363) 2021-04-29 14:45:58 +02:00
Rolf Bjarne Kvinge fdd386b68f
[runtime] Remove dead code. (#11354)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-29 13:56:54 +02:00
Rolf Bjarne Kvinge d9ec37ca2d
[tests] Build a macOS/arm64 version of libtest. (#11364)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-29 13:41:52 +02:00
Mauro Agnoletti b4b8ee735c
Updated Xamarin.Messaging version (#11369)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-29 09:05:52 +02:00
Rolf Bjarne Kvinge ec7dc80b59
[tests] Add a bluetooth usage description to monotouch-test/macOS. (#11355)
This seems to be required when running monotouch-test with lldb (!) - no idea
why it doesn't fail otherwise.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-29 08:37:36 +02:00
Rolf Bjarne Kvinge 24cf0becd2
[generator] Improve performance for the printing inner loop. (#11365)
* Remove 1 array allocation per print statement.
* Remove 2 string concatenations per print statement.
* Don't indent empty lines.

For the generated code for watchOS, this is the difference (time-wise I wasn't
able to measure anything significant, although the memory savings are
significant):

Before:

    Allocation summary
           Bytes        Count  Average Type name
     535.485.544    7.115.025       75 System.String
     145.340.480    2.270.945       64 IKVM.Reflection.CustomAttributeData
     110.149.624    1.238.394       88 System.Char[]
    ...
    Total memory allocated: 1.793.323.536 bytes in 28.827.325d objects

After:

    Allocation summary
           Bytes        Count  Average Type name
     494.592.328    6.624.441       74 System.String
     145.340.480    2.270.945       64 IKVM.Reflection.CustomAttributeData
      99.345.984      968.303      102 System.Char[]
    ...
    Total memory allocated: 1.741.626.784 bytes in 28.066.650d objects

Difference:

    Allocation summary
           Bytes       Count  Average Type name
     -40.893.216    -490.584       -1 System.String
               0           0       64 IKVM.Reflection.CustomAttributeData
     -10.803.640    -270.091      +14 System.Char[]
    ...
    Total memory allocated: -51.696.752 bytes in -760.675 objects

This was measured by executing the following in an already built working copy:

    /Library/Frameworks/Mono.framework/Versions/Current/bin/mono --profile=log:nocalls,alloc --debug build/common/bgen.exe @build/watchos.rsp

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-29 07:54:21 +02:00
Manuel de la Pena a4426e8a5c
[CI] Unblock the CI by using our own channel for provisionator. (#11368) 2021-04-28 16:22:22 -04:00
Rolf Bjarne Kvinge e818c99bc8
[NSObject] Don't call into Objective-C (the Description property) for disposed objects. (#11353)
Calling into Objective-C for disposed objects may crash, and calling ToString
shouldn't crash.
2021-04-28 07:42:35 +02:00
Rolf Bjarne Kvinge 8cb8fd9a32
[dotnet] Fix casing for ARM64 architecture. (#11350) 2021-04-28 07:41:35 +02:00
Rolf Bjarne Kvinge a01a96a407
[runtime] Implement xamarin_[get|set]_flags_for_nsobject. (#11347) 2021-04-28 07:40:43 +02:00
Rolf Bjarne Kvinge 2b0a9f5bc1
[CoreCLR] Implement xamarin_get_nsobject_handle. (#11346) 2021-04-28 07:34:57 +02:00
Rolf Bjarne Kvinge e4960ad9e3
[dotnet] Build the partial static registrar for CoreCLR. (#11345)
* The generated static registration code will eventually be different.
* The generated code has to be compiled with different compiler flags.

This also required adding a new overload of xamarin_mono_object_release for the generated
code to compile.
2021-04-28 07:34:40 +02:00
Manuel de la Pena a1a5c01935
[Xharness] Fix the test selector. (#11315)
Fix the tests selector by setting the PR number in an env variable that
is not longer linked with Jenkins.

Fixes #11299
2021-04-27 09:23:21 -04:00
Rolf Bjarne Kvinge 43f1d02dae
[CoreCLR] Implement xamarin_gchandle_get_target. (#11333)
This also meant reviewing calling code to make sure that MonoObject*s are
released when they should be, which meant reviewing every method that returns
a MonoObject*, and release the result.
2021-04-27 14:59:03 +02:00
Sebastien Pouliot cd4e5b543e
[videotoolbox] Update for dotnet attributes (#11342)
and ajust xtro for unavbailable Catalyst API
2021-04-27 08:43:59 -04:00
Peter Collins b88c3bb031
[build] Create Microsoft.iOS.Windows.Sdk workload pack (#11251)
Converts the Microsoft.iOS.Windows.Sdk NuGet package into a proper
[workload SDK pack][0].  The entry point for this pack has been changed,
and it is now imported through the `WorkloadManifest.targets` file
included in `Microsoft.NET.Workload.iOS`, rather than being imported
directly from `Microsoft.iOS.Sdk`.

Import ordering has otherwise changed slightly.  The following files are
now imported before the majority of the `Microsoft.iOS.Sdk` (and the 
majority of the .NET SDK targets):

 * Xamarin.iOS.Common.Before.props
 * Xamarin.iOS.Common.Before.targets

After this the majority of the .NET SDK targets will load, followed by
the `Microsoft.iOS.Sdk` targets. Finally, everything declared in the
`<AfterMicrosoftNETSdkTargets/>` hook loads, which consists of:

 * Microsoft.iOS.Windows.Sdk.targets
 * tools/msbuild/*

[0]: https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-manifest.md#sdk-packs

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-04-27 07:44:51 +02:00
Manuel de la Pena 5de96fd9f8
[CI] Continue on error when we cannot publish a nuget. (#11336) 2021-04-26 18:45:49 -04:00
Marius Ungureanu b930f9cce9
Make NSWindow appearanceSource null allowed (#11334)
Native headers show it's null_resettable.

```objc
/// If set, the receiver will inherit the appearance of that object, as well as use KVO to observe its effectiveAppearance for changes. Typically this is used for child windows that are shown from a parent window or specific view. Defaults to NSApp.
@property (weak, null_resettable) NSObject<NSAppearanceCustomization> *appearanceSource API_AVAILABLE(macos(10.14));
```
2021-04-26 18:02:25 -04:00
Manuel de la Pena 99fa931a27
[CI] Fix nuget messaging in case of failure. (#11335) 2021-04-26 13:29:24 -04:00
Manuel de la Pena 9ff88c19a1
[CI] Workaorund misconfig pools. (#11323)
For some reason, some of the internal hosted pools have been set without
the OS version (WRONG WRONG). The simples way is to allow to skip this
check in those pools over re-configuring all bots.

'We can lick gravity, but sometimes the paperwork is overwhelming.'
2021-04-26 10:22:29 -04:00
Manuel de la Pena 52ae1dd1da
[CI] Fix mac tests provisioning. (#11324) 2021-04-26 10:21:14 -04:00
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