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

14051 Коммитов

Автор SHA1 Сообщение Дата
Jimmy Reichley b1cb5f62b7
Remove duplicated SceneKitAsset declarations (#15665)
Just happened to come across this when reading through the targets. Been duplicated for 2 years it looks like so 🤷
2022-08-17 14:52:18 +02:00
Steve Hawley 10b6dffec0
better help, change priority of processing help request. (#15660) 2022-08-09 10:14:48 -04:00
Chris Hamons 20825e1218
[generator] Do not zero-extend implied catalyst attributes (#15648)
- In the [Xcode 14 Photo PR](https://github.com/xamarin/xamarin-macios/pull/15608) a test is failing with this:

```
ILLINK : error MT2362: The linker step 'Registrar' failed during processing: One or more errors occurred. (The type 'Photos.PHPersistentObjectChangeDetails' (used as a return type in Photos.PHPersistentChange.ChangeDetails) is not available in MacCatalyst 16.0 (it was introduced in MacCatalyst 16.0.0). Please build with a newer MacCatalyst SDK (usually done by using the most recent version of Xcode). [/Users/donblas/Programming/xamarin-macios/tests/dotnet/MySimpleApp/MacCatalyst/MySimpleApp.csproj]
  		) (The type 'Photos.PHObjectType' (used as a parameter in Photos.PHPersistentChange.ChangeDetails) is not available in MacCatalyst 16.0 (it was introduced in MacCatalyst 16.0.0). Please build with a newer MacCatalyst SDK (usually done by using the most recent version of Xcode).
  		) (The type 'Photos.PHPersistentChangeFetchResult' (used as a return type in Photos.PHPhotoLibrary.FetchPersistentChanges) is not available in MacCatalyst 16.0 (it was introduced in MacCatalyst 16.0.0). Please build with a newer MacCatalyst SDK (usually done by using the most recent version of Xcode).
  		) (The type 'Photos.PHPersistentChangeToken' (used as a parameter in Photos.PHPhotoLibrary.FetchPersistentChanges) is not available in MacCatalyst 16.0 (it was introduced in MacCatalyst 16.0.0). Please build with a newer MacCatalyst SDK (usually done by using the most recent version of Xcode).
```

The details of how we fail are written up in [this issue](https://github.com/xamarin/xamarin-macios/issues/15643) but since sharpie never outputs versions in the form of x.y.z where .z is zero we only hit this with generated attributes.

Because of this fact, we can work around it with a generator change.

This commit changes how we "imply" attributes from iOS to Catalyst. As a brief reminder, because of historical bindings we assume anything that has iOS and not a Catalyst really means "treat iOS as if it was also Catalyst".

This work is done in `AddImpliedCatalyst` and uses `CloneFromOtherPlatform` to make a copy of an attribute, because there is no easy way to say "I want a copy of this, but with this other platform". `CloneFromOtherPlatform` used to always call the 3 version (Major, Minor, Revision) constructor, even when the attribute being cloned only used Major.Minor.

However, this caused us to "zero extend" the version with another zero, which triggers this bug, so stop doing that. Uglier code in the generator, but it works better.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-08-08 09:26:50 -05:00
Manuel de la Pena 5d8860f100
[UIKit] Remove the preprocessor directives for watchOS. (#15601)
This change should have 0/null/nine/nada changes in the API. The goal is
to remove the preprocessor directives to ensure that the xcode14
bindings have a smaller diff and are easier to review.
2022-08-07 13:50:19 -04:00
Steve Hawley 8858da6bf3
[Nnyeah] doc'n update (#15646) 2022-08-05 16:35:25 -04:00
Steve Hawley d4e827ce20
[nnyeah] Added code to look up the legacy platform dll instead of requiring it. (#15631)
* Added code to look up the legacy platform dll instead of requiring it.
2022-08-05 10:21:52 -04:00
Steve Hawley d34cbe230c
Better error message for ctors that we can't get to anymore. (#15378)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2022-08-04 15:34:28 -04:00
Manuel de la Pena 182bee91b7
[CI] Make sure we do not have pkgs from other builds. (#15619) 2022-08-04 10:31:46 -04:00
Manuel de la Pena ce6f46840a
[submodules] Fix indentation in config file. (#15618) 2022-08-03 17:13:23 -04:00
Manuel de la Pena 8a17b2592f
[CI] List the installed frameworks in the test bot. (#15611) 2022-08-03 10:25:20 -04:00
Rolf Bjarne Kvinge 29df69192f
[nnyeah] Return a non-zero exit code if something goes wrong. (#15450) 2022-08-02 19:28:15 -04:00
Steve Hawley f069898a29
[nnyeah] update documentation (#15592)
* update documentation

* clean up mark down
2022-08-02 11:11:10 -04:00
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