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

17052 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 1bdb8d64e6
[devops] Install .NET + workloads on remote Mac. (#19771) 2024-01-10 18:15:30 +01:00
Manuel de la Pena a3b27e95ea
[Tests] Make cecil test failures readable. (#19772)
Using Assert.IsEmpty generates a hideous error message that is not easy
for a human to read. Instead of doing IsEmpty, we use the more elegant
approach of create a Assert.Multiple wich does a much nicer job when
printing the failures.

An full example of the difference can be found here:

https://gist.github.com/mandel-macaque/fd08a17067a3deb28d0bd10b67265628

A small example:

Old output

```
Cecil.Tests.ApiAvailabilityTest.AttributeConsistency(_build/Microsoft.MacCatalyst.Ref/ref/net8.0/Microsoft.MacCatalyst.dll): 2 API with inconsistent availability attributes:
    [FAIL] AVFoundation.AVSampleBufferVideoRenderer.get_HasSufficientMediaDataForReliablePlaybackStart() is marked both supported and obsoleted in the same version (maccatalyst17.0)
    [FAIL] System.Boolean AVFoundation.AVSampleBufferVideoRenderer::HasSufficientMediaDataForReliablePlaybackStart() is marked both supported and obsoleted in the same version (maccatalyst17.0)
Cecil.Tests.ApiAvailabilityTest.FindMissingObsoleteAttributes: Failures: Missing obsolete attributes
Expected: <empty>
But was: < ("AVFoundation.AVAudioSessionRouteSharingPolicy AVFoundation.AVAudioSessionRouteSharingPolicy::LongForm", <AVFoundation.AVAudioSessionRouteSharingPolicy AVFoundation.AVAudioSessionRouteSharingPolicy::LongForm>, < <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >), ("AVFoundation.AVAudioSession.get_InterruptionNotification()", <Foundation.NSString AVFoundation.AVAudioSession::get_InterruptionNotification()>, < <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >), ("AVFoundation.AVAudioSession.get_MediaServicesWereLostNotification()", <Foundation.NSString AVFoundation.AVAudioSession::get_MediaServicesWereLostNotification()>, < <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >), ("AVFoundation.AVAudioSession.get_MediaServicesWereResetNotification()", <Foundation.NSString AVFoundation.AVAudioSession::get_MediaServicesWereResetNotification()>, < <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >), ("AVFoundation.AVCaptureDevice.DevicesWithMediaType(System.String)", <AVFoundation.AVCaptureDevice[] AVFoundation.AVCaptureDevice::DevicesWithMediaType(System.String)>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("AVFoundation.AVCapturePhoto.GetFileDataRepresentation(Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>, Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>, CoreVideo.CVPixelBuffer, AVFoundation.AVDepthData)", <Foundation.NSData AVFoundation.AVCapturePhoto::GetFileDataRepresentation(Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>,Foundation.NSDictionary`2<Foundation.NSString,Foundation.NSObject>,CoreVideo.CVPixelBuffer,AVFoundation.AVDepthData)>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("AVFoundation.AVCapturePhotoOutput.GetDngPhotoDataRepresentation(CoreMedia.CMSampleBuffer, CoreMedia.CMSampleBuffer)", <Foundation.NSData AVFoundation.AVCapturePhotoOutput::GetDngPhotoDataRepresentation(CoreMedia.CMSampleBuffer,CoreMedia.CMSampleBuffer)>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("AVFoundation.AVCapturePhotoOutput.GetJpegPhotoDataRepresentation(CoreMedia.CMSampleBuffer, CoreMedia.CMSampleBuffer)", <Foundation.NSData AVFoundation.AVCapturePhotoOutput::GetJpegPhotoDataRepresentation(CoreMedia.CMSampleBuffer,CoreMedia.CMSampleBuffer)>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("AVFoundation.AVSampleBufferGenerator.CreateSampleBuffer(AVFoundation.AVSampleBufferRequest)", <CoreMedia.CMSampleBuffer AVFoundation.AVSampleBufferGenerator::CreateSampleBuffer(AVFoundation.AVSampleBufferRequest)>, < <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCaptureVideoPreviewLayer::AutomaticallyAdjustsMirroring()", <System.Boolean AVFoundation.AVCaptureVideoPreviewLayer::AutomaticallyAdjustsMirroring()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCaptureVideoPreviewLayer::Mirrored()", <System.Boolean AVFoundation.AVCaptureVideoPreviewLayer::Mirrored()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCaptureVideoPreviewLayer::MirroringSupported()", <System.Boolean AVFoundation.AVCaptureVideoPreviewLayer::MirroringSupported()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCaptureVideoPreviewLayer::OrientationSupported()", <System.Boolean AVFoundation.AVCaptureVideoPreviewLayer::OrientationSupported()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("Foundation.NSString AVFoundation.AVAudioSession::InterruptionNotification()", <Foundation.NSString AVFoundation.AVAudioSession::InterruptionNotification()>, < <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >), ("Foundation.NSString AVFoundation.AVAudioSession::MediaServicesWereLostNotification()", <Foundation.NSString AVFoundation.AVAudioSession::MediaServicesWereLostNotification()>, < <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >), ("Foundation.NSString AVFoundation.AVAudioSession::MediaServicesWereResetNotification()", <Foundation.NSString AVFoundation.AVAudioSession::MediaServicesWereResetNotification()>, < <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCaptureConnection::EnablesVideoStabilizationWhenAvailable()", <System.Boolean AVFoundation.AVCaptureConnection::EnablesVideoStabilizationWhenAvailable()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCaptureConnection::SupportsVideoOrientation()", <System.Boolean AVFoundation.AVCaptureConnection::SupportsVideoOrientation()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCaptureConnection::VideoStabilizationEnabled()", <System.Boolean AVFoundation.AVCaptureConnection::VideoStabilizationEnabled()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("AVFoundation.AVCaptureDevice[] AVFoundation.AVCaptureDevice::Devices()", <AVFoundation.AVCaptureDevice[] AVFoundation.AVCaptureDevice::Devices()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Runtime.InteropServices.NFloat AVFoundation.AVCaptureDevice::DualCameraSwitchOverVideoZoomFactor()", <System.Runtime.InteropServices.NFloat AVFoundation.AVCaptureDevice::DualCameraSwitchOverVideoZoomFactor()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCaptureDevice::FlashActive()", <System.Boolean AVFoundation.AVCaptureDevice::FlashActive()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("CoreMedia.CMVideoDimensions AVFoundation.AVCaptureDeviceFormat::HighResolutionStillImageDimensions()", <CoreMedia.CMVideoDimensions AVFoundation.AVCaptureDeviceFormat::HighResolutionStillImageDimensions()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Runtime.InteropServices.NFloat[] AVFoundation.AVCaptureDeviceFormat::SupportedVideoZoomFactorsForDepthDataDelivery()", <System.Runtime.InteropServices.NFloat[] AVFoundation.AVCaptureDeviceFormat::SupportedVideoZoomFactorsForDepthDataDelivery()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Runtime.InteropServices.NFloat AVFoundation.AVCaptureDeviceFormat::VideoMaxZoomFactorForDepthDataDelivery()", <System.Runtime.InteropServices.NFloat AVFoundation.AVCaptureDeviceFormat::VideoMaxZoomFactorForDepthDataDelivery()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Runtime.InteropServices.NFloat AVFoundation.AVCaptureDeviceFormat::VideoMinZoomFactorForDepthDataDelivery()", <System.Runtime.InteropServices.NFloat AVFoundation.AVCaptureDeviceFormat::VideoMinZoomFactorForDepthDataDelivery()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCaptureDeviceFormat::VideoStabilizationSupported()", <System.Boolean AVFoundation.AVCaptureDeviceFormat::VideoStabilizationSupported()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCapturePhotoOutput::DualCameraDualPhotoDeliveryEnabled()", <System.Boolean AVFoundation.AVCapturePhotoOutput::DualCameraDualPhotoDeliveryEnabled()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCapturePhotoOutput::DualCameraDualPhotoDeliverySupported()", <System.Boolean AVFoundation.AVCapturePhotoOutput::DualCameraDualPhotoDeliverySupported()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCapturePhotoOutput::DualCameraFusionSupported()", <System.Boolean AVFoundation.AVCapturePhotoOutput::DualCameraFusionSupported()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCapturePhotoOutput::IsHighResolutionCaptureEnabled()", <System.Boolean AVFoundation.AVCapturePhotoOutput::IsHighResolutionCaptureEnabled()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCapturePhotoOutput::IsStillImageStabilizationScene()", <System.Boolean AVFoundation.AVCapturePhotoOutput::IsStillImageStabilizationScene()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCapturePhotoOutput::IsStillImageStabilizationSupported()", <System.Boolean AVFoundation.AVCapturePhotoOutput::IsStillImageStabilizationSupported()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCapturePhotoSettings::IsAutoStillImageStabilizationEnabled()", <System.Boolean AVFoundation.AVCapturePhotoSettings::IsAutoStillImageStabilizationEnabled()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("System.Boolean AVFoundation.AVCapturePhotoSettings::IsHighResolutionPhotoEnabled()", <System.Boolean AVFoundation.AVCapturePhotoSettings::IsHighResolutionPhotoEnabled()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >), ("CoreMedia.CMClock AVFoundation.AVCaptureSession::MasterClock()", <CoreMedia.CMClock AVFoundation.AVCaptureSession::MasterClock()>, < <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes>, <Cecil.Tests.OSPlatformAttributes> >, < <Cecil.Tests.OSPlatformAttributes> >) >

```

New output

```
Cecil.Tests.ApiAvailabilityTest.AttributeConsistency(_build/Microsoft.tvOS.Ref/ref/net8.0/Microsoft.tvOS.dll): 2 API with inconsistent availability attributes:
    [FAIL] AVFoundation.AVSampleBufferVideoRenderer.get_HasSufficientMediaDataForReliablePlaybackStart() is marked both supported and obsoleted in the same version (tvos17.0)
    [FAIL] System.Boolean AVFoundation.AVSampleBufferVideoRenderer::HasSufficientMediaDataForReliablePlaybackStart() is marked both supported and obsoleted in the same version (tvos17.0)
Cecil.Tests.AttributeTest.FindSupportedOnElementsThatDoNotExistInThatAssembly: Multiple failures or warnings in test:
1) AVFoundation.AVOutputSettingsAssistant.PresetMVHevc960x960 was not found on tvos despite being declared supported there:
    Assembly ios => Declares (Mentioned: (ios, maccatalyst, tvos, macos) Claimed: (ios, maccatalyst, tvos, macos))
    Assembly maccatalyst => Declares (Mentioned: (ios, maccatalyst, tvos, macos) Claimed: (ios, maccatalyst, tvos, macos))
AVFoundation.AVOutputSettingsAssistant.PresetMVHevc960x960 was not found on macos despite being declared supported there:
    Assembly ios => Declares (Mentioned: (ios, maccatalyst, tvos, macos) Claimed: (ios, maccatalyst, tvos, macos))
    Assembly maccatalyst => Declares (Mentioned: (ios, maccatalyst, tvos, macos) Claimed: (ios, maccatalyst, tvos, macos))
2) AVFoundation.AVOutputSettingsAssistant.PresetMVHevc1440x1440 was not found on tvos despite being declared supported there:
    Assembly ios => Declares (Mentioned: (ios, maccatalyst, tvos, macos) Claimed: (ios, maccatalyst, tvos, macos))
    Assembly maccatalyst => Declares (Mentioned: (ios, maccatalyst, tvos, macos) Claimed: (ios, maccatalyst, tvos, macos))
AVFoundation.AVOutputSettingsAssistant.PresetMVHevc1440x1440 was not found on macos despite being declared supported there:
    Assembly ios => Declares (Mentioned: (ios, maccatalyst, tvos, macos) Claimed: (ios, maccatalyst, tvos, macos))
    Assembly maccatalyst => Declares (Mentioned: (ios, maccatalyst, tvos, macos) Claimed: (ios, maccatalyst, tvos, macos))
3) AVFoundation.AVCapturePhotoCaptureDelegate_Extensions.DidFinishCapturingDeferredPhotoProxy (AVFoundation.IAVCapturePhotoCaptureDelegate, AVFoundation.AVCapturePhotoOutput, AVFoundation.AVCaptureDeferredPhotoProxy, Foundation.NSError) was not found on maccatalyst despite being declared supported there:
    Assembly ios => Declares (Mentioned: (tvos, maccatalyst, macos, ios) Claimed: (ios, maccatalyst))
4) AVFoundation.AVCapturePhotoCaptureDelegate.DidFinishCapturingDeferredPhotoProxy (AVFoundation.AVCapturePhotoOutput, AVFoundation.AVCaptureDeferredPhotoProxy, Foundation.NSError) was not found on maccatalyst despite being declared supported there:
    Assembly ios => Declares (Mentioned: (tvos, maccatalyst, macos, ios) Claimed: (ios, maccatalyst))
5) AVFoundation.AVCaptureResolvedPhotoSettings.DeferredPhotoProxyDimensions was not found on maccatalyst despite being declared supported there:
    Assembly ios => Declares (Mentioned: (tvos, maccatalyst, macos, ios) Claimed: (ios, maccatalyst))
