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

10696 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 4b2ee6cb79
[MetalPerformanceShaders] Stop excluding ARM64-specific code paths from macOS. (#11489) 2021-05-10 23:31:56 +02:00
Rolf Bjarne Kvinge 3958940366
Bump system mono to get fix for #11475. (#11486)
Fixes https://github.com/xamarin/xamarin-macios/issues/11475.
2021-05-10 23:13:57 +02:00
Rolf Bjarne Kvinge e4fbc5198b
[runtime] Implement several xamarin_is_class_* variants for CoreCLR. (#11481)
When using the MonoVM, we compare MonoClass instances by pointer. This turns
out a bit complicated for CoreCLR, because our MonoClass instances are not
unique (there can be multiple MonoClass instances that refer to the same
type), so instead implement helper methods that do the comparison. This also
has the benefit of not requiring any memory allocations on CoreCLR.
2021-05-10 23:12:52 +02:00
Rolf Bjarne Kvinge 3623a13ab2
[runtime] Implement a managed implementation of a mono_reference_queue for CoreCLR. (#11487)
Also remove the declaration of mono_gc_reference_queue_free, it's never called.
2021-05-10 23:09:39 +02:00
Rolf Bjarne Kvinge 8fc51f7e8e
[runtime] Implement mono_type_get_object for CoreCLR. (#11484) 2021-05-10 15:38:13 +02:00
Rolf Bjarne Kvinge c14fa03336
[runtime] Implement mono_class_is_[valuetype|byref] for CoreCLR. (#11482)
* [runtime] Implement mono_type_is_byref for CoreCLR.

* [runtime] Implement mono_class_is_valuetype for CoreCLR.
2021-05-10 15:10:03 +02:00
Rolf Bjarne Kvinge d89d97d1fe
[runtime] Implement mono_class_get_name[space] for CoreCLR. (#11483) 2021-05-10 14:42:47 +02:00
Peter Collins fc22a097a8
[build] Add installer dependency to linker packs (#11352)
Adds a coherent parent dependency to `Microsoft.NET.ILLink.Tasks`, which
ensures that it will not be updated past the version included in
`Microsoft.Dotnet.Sdk.Internal`.

These changes allow us to remove our mono/linker darc subscriptions, as
`Microsoft.Dotnet.Sdk.Internal` updates will also bring in the latest
`Microsoft.NET.ILLink.Tasks` that the SDK references.  This will reduce
the number of dependency update PRs created by maestro.

Since the `Microsoft.NET.ILLink.Tasks` and `Microsoft.NET.ILLink` NuGet
packages are created by the same build, we only need to track one of
these package IDs in eng/Version* files.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-05-10 13:00:07 +02:00
Mauro Agnoletti 11465a7c79
Updated Xamarin.Messaging version (#11479) 2021-05-10 07:26:20 +02:00
Rolf Bjarne Kvinge 695eb003fb
[runtime] Implement mono_thread_detach_if_exiting and mono_free for CoreCLR. (#11480)
* [runtime] Implement mono_free for CoreCLR.

* [runtime] Implement mono_thread_detach_if_exiting for CoreCLR.
2021-05-10 07:25:45 +02:00
TJ Lambert 4aa8d9ab53
Merge pull request #11478 from tj-devel709/AddingTempResxFiles
[Localization] Using old translations for our MSBuild localization until we receive updated localization strings from the Loc team.
2021-05-07 23:20:55 -05:00
Rolf Bjarne Kvinge f61cc98c53
[runtime] Implement mono_class_is_delegate for CoreCLR. (#11476) 2021-05-07 22:21:19 +02:00
tj_devel709 de63dd6891 changing the resx files TEMPORARILY 2021-05-07 10:49:38 -05:00
tj_devel709 6d23054789 removing ignores from 2 msbuild localization tests as well as inserting forgotten test casess 2021-05-07 10:43:03 -05:00
TJ Lambert 6cf9d78298
[Localization] Enabling OneLocBuild for every build (#11472)
Enabling OneLocBuild to run every build we have on main because the Loc team will need the Loc artifacts to be published every time. By moving the conditional to the isPRSelected input, we will run the task every time but only create the PRs once a week!
2021-05-07 09:30:59 -05:00
Rolf Bjarne Kvinge 1a689d3b14
[runtime] Implement mono_class_from_mono_type for CoreCLR. (#11470) 2021-05-07 15:47:03 +02:00
Rolf Bjarne Kvinge 87d018d57e
[msbuild] Remove dead code. (#11468) 2021-05-07 15:41:36 +02:00
Sebastien Pouliot ccd769bd9d
[linker] Split CoreTypeMapStep into two parts (#11474)
The newly extracted `RegistrarRemovalTrackingStep` can be used inside
`dotnet-linker` to remove the dynamic registrar (if not required by some
other code).
2021-05-07 08:20:23 -04:00
TJ Lambert a154f30e03
[Localization] Localization changes for OneLocBuild (#11395)
Enabling MSBuild, Mtouch, and all their localization dependencies to use the new resx files provided from OneLocBuild.
2021-05-06 19:42:53 -05:00
Manuel de la Pena 5fba60958d
[CI] Detect ig we are running a vm and set the vendor. (#11471) 2021-05-06 14:58:57 -04:00
Manuel de la Pena 3b850752d4
[CI] Store the config in a json to later be shared with other pipelines. (#11460)
We are using cascade pipelines, those are triggered automatically and
get all the artifacts. We create a json file that will be used by one of
the cascaded pipelines to make educated choices.
2021-05-06 10:44:15 -04:00
Rolf Bjarne Kvinge 63db14ec7d
[runtime] Implement mono_method_signature and related signature methods for CoreCLR. (#11465) 2021-05-06 16:19:59 +02:00
Sebastien Pouliot 625d8cd090
[dotnet][linker] Do not remove `[LinkWith]` using xml (#11457)
This is removed _too soon_ and we end up not linking with the native
library, which makes the build fail.

Fixes https://github.com/xamarin/xamarin-macios/issues/11456
2021-05-06 09:26:23 -04:00
Jonathan Peppers cb96817f07
[dotnet] rename workload to Microsoft.NET.Sdk._platform_.Manifest-6.0.100 (#11436)
* [dotnet] rename workload to Microsoft.NET.Sdk._platform_.Manifest-6.0.100

Context: https://github.com/dotnet/designs/pull/188/files#diff-8fcaa29d8e6f00b34b3cb1830d93f33e75f04424780a66a3c658c7021048e74fR125
Context: https://github.com/xamarin/xamarin-android/pull/5898

The `$(PackageId)` of our workload `.nupkg` needs to be:

    Microsoft.NET.Sdk._platform_.Manifest-6.0.100

While the `$(PackageVersion)` remains the same as before.

The layout on disk will change to:

    dotnet\sdk-manifests\6.0.100\Microsoft.NET.Sdk._platform_\
        WorkloadManifest.json
        WorkloadManifest.targets

Note that `.Manifest` and `-6.0.100` are not in the folder name on disk.

At the same time, let's also update the `version` in
`WorkloadManifest.json` so it contains the proper version for our
workload. This used to not be possible because `version` was a `long`,
but it now is a `string` where we can put our version.

* Use $(DOTNET6_VERSION_BAND)

* Pass in -p:VersionBand to 'dotnet pack'
2021-05-06 07:46:01 +02:00
Emanuel Fernandez Dell'Oca d5f1671184
[dotnet] Fix _DetectSdkLocations from Windows (#11451)
This task ends up setting as env variable the Xamarin Sdk root directory on the Mac, but when building from Windows it was setting the Windows path, so instead we need to override it with the proper value on macOS.

This should not change the original behavior when building from macOS.
2021-05-06 07:42:43 +02:00
Rolf Bjarne Kvinge c51cba525a
[runtime] Implement mono_runtime_invoke for CoreCLR. (#11439)
* [runtime] Implement mono_runtime_invoke for CoreCLR.

* [runtime] We always need a native xamarin_mono_object_retain function.
2021-05-06 07:25:43 +02:00
Manuel de la Pena 3f8a9ac9e0
[CI] Dump the hardware of the bot to see if we are virtual. (#11453)
Are we virtual or are we dancers?
2021-05-05 22:57:10 -04:00
Manuel de la Pena 3ac7d583d5
[CI] Remove apitest from the tests executed inolder macs. (#11452)
The test was merge with the xammac_tests in commit
93bbfe7a86
but we did not have the tests running to know.

This should fix some of the failures we have in older macs.
2021-05-05 22:02:25 -04:00
Mike Bond 906cb14c06
[CI] Use yaml-templates agent pool selector (#11356)
Use release version of yaml-templates agent pool selector from main

https://github.com/xamarin/yaml-templates/pull/115
2021-05-05 22:01:58 -04:00
Sebastien Pouliot 4ba7bf3b9d
[tests][dotnet] A few helping touch to do size comparison (#11446)
- Make git ignore the generated `report.md`
- Fix `.aotdata` reported total size in reports (was always 0)
- Add option to strip the dotnet app bundle (until [1]) so it's easier to compare with _oldnet_ sizes.

[1] https://github.com/xamarin/xamarin-macios/issues/11445
2021-05-05 19:15:18 -04:00
Rolf Bjarne Kvinge 50b68d4aab
[runtime] Print more information about the exception for unhandled managed exceptions. (#11440)
This eases debugging when trying to figure out what went wrong.
2021-05-05 16:31:03 +02:00
Sebastien Pouliot a3cf2eaa79
[dotnet][linker] Add a shared ILLink.LinkAttributes.xml file for the platform assemblies (#11424) 2021-05-05 08:28:15 -04:00
Sebastien Pouliot b90fa78bfa
[dotnet][linker] Only register assemblies that we're not deleting from the bundle (#11437)
So we generate this, inside `registrar.mm`, for a simple app

```objc
	static const char *__xamarin_registration_assemblies []= {
		"MySingleView",
		"System.Runtime.Serialization.Formatters",
		"System.Runtime",
		"System.Private.CoreLib",
		"Xamarin.iOS"
	};
```

instead of

```objc
	static const char *__xamarin_registration_assemblies []= {
		"MySingleView",
		"Microsoft.CSharp",
		"Microsoft.VisualBasic.Core",
		"Microsoft.VisualBasic",
		"Microsoft.Win32.Primitives",
		"Microsoft.Win32.Registry",
		"System.AppContext",
		"System.Buffers",
		"System.Collections.Concurrent",
		"System.Collections.Immutable",
		"System.Collections.NonGeneric",
		"System.Collections.Specialized",
		"System.Collections",
		"System.ComponentModel.Annotations",
		"System.ComponentModel.DataAnnotations",
		"System.ComponentModel.EventBasedAsync",
		"System.ComponentModel.Primitives",
		"System.ComponentModel.TypeConverter",
		"System.ComponentModel",
		"System.Configuration",
		"System.Console",
		"System.Core",
		"System.Data.Common",
		"System.Data.DataSetExtensions",
		"System.Data",
		"System.Diagnostics.Contracts",
		"System.Diagnostics.Debug",
		"System.Diagnostics.DiagnosticSource",
		"System.Diagnostics.FileVersionInfo",
		"System.Diagnostics.Process",
		"System.Diagnostics.StackTrace",
		"System.Diagnostics.TextWriterTraceListener",
		"System.Diagnostics.Tools",
		"System.Diagnostics.TraceSource",
		"System.Diagnostics.Tracing",
		"System.Drawing.Primitives",
		"System.Drawing",
		"System.Dynamic.Runtime",
		"System.Formats.Asn1",
		"System.Globalization.Calendars",
		"System.Globalization.Extensions",
		"System.Globalization",
		"System.IO.Compression.Brotli",
		"System.IO.Compression.FileSystem",
		"System.IO.Compression.ZipFile",
		"System.IO.Compression",
		"System.IO.FileSystem.AccessControl",
		"System.IO.FileSystem.DriveInfo",
		"System.IO.FileSystem.Primitives",
		"System.IO.FileSystem.Watcher",
		"System.IO.FileSystem",
		"System.IO.IsolatedStorage",
		"System.IO.MemoryMappedFiles",
		"System.IO.Pipes.AccessControl",
		"System.IO.Pipes",
		"System.IO.UnmanagedMemoryStream",
		"System.IO",
		"System.Linq.Expressions",
		"System.Linq.Parallel",
		"System.Linq.Queryable",
		"System.Linq",
		"System.Memory",
		"System.Net.Http.Json",
		"System.Net.Http",
		"System.Net.HttpListener",
		"System.Net.Mail",
		"System.Net.NameResolution",
		"System.Net.NetworkInformation",
		"System.Net.Ping",
		"System.Net.Primitives",
		"System.Net.Quic",
		"System.Net.Requests",
		"System.Net.Security",
		"System.Net.ServicePoint",
		"System.Net.Sockets",
		"System.Net.WebClient",
		"System.Net.WebHeaderCollection",
		"System.Net.WebProxy",
		"System.Net.WebSockets.Client",
		"System.Net.WebSockets",
		"System.Net",
		"System.Numerics.Vectors",
		"System.Numerics",
		"System.ObjectModel",
		"System.Private.DataContractSerialization",
		"System.Private.Uri",
		"System.Private.Xml.Linq",
		"System.Private.Xml",
		"System.Reflection.DispatchProxy",
		"System.Reflection.Emit.ILGeneration",
		"System.Reflection.Emit.Lightweight",
		"System.Reflection.Emit",
		"System.Reflection.Extensions",
		"System.Reflection.Metadata",
		"System.Reflection.Primitives",
		"System.Reflection.TypeExtensions",
		"System.Reflection",
		"System.Resources.Reader",
		"System.Resources.ResourceManager",
		"System.Resources.Writer",
		"System.Runtime.CompilerServices.Unsafe",
		"System.Runtime.CompilerServices.VisualC",
		"System.Runtime.Extensions",
		"System.Runtime.Handles",
		"System.Runtime.InteropServices.RuntimeInformation",
		"System.Runtime.InteropServices",
		"System.Runtime.Intrinsics",
		"System.Runtime.Loader",
		"System.Runtime.Numerics",
		"System.Runtime.Serialization.Formatters",
		"System.Runtime.Serialization.Json",
		"System.Runtime.Serialization.Primitives",
		"System.Runtime.Serialization.Xml",
		"System.Runtime.Serialization",
		"System.Runtime",
		"System.Security.AccessControl",
		"System.Security.Claims",
		"System.Security.Cryptography.Algorithms",
		"System.Security.Cryptography.Cng",
		"System.Security.Cryptography.Csp",
		"System.Security.Cryptography.Encoding",
		"System.Security.Cryptography.OpenSsl",
		"System.Security.Cryptography.Primitives",
		"System.Security.Cryptography.X509Certificates",
		"System.Security.Principal.Windows",
		"System.Security.Principal",
		"System.Security.SecureString",
		"System.Security",
		"System.ServiceModel.Web",
		"System.ServiceProcess",
		"System.Text.Encoding.CodePages",
		"System.Text.Encoding.Extensions",
		"System.Text.Encoding",
		"System.Text.Encodings.Web",
		"System.Text.Json",
		"System.Text.RegularExpressions",
		"System.Threading.Channels",
		"System.Threading.Overlapped",
		"System.Threading.Tasks.Dataflow",
		"System.Threading.Tasks.Extensions",
		"System.Threading.Tasks.Parallel",
		"System.Threading.Tasks",
		"System.Threading.Thread",
		"System.Threading.ThreadPool",
		"System.Threading.Timer",
		"System.Threading",
		"System.Transactions.Local",
		"System.Transactions",
		"System.ValueTuple",
		"System.Web.HttpUtility",
		"System.Web",
		"System.Windows",
		"System.Xml.Linq",
		"System.Xml.ReaderWriter",
		"System.Xml.Serialization",
		"System.Xml.XDocument",
		"System.Xml.XPath.XDocument",
		"System.Xml.XPath",
		"System.Xml.XmlDocument",
		"System.Xml.XmlSerializer",
		"System.Xml",
		"System",
		"WindowsBase",
		"mscorlib",
		"netstandard",
		"System.Private.CoreLib",
		"Xamarin.iOS"
	};
```

It probably has a positive impact on build time (but not measured).
2021-05-05 08:26:02 -04:00
Rolf Bjarne Kvinge 6225cac669
[msbuild/dotnet] Fix build logic when using .NET to not try to use nor require any version of installed Xamarin.iOS/Xamarin.Mac. Fixes #10827. (#11433)
* [dotnet] Ship the buildinfo file.

* [msbuild/dotnet] Fix build logic when using .NET to not try to use nor require any version of installed Xamarin.iOS/Xamarin.Mac. Fixes #10827.

We do this by setting the _XamarinSdkRoot variable in our .NET logic, which
our existing shared build logic reads, passes to the DetectSdkLocations task,
and then sets our override environment variable
(MD_MTOUCH_SDK_ROOT/XAMMAC_FRAMEWORK_PATH) to the install location, so that
existing code (which honors the override variable) continues to work as-is.

Fixes https://github.com/xamarin/xamarin-macios/issues/10827.
2021-05-04 21:36:48 -04:00
Manuel de la Pena a86bbc5466
[CI] Create post pipelines that will publish html results. (#11431)
Create two pipelines that will be triggered when a new build is
completed and contains tests results. There are some important details:

1. pipeline triggers have to specify all branches or a subset. We use
   tags to trigger for PRs.
2. Tags are and, not or, so we need to pipelines (lame lame).

Due to 2. we add a new tag to identify ci builds.
2021-05-04 17:08:52 -04:00
Manuel de la Pena 12dd318212
[CI] Do not clutter the nuget feed with PR build nugets. (#11428)
Do not publish the nugets that have been created in a PR build. The
build results can be accessed from the comment once completed. This way
we make sure that next builds do not have conflicts when publishing the
nugets.
2021-05-04 15:31:44 -04:00
Rolf Bjarne Kvinge 81300576ff
[runtime] Implement mono_object_isinst for CoreCLR. (#11427) 2021-05-04 20:20:46 +02:00
Rolf Bjarne Kvinge 41bf71a0e2
[runtime] Implement mono_object_get_class for CoreCLR. (#11398) 2021-05-04 14:31:20 +02:00
Rolf Bjarne Kvinge 938f63da22
[tests] Make the mtouch test project reference the actual mtouch project. (#11400)
This makes it easier to test localized strings used in mtouch, since we don't have
to replicate the build for all the resources.

This required a few changes to avoid including code in the mtouch tests that already
exists in the mtouch executable.

Also rename the mtouch test project to mtouchtests.csproj.

This way the test project can reference the actual mtouch.csproj without
causing conflicts due to having two projects with the same name.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-05-04 14:10:03 +02:00
Rolf Bjarne Kvinge 0285689aa3
[runtime] Never disable exception marshalling for CoreCLR. (#11407) 2021-05-04 08:28:34 +02:00
Rolf Bjarne Kvinge f57d9835b8
[CoreGraphics] Don't exclude ARM64 code path on macOS anymore. (#11402) 2021-05-04 08:28:01 +02:00
Rolf Bjarne Kvinge 14f7cf48a0
[mlaunch] Don't ship for MacCatalyst. (#11397)
We don't need mlaunch for MacCatalyst.
2021-05-04 08:26:01 +02:00
Rolf Bjarne Kvinge 14e76c0139
[runtime] Return the exception from wrapper methods for exception marshalling. (#11382)
There's no general way to set a pending managed exception in CoreCLR (the
current plan is to support setting a pending managed exception for the
objc_msgSend family of functions). This means that the way we've implemented
custom wrappers that can handle Objective-C exceptions won't work, because
those wrappers currently tries to set a pending managed exception (which Mono
throws upon returning from the corresponding native wrapper function).

So rewrite this a bit: these custom wrappers now return a GCHandle with the
managed exception as an out parameter, and the calling managed code throws
that exception instead.

This also required adjusting a few API definitions to match how their wrapper
functions are defined.
2021-05-04 08:25:38 +02:00
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