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

13839 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 78020cbaba
[msbuild] Remove dead code from the Codesign task. (#15519)
Fixes this warning:

    xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Tasks/Codesign.cs(12,27): warning CS0649: Field 'Codesign.cancellationSource' is never assigned to, and will always have its default value null [xamarin-macios/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj]
2022-07-27 10:21:45 -04:00
Rolf Bjarne Kvinge e18fe5a015
[tests] Don't include ErrorHelper.cs nor error.cs in Xamarin.MacDev.Tasks.Tests. (#15518)
Fixes these compiler warnings:

    xamarin-macios/src/ObjCRuntime/ErrorHelper.cs(22,17): warning CS0436: The type 'ProductException' in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../../tools/common/error.cs' conflicts with the imported type 'ProductException' in 'Xamarin.iOS.Tasks, Version=15.11.0.465, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. Using the type defined in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../../tools/common/error.cs'. [xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj]
    xamarin-macios/tools/common/error.cs(10,34): warning CS0436: The type 'ErrorHelper' in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../common/ErrorHelper.tests.cs' conflicts with the imported type 'ErrorHelper' in 'Xamarin.iOS.Tasks, Version=15.11.0.465, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'. Using the type defined in 'xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/../../common/ErrorHelper.tests.cs'. [xamarin-macios/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.csproj]
2022-07-26 11:42:44 -04:00
Rolf Bjarne Kvinge 8cc194ac86
[msbuild] Ignore CS0169 in a few places. (#15520)
Fixes these warnings:

    msbuild/Xamarin.iOS.Tasks/Model/DataItem.cs(25,31): warning CS0169: The field 'DataItem.UnsupportedData' is never used [xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj]
    msbuild/Xamarin.iOS.Tasks/Model/DataSet.cs(12,31): warning CS0169: The field 'DataSet.JsonData' is never used [xamarin-macios/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj]

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-26 11:42:06 -04:00
TJ Lambert 481e3ec53a
[Fix] Reorder the enum to the correct order (#15540)
Co-authored-by: TJ Lambert <tjlambert@microsoft.com>
2022-07-26 11:40:12 -04:00
Chris Hamons af0b059176
[appkit] Add missing NullAllowed on NSSavePanel.AllowedFileTypes (#15570)
- Fixes https://github.com/xamarin/xamarin-macios/issues/15565
2022-07-26 09:55:51 -05:00
Mauro Agnoletti 17ebe77a94
Set custom home env var from XMA Build Agent (#15571)
Overriding HOME is dangerous because it could cause unwanted side effects, like breaking the keychain API logic.

For this reason, we need to use a custom environment variable to store the custom home used by the XMA dotnet SDK.

This custom home should be passed everywhere as environment settings when we invoke the dotnet tool
2022-07-25 20:53:25 -04:00
Chris Hamons bfa035c615
[mlaunch] Fix permisisons after extracting from nuget (#15566)
* [mlaunch] Fix permisisons after extracting from nuget

- A side effect of ac1fa25816 is that the permission of bin/mlaunch is no longer +x for non-root, which means it is unusable.

* Apply suggestions from code review

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>

* Apply fix to app bundle mlaunch as well

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-25 18:08:42 -04:00
Steve Hawley 0b872a1683
[nnyeah] Fix for branch targets and AVMediaTypes (#15561)
* Fix for branch targets and AVMediaTypes
2022-07-22 10:24:40 -04:00
Emanuel Fernandez Dell'Oca c957b0402a
Ensure the Hot Restart bundle does not have any entitlements set (#15558)
Hot Restart expects the archived-expanded-entitlements.xcent to be empty. If any entitlements are added to that file, the new app signature will be invalid.

These changes ensure that file will be an empty plist when extracting the PreBuilt app.

Partial fix for https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1550700
2022-07-21 16:17:20 -04:00
Steve Hawley 8983e56be0
fix incorrect attribute (#15549) 2022-07-20 12:11:28 -04:00
Alex Soto 174f9a2ea3
Bump versions to accomodate d17-3 release 2022-07-20 11:35:28 -04:00
Emanuel Fernandez Dell'Oca 9bc3e3b238
Bump Xamarin.Messaging to 1.6.60 (#15370)
* Bump Xamarin.Messaging to 1.6.60

* Bump GitInfo to match Xamarin.Messaging

Co-authored-by: Alex Soto <alex@alexsoto.me>
2022-07-20 11:25:51 -04:00
Manuel de la Pena 0a1437aac1
[Xtro] Ensure that when we do auto sanitize we do not return a fail. (#15551)
When working on the bindings we can use the "AUTO_SANITIZE" env var to
let xtro know that we want the lines that have been fixed to be removed,
unfortunatly this mode has a bug. When we autosanitized we should do the
same as the skip and not return the lines that have been cleaned as the
return code.

Returning the error code meant that when we did make all, the
first target (classic) would work, but the second target would not
because the first one failed.

Doing this allows to work on the bindings and have AUTO_SANITIZE work
both for classic and dotnet when doing make all.
2022-07-20 08:26:01 -04:00
Alex Soto e3a84d287d
[UIKit] Fix typo in UIGraphics EndPDFContent => EndPDFContext (#15381)
* [UIKit] Fix typo in UIGraphics EndPDFContent => EndPDFContext

Fixes xamarin/xamarin-macios#15243

Fixes typo in UIGraphics EndPDFContent => EndPDFContext.

Also added an error in XAMCORE 5.0 to review the usage of 'PDF' naming on this file
not changing it right now to 'Pdf' for the typo fix so it does not look strange now
compared to the other public methods.

* Update src/UIKit/UIGraphics.cs

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-19 20:38:13 -04:00
Manuel de la Pena 3fb77838b2
[CI] Remove older pkgs in the system to make sure we are not running the tests with an older version. (#15545) 2022-07-19 18:24:18 -04:00
Steve Hawley f378a38bcf
Completed NFloat mappings (#15537) 2022-07-18 14:48:59 -04:00
Rolf Bjarne Kvinge 0aaf6d9284
Bump mono to get debugging fix when using the interpreter. (#15507)
New commits in mono/mono:

* mono/mono@2a19f878da Backport https://github.com/dotnet/runtime/pull/71436
* mono/mono@6051b71072 Bump nuget.exe to v6.2.1
* mono/mono@f354099a6b Set app context to null on thread detach
* mono/mono@6c7e72dd8e [mono] Fix a crash during stack trace construction if a this object is null.

Diff: dffa5ab922..2a19f878da
2022-07-18 10:33:28 -04:00
Rolf Bjarne Kvinge 0021abb0f5
[devops] Try parallelize less during the API diff build. (#15471)
For some reason the C# compilers crash a lot during the build in src/ when
building for the API diff (but not the normal build!). So test the theory that
we're overloading the bot in question (OOM maybe?) by slowing down a bit.

I have to say that if this works and the theory is proven, it's kind of sad
that after over a decade doing -j8 the bot situation has gotten worse...

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-18 01:42:47 -04:00
dotnet-maestro[bot] 4221018aba
[main] Update dependencies from dotnet/runtime (#15495)
Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.8

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-07-15 20:35:16 +02:00
Rolf Bjarne Kvinge 12739f0468
[src] Adjust AssemblyVersion for .NET with Xcode 13.3. (#15497)
This is a workaround to create assemblies with a higher version than the
stable versions we released for Xcode 13.3. The stable versions we released
for Xcode 13.3 has a <osmajor>.<osminor>.300 version number, but that version
scheme has been changed, where the third digit from now on will always be 0 in
the assembly version. However, this means that until Apple releases new OS
versions (and we bind those versions), the assembly version will be lower than
the stable version wherever we've implemented the new versioning scheme. This
complicates testing, so just bump the third digit to 600 until we're using a
new Xcode (and thus presumably new OS versions as well). This workaround can
be removed at that point, but implement it so that it will just be
skipped/ignored if it isn't removed.
2022-07-15 20:30:24 +02:00
Marius Ungureanu 250cb8807d
Add comment explaining how the marshalling of arrays works (#15513) 2022-07-15 13:12:51 -04:00
Marius Ungureanu c324882fba
Fix up lifetime handling of SecItemCopyMatching result parameter (#15468)
Docs state it's caller retained via Create rule

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-07-15 15:39:07 +02:00
Thays Grazia 7cd34d2501
[debugger] Work around a debugger issue when using the interpreter (#15451)
There's a bug in the Mono runtime where the interpreter does not disable optimizations when the debugger is attached, which leads to the interpreter optimizing code and the debugger ending up rather confused.

The bug is fixed in the Mono runtime (https://github.com/dotnet/runtime/pull/71436), but there's no immediate way for the runtime to release this fix, so here we're implementing a workaround that disables interpreter optimizations if the debugging is enabled. It's somewhat clunky because the Mono external API wasn't designed for this, so we have to abuse the API a bit to accomplish the effect we want.

This is somewhat risky (since we're changing the startup path in a pretty big way), but there's an escape hatch via an environment variable, and also the workaround will not be in effect for release builds.

While the runtime issue exists in legacy mono/mono as well, we'll fix the Mono runtime for legacy, because we don't have to wait to consume legacy mono (https://github.com/xamarin/xamarin-macios/pull/15507). This means that the workaround is for .NET scenarios only.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-07-15 13:46:14 +02:00
Rolf Bjarne Kvinge 16f14a965e
[tests] Only include enabled platforms in the FrameworksInRuntimeNativeDirectory nupkg. (#15501) 2022-07-15 10:27:26 +02:00
Rolf Bjarne Kvinge 9fdae5443d
[dotnet] Use the correct manifest version band. (#15499)
We must use the sdk manifest band when computing the path into sdk-manifests
to install workloads, otherwise they won't be found after installation.

This is a problem when building with .NET 6.0.301, because we want to install
into the sdk-manifests/6.0.300 directory, not sdk-manifests/6.0.301 directory.
2022-07-15 10:26:38 +02:00
Sebastien Pouliot 0ae3181e35
[dotnet][macos] The only runtime is CoreCLR (not a feature) (#15340)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-07-15 10:24:01 +02:00
Rolf Bjarne Kvinge 786303bb29
[dotnet] Add support for 'make dotnet-install-system'. (#15498) 2022-07-15 09:58:03 +02:00
Steve Hawley 0731d6d8bd
limit to one reference to Microsoft.iOS (#15477) 2022-07-14 10:27:24 -04:00
Rolf Bjarne Kvinge 9facd8187d
[msbuild] Unify the PrepareNativeReferences task between iOS and Mac. (#15473) 2022-07-14 16:21:10 +02:00
Rolf Bjarne Kvinge 72c065cd80
[msbuild] Unify the CompileAppManifest task logic between iOS and Mac. (#15474) 2022-07-14 16:20:56 +02:00
dotnet-maestro[bot] 156777dbb4
[main] Update dependencies from dotnet/runtime (#15484)
Microsoft.NETCore.App.Ref
 From Version 6.0.8 -> To Version 6.0.8

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-07-14 10:33:29 +02:00
Rolf Bjarne Kvinge e468e75b68
[registrar] Improve naming of generated P/Invoke wrappers. (#15480) 2022-07-14 09:20:17 +02:00
Rolf Bjarne Kvinge d17aa016b4
[devops] Fix publishing in the presence of our global.json (second part) (#15487)
We can't use the global.json located in the root of our repo, because makes it
required to use the exact .NET version we're referencing in our
eng/Versions.Details.xml file. So in order to not use it, we set the working
directory to the parent directory of xamarin-macios.

Otherwise this happens:

    Could not execute because the application was not found or a compatible .NET SDK is not installed.
    Possible reasons for this include:
      * You intended to execute a .NET program:
          The application 'build' does not exist.
      * You intended to execute a .NET SDK command:
          A compatible installed .NET SDK for global.json version [6.0.301-rtm.22280.1] from [D:\a\1\s\xamarin-macios\global.json] was not found.
            6.0.201 [C:\hostedtoolcache\windows\dotnet\sdk]
          Install the [6.0.301-rtm.22280.1] .NET SDK or update [D:\a\1\s\xamarin-macios\global.json] with an installed .NET SDK:
    & : The term 'C:\hostedtoolcache\windows\darc\darc' is not recognized as the name of a cmdlet, function, script file,
    or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
    try again.
2022-07-13 20:36:02 +02:00
Rolf Bjarne Kvinge a99f6c928a
[runtime] Remove dead code. (#15479)
This has been dead code for over 9 years!
2022-07-13 20:33:40 +02:00
Rolf Bjarne Kvinge c55fbdfef9
[xharness] Collect and upload any crash reports that occurred during the entire test run. (#15466) 2022-07-13 15:16:11 +02:00
Rolf Bjarne Kvinge 617d857af8
[devops] Fix publishing in the presence of our global.json (#15481)
We can't use the global.json located in the root of our repo, because makes it
required to use the exact .NET version we're referencing in our
eng/Versions.Details.xml file. So in order to not use it, we set the working
directory to the parent directory of xamarin-macios.

Otherwise this happens:

    Could not execute because the application was not found or a compatible .NET SDK is not installed.
    Possible reasons for this include:
      * You intended to execute a .NET program:
          The application 'build' does not exist.
      * You intended to execute a .NET SDK command:
          A compatible installed .NET SDK for global.json version [6.0.301-rtm.22280.1] from [D:\a\1\s\xamarin-macios\global.json] was not found.
            6.0.201 [C:\hostedtoolcache\windows\dotnet\sdk]
          Install the [6.0.301-rtm.22280.1] .NET SDK or update [D:\a\1\s\xamarin-macios\global.json] with an installed .NET SDK:
2022-07-13 14:12:06 +02:00
Rolf Bjarne Kvinge ac1fa25816
[mlaunch] Download mlaunch from NuGet instead of building from maccore. (#15298)
Download mlaunch from NuGet instead of building from maccore, and copy the
downloaded files into the packages we ship (both legacy Xamarin's pkg and .NET
nupkgs).

Eventually we'll want to reference the mlaunch NuGet from the .NET nupkgs, but
that's a later step.
2022-07-13 11:00:15 +02:00
Rolf Bjarne Kvinge 423002bc95
[tests] Be explicit about parameters when looking for the Class.FindType method. (#15431)
This makes sure that adding FindType overloads won't break the tests.
2022-07-13 10:59:54 +02:00
Rolf Bjarne Kvinge 4acb844e5c
[runtime] Adjust exception handling to always return managed exceptions if so requested. (#15432)
In the following scenario:

* Objective-C exception mode is to throw a managed exception.
* The xamarin_process_nsexception_using_mode was given a pointer to store any
  resulting exceptions.
* The Objective-C exception didn't already have an associated managed exception.

We'd throw the managed exception upon return to managed code instead of
returning the managed exception.

With this change the xamarin_process_nsexception_using_mode will always return
the resulting managed exception in the scenario above (this way the behavior
is identical independent of whether the Objective-C exception already has an
associated managed exception or not).
2022-07-13 10:59:40 +02:00
Rolf Bjarne Kvinge 76fbc898cc
[runtime] The InitializationFlagsDynamicRegistrar flag is never used, so remove it (#15435) 2022-07-13 10:59:13 +02:00
Rolf Bjarne Kvinge 83620bd619
[Dlfcn] Add an enum to specify the mode to dlopen (#15438) 2022-07-13 10:58:54 +02:00
Rolf Bjarne Kvinge b83eedc2b4
[runtime] Adjust nullability a bit (#15439) 2022-07-13 10:58:40 +02:00
Rolf Bjarne Kvinge 3c95b65ef9
[runtime] Simplify code to use existing local variable (#15441) 2022-07-13 10:58:08 +02:00
Rolf Bjarne Kvinge bdfdd19bff
[devops] Simplify validation for cleanup script. (#15470) 2022-07-13 10:43:42 +02:00
Rolf Bjarne Kvinge bc23ece1fc
[monotouch-test] Improve MonoTouchFixtures.ObjCRuntime.ToggleRefRetainDeadlockTest to get a native stack trace upon failure. (#15476) 2022-07-13 10:40:33 +02:00
dotnet-maestro[bot] 54192846aa
[main] Update dependencies from dotnet/runtime (#15425)
Microsoft.NETCore.App.Ref
 From Version 6.0.6 -> To Version 6.0.8

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2022-07-12 19:10:09 +02:00
Rolf Bjarne Kvinge 77a16fcc58
[dotnet] Stop hardcoding the TargetFrameworkVersion in the default items template. (#15386)
This prepares us for net7.0 and beyond; no need to update any of this code anymore.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-12 10:34:15 +02:00
Rolf Bjarne Kvinge 3c7c4e7130
[dotnet] Generate the AutoImport.props file for each platform. (#15387)
This reduces some code duplication.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-07-12 10:00:35 +02:00
Rolf Bjarne Kvinge 4e1114fde6
[tools] Use MONO_AOT_MODE_INTERP_ONLY instead of MONO_AOT_MODE_INTERP for x86_64. (#15429)
The 'MONO_AOT_MODE_INTERP' mode is based on full AOT, which requires infinite
trampoline code to not potentially run out of trampolines. However, that mode
isn't implemented for x86_64, so in that case use 'MONO_AOT_MODE_INTERP_ONLY',
which will use the JIT as a fallback.

Ref: https://github.com/dotnet/runtime/issues/68808

Fixes: https://github.com/xamarin/xamarin-macios/issues/14887
2022-07-12 09:56:51 +02:00
Rolf Bjarne Kvinge f7772d4705
[dotnet] Accept invalid runtime identifiers for Restore. (#15357) 2022-07-12 09:37:01 +02:00