```
2024-01-10 07:18:18 -05:00
Rolf Bjarne Kvinge bf7cd453f1
[tests] Use the default RuntimeIdentifier in MyCatalystApp (#19767)
The default RuntimeIdentifier for Mac Catalyst is maccatalyst-arm64 if running
on an ARM64 machine, which is what our unit tests assume. Hardcoding the
RuntimeIdentifier in the project file prevents the default from being used,
and makes the unit tests fail when running on an ARM64 machine.
2024-01-10 11:19:40 +01:00
Rolf Bjarne Kvinge 9ed0fb2b9e
[builds] Create a stable path to the local .NET version. (#19762)
This makes scripting easier in some cases.
2024-01-10 10:25:50 +01:00
Rolf Bjarne Kvinge 1384f38c0b
[dotnet] Fix 'make install-system' to use 'dotnet workload install' instead of packages. (#19755)
Fix 'make install-system' to use 'dotnet workload install' + a rollback
file instead of packages.

This actually works...
2024-01-10 08:10:11 +01:00
dustin-wojciechowski 448698a8b8
More methods extracted in BindingTouch [Generator] (#19635)
Extracted a good amount of code from Main3 which should make it easier
to read. Tried to keep changes minimal.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2024-01-09 09:56:07 -08:00
Rolf Bjarne Kvinge fd1e7746a8
[devops] Install Xcode on remote Mac for Windows tests. (#19764) 2024-01-09 17:20:08 +01:00
Manuel de la Pena 916dac4c29
[Speech] Fix wrong added API in macOS. (#19759)
The global variables cannot be loaded, this is reported by intro AND has
been tested with swift. Moved the variables to be an enum whihc makes
more sense in the API.
2024-01-09 11:06:58 -05:00
Rolf Bjarne Kvinge 4da76dd1d7
[msbuild] Merge the MergeAppBundles[TaskBase] classes. (#19751) 2024-01-09 09:47:54 +01:00
Rolf Bjarne Kvinge 1a030355aa
[msbuild] Merge the MetalLib[TaskBase] classes. (#19752) 2024-01-09 09:47:38 +01:00
Rolf Bjarne Kvinge ebd0b2dfda
[msbuild] Merge the Metal[TaskBase] classes. (#19753) 2024-01-09 09:47:27 +01:00
Rolf Bjarne Kvinge 5b1fc67694
[dotnet] Stop using a separate default platform version. (#19754)
In theory we should define the default platform version if it's not specified
in the TFM, and this default should not change for a given .NET version:

* We release support for iOS 17.0 with .NET 8
* Apple releases iOS 18.0, we're still using .NET 8. This default continues to be iOS 17.0
* .NET 9 is shipped, and at this point we bump the default to iOS 18.0

Basically: this should be the last OS version of the platform in question when
the current major .NET version is first released to stable.

Ref: 8e6394406d/accepted/2020/net5/net5.md (os-versions)

However, this doesn't work well for Apple platforms: whenever Apple releases
new Xcode versions, our existing workloads might not be compatible with the
new Xcode. We'll of course ship updateds workload with support for the new
Xcode, but defaulting to an older target platform version would mean that
developers wouldn't get the new workload, they'd get the old one. This is
exacerbated by the fact that Apple aggressively auto-updates Xcode on
developers' machines: they might wake up one day to a broken build - the
obvious fix ("dotnet workload update") doesn't fix anything - even if we've
shipped updated workloads - because the default is to use the old one. They'd
have to manually specify the target platform version in the target platform to
get the updated workload ("net8.0-ios17.2" to use the iOS 17.2 workload
instead of "net8.0-ios", which would use the default (old/initial/17.0) .NET 8
workload) - and then update _again_ when the next Xcode comes around. At this
point the point of having a sane default value is totally out the window,
because everybody would have to specify (and continuously update) a platform
version in their project files to keep their projects building.

So we've made the decision that the default target platform version is always
the latest target platform version.
2024-01-09 09:47:07 +01:00
Manuel de la Pena f46633fa96
[Generator] == on a type those a reference equals check. (#19756)
Found this while writing some unit tests for the generator. The
comparison between types uses a ReferenceEquals, that means that we
should ensure that we have a EcmaType in both sides. When running this
on unit tests, we have a RunTime vs a EcmaType comparison which results
in an error.

Pay attention to the following:

1. Changed the way we filter types so that we can use the set in several
methods.
2. Added a new compiler injected attribute to be ignored:
'Microsoft.CodeAnalysis.EmbeddedAttribute'
3. Microsoft.CodeAnalysis.EmbeddedAttribute is added/present in more
than one assembly, so do not throw when that happens, is a special case
that is injected by the compiler.

I ran the generator diff between main and this commit and the output is:

```
diff --git a/old/dotnet/IDE/obj/common/bgen/bgen.AssemblyInfo.cs b/new/dotnet/IDE/obj/common/bgen/bgen.AssemblyInfo.cs
index ef5e2e112f..5ded00c3af 100644
--- a/old/dotnet/IDE/obj/common/bgen/bgen.AssemblyInfo.cs
+++ b/new/dotnet/IDE/obj/common/bgen/bgen.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
 [assembly: System.Reflection.AssemblyCompanyAttribute("bgen")]
 [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
 [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b60ee772c228723a5e01212471c1e8eb5c20ebb9")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ec8a6c261a68f6aee2ad2373cf45e3f001ac4679")]
 [assembly: System.Reflection.AssemblyProductAttribute("bgen")]
 [assembly: System.Reflection.AssemblyTitleAttribute("bgen")]
 [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/old/dotnet/IDE/obj/common/bgen/bgen.sourcelink.json b/new/dotnet/IDE/obj/common/bgen/bgen.sourcelink.json
index 5c5105e606..547bfb2dc4 100644
--- a/old/dotnet/IDE/obj/common/bgen/bgen.sourcelink.json
+++ b/new/dotnet/IDE/obj/common/bgen/bgen.sourcelink.json
@@ -1 +1 @@
-{"documents":{"/Users/mandel/Xamarin/xamarin-macios/xamarin-macios/tools/comparison/tmp/src/xamarin-macios/*":"b454d454a6/*"}}
\ No newline at end of file
+{"documents":{"/Users/mandel/Xamarin/xamarin-macios/xamarin-macios/*":"b454d454a6/*"}}
\ No newline at end of file
```
API should result in no changes.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-01-08 16:37:55 -05:00
Manuel de la Pena d60cded66e
[PassKit] Fix the intro tests for PassKit on macOS. (#19760) 2024-01-08 11:58:08 -05:00
Rolf Bjarne Kvinge 4d9dd22ce4
[tests] Remove reference to file that doesn't exist anymore in the InstallSources test project. (#19743) 2024-01-08 07:43:10 +01:00
Rolf Bjarne Kvinge 1220fa030c
[mtouch] Remove packages.config, doesn't seem to be used anymore. (#19742)
The packages in packages.config for mtouch don't seem be used anymore (the
localization process for mtouch doesn't use the xliff localization workflow
anymore), so just remove the file.
2024-01-08 07:43:00 +01:00
Rolf Bjarne Kvinge 3d0f34bdd9
[UIKit] Make P/Invokes have blittable signatures. (#19725)
Contributes towards #15684.
2024-01-08 07:42:48 +01:00
Rolf Bjarne Kvinge b51bcfa531
[tests] Fix all the remaining warnings in monotouch-test, EmbeddedResources and bindings-test. (#19722)
And also make sure we don't introduce any new warnings by making them errors.
2024-01-08 07:41:48 +01:00
dotnet-maestro[bot] 105378138b
[main] Update dependencies from dotnet/installer (#19757)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer

- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20240104.10
- **Date Produced**: January 5, 2024 3:11:07 AM UTC
- **Commit**: 2f83a5e7bb3f5dd64aafa9b318f9962096834cf2
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.102-servicing.24053.7 to 8.0.102-servicing.24054.10][3]

[3]: 82deebd32f...2f83a5e7bb
2024-01-08 07:30:54 +01:00
Rolf Bjarne Kvinge 7d885f6c8d
[src] Rearrange code to avoid compiler warning. (#19750)
Fixes this compiler warning:

> warning CS1587: XML comment is not placed on a valid language element
2024-01-05 09:09:02 +01:00
dotnet-maestro[bot] f2facadacc
[main] Update dependencies from dotnet/installer (#19745)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer

- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20240103.7
- **Date Produced**: January 3, 2024 6:18:54 PM UTC
- **Commit**: 82deebd32f6013adb57699765defe4e061d487e2
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.101-servicing.24052.5 to 8.0.102-servicing.24053.7][1]

[1]: a5d29aa28d...82deebd32f
2024-01-05 08:42:27 +01:00
Rolf Bjarne Kvinge b93d9a8534
[compare-commits] Only copy configure.inc if it exists. (#19744) 2024-01-05 07:19:42 +01:00
Rolf Bjarne Kvinge 76c642097f
[msbuild] Merge the LinkNativeCode[TaskBase] classes. (#19741) 2024-01-05 07:16:27 +01:00
Manuel de la Pena 8d56ae186d
[Network] Add support for Xcode 15. (#19418)
Adding up for review but will block its landing until the PR
https://github.com/xamarin/xamarin-macios/pull/7539 which was fixed by
@dustin-wojciechowski has been landed.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-01-04 15:17:49 -05:00
Rolf Bjarne Kvinge 1831e80300
[AudioToolbox] Make P/Invokes in MusicPlayer.cs have blittable signatures. (#19694)
Also fix the signature for the Dispose method - it has to override the base
implementation, not provide a new implementation.

Contributes towards #15684.
2024-01-04 18:18:05 +01:00
Rolf Bjarne Kvinge f80122a90e
[msbuild] Merge the InstallNameTool[TaskBase] classes. (#19740) 2024-01-04 17:21:30 +01:00
Rolf Bjarne Kvinge fa6c8ac573
[msbuild] Merge the IBTool[TaskBase] classes. (#19739) 2024-01-04 16:38:04 +01:00
Rolf Bjarne Kvinge 088364038a
[msbuild] Handle backslash characters better on Windows in the ParseBundlerArguments task. (#19719)
The backslash character is pretty common on Windows (since it's a path separator),
but the argument parser will treat it as an escape character, and just skip it.
This is obviously wrong, so just replace backslashes with forward slashes, which
should work just as well on Windows, and will also be parsed correctly.
The downside is that now there's no way to escape characters, but that should be a
very rare problem (much rarer than backslash characters), and there are other
ways around the problem (set the actual target property instead of going through
the MtouchExtraArgs property for instance):
2024-01-04 16:37:11 +01:00
Rolf Bjarne Kvinge f1c5ab9b31
Bump MonoTouch.Dialog. (#19726)
New commits in xamarin/MonoTouch.Dialog:

* xamarin/MonoTouch.Dialog@77b3337 Ignore a few availability warnings, since we're not going to anything about them.
* xamarin/MonoTouch.Dialog@dc4c0fe Use 'MD5.Create' instead of 'new MD5CryptoServiceProvider'.

Diff: 5898074d6e..77b3337dbb
2024-01-04 10:31:08 +01:00
Rolf Bjarne Kvinge 69680d054a
[msbuild] Merge the GetFullPath[TaskBase] classes. (#19718) 2024-01-04 10:19:25 +01:00
Rolf Bjarne Kvinge 29bb682ca1
Bump Xamarin.MacDev. (#19734)
New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@3a89218 [Xamarin.MacDev] Fix computing
DTSDKBuild. Fixes #xamarin/xamarin-macios@19733.

Diff:
b454d454a6..3a8921860d
2024-01-04 09:19:57 +01:00
Emanuel Fernandez Dell'Oca 09aa2cf802
Bump Xamarin.Messaging to 1.13.1 (#19729) 2024-01-04 08:29:11 +01:00
Rolf Bjarne Kvinge 128ca072b6
[msbuild] Merge the GetPropertyListValue[TaskBase] classes. (#19721) 2024-01-04 08:24:57 +01:00
Rolf Bjarne Kvinge f42ebf78a1
[tests] Handle failures to parse a binlog and render a descriptive message. (#19723)
This makes it much easier to understand what's happening when there's a
failure to parse a binlog.

This happens rather frequently, these have all happened:

* Truncated binlogs because a build timed out.
* Binlog version is higher than expected.
* Bugs in the binlog reader.
* Bugs in the binlog writer.
2024-01-04 08:22:01 +01:00
dotnet-maestro[bot] ba152d83fc
[main] Update dependencies from dotnet/installer (#19727)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer

- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20240102.5
- **Date Produced**: January 2, 2024 4:33:30 PM UTC
- **Commit**: a5d29aa28d7b26c687b41c519aa2ddd907aae969
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.101-servicing.23614.6 to 8.0.101-servicing.24052.5][1]

[1]: 461c776642...a5d29aa28d
2024-01-04 08:15:31 +01:00
Rolf Bjarne Kvinge 420b599cda
[msbuild] Merge the GetNativeExecutableName[TaskBase] classes. (#19720) 2024-01-03 17:28:17 +01:00
Rolf Bjarne Kvinge 03ec184746
[src] Use proper return type for stret functions. (#19682)
Many, many, _many_ years ago (before my time!) Mono didn't properly handle
P/Invokes that returned structures. The arm ABI stated that certain structures
had be returned by having the function take a hidden first argument, where the
argument would be a pointer to where the returned structure should be stored
by the called function.

We worked around this in the generator by modifying functions returning
structures to functions taking a pointer to the function to return as the
first argument.

So this:

    SomeStruct SomeFunction ();

would become:

    void SomeFunction (SomeStruct *retval);

This workaround isn't necessary anymore, because both Mono and CoreCLR will
just do the right thing.

Except... when the the pointer to the structure must have a specific
alignment. In that case we still need the workaround, so keep it then.
2024-01-03 14:59:00 +01:00
Rolf Bjarne Kvinge 3068610712
[msbuild/dotnet] Add support for app extensions which are xpc services. (#18295)
This was found while working on https://github.com/xamarin/xamarin-macios/issues/18242.
2024-01-03 12:41:37 +01:00
Rolf Bjarne Kvinge b3e5784ef6
[UIKit] Fix broken UITrait bindings. Fixes #19410. (#19411)
There are a few issues with the bindings, because the typedef `UITrait`
in the headers is defined like this:

```objective-c
typedef Class<UITraitDefinition> UITrait
```

which means: "A Class that implements the UITraitDefinition protocol",
and not "The UITraitDefinition" protocol", which is how it was bound.

This means the corresponding bindings are incorrect, so fix them. In
some cases it's not possible to fix the API, so new ones had to be
implemented in order to maintain backwards compatibility.

Fixes https://github.com/xamarin/xamarin-macios/issues/19410.
2024-01-03 09:03:08 +01:00
Haritha Mohan f39489fe60
[Vision] Update Xcode 15 support (#19412)
This commit adds some missing bindings and fixes up some of the previous
API that were incorrectly bound with Vector4 instead of Matrix4.

A sample app using some of these latest bindings can be found here:
https://github.com/haritha-mohan/vision-analyzer

Contributes to https://github.com/xamarin/maccore/issues/2719, though
the manual testing ended up not being necessary still helped catch a few
bugs and showcases some of the latest work done for this Xcode release.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-01-02 15:17:57 -05:00
jamesdlow d9e52067e2
Fix sending MidiPacket when MidiPacket has been created using a pointer (#18981)
Fix sending MidiPacket when MidiPacket has been created using a pointer to a byte[] rather than a byte[] passed as a reference.

MidiPacket.bytes used to be initialized to null, but that changed in a null-refactoring. Unfortunately code that dependend on the initial value being null wasn't updated, so the code regressed. Here we revert the old behavior by making the MidiPacket.bytes field nullable

Also add a test to make sure we don't regress this code again.

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-01-02 19:40:32 +01:00
Rolf Bjarne Kvinge e4ec40ff34
[devops] Don’t download artifacts we’ve already downloaded. (#19704) 2024-01-02 18:23:55 +01:00
Rolf Bjarne Kvinge d8d19cd130
[bgen] Fix logic to handle protocol-backed events. (#19707)
This is a follow-up to 2bd23381e64494f4dbdcfcd71d161365d111a780: there was
some missing logic that caused nothing to be done for Delegate fields backed
by a protocol interface.
2024-01-02 18:22:09 +01:00
Rolf Bjarne Kvinge 34d1ccdc10
[msbuild] Merge the GenerateBundleName[TaskBase] classes. (#19683) 2024-01-02 18:19:04 +01:00
Rolf Bjarne Kvinge 1b56f0d32a
[msbuild] Merge the GetDirectories[TaskBase] classes. (#19685) 2024-01-02 18:18:49 +01:00
Rolf Bjarne Kvinge a58d670bbc
[msbuild] Merge the GetFileSystemEntries[TaskBase] classes. (#19686) 2024-01-02 18:18:33 +01:00
Haritha Mohan 48d0a7f0e7
[ADR] Add support for Intellisense (#19506)
Fixes https://github.com/xamarin/xamarin-macios/issues/17398

Need to land https://github.com/xamarin/maccore/pull/2733 first and make
a maccore bump here.

Opted to keep the tool's invocation inline to keep things more
straightforward. Since the tool is running in parallel for all
platforms, it can (and needs to) only build once- this is what the
.build-adr-stamp target aims to ensure.
2024-01-02 11:29:06 -05:00
Rolf Bjarne Kvinge dfa1ec1516
[AppKit] Implement the NSUserInterfaceItemSearching protocol. Fixes #19649. (#19662)
Fixes https://github.com/xamarin/xamarin-macios/issues/19649.
2024-01-02 14:33:28 +01:00
Rolf Bjarne Kvinge 342794cec6
[AppKit] Fix binding for NSFontDescriptor.Create. Fixes #19659. (#19663)
[NSFontDescriptor fontDescriptorWithDesign:] takes an NSString, not the enum
value, so use BindAs to bind correctly.

Fixes https://github.com/xamarin/xamarin-macios/issues/19659.
2024-01-02 14:31:46 +01:00
Rolf Bjarne Kvinge 0813e0e2cc
[Foundation] Create a strong dictionary for NSAttributedStringDocumentReadingOptionKey. (#19667) 2024-01-02 14:31:07 +01:00