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

16864 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 4c1c0f8ad4
[builds] Use .NET versions for the buildinfo file we put in .NET NuGets. (#19797)
Use the .NET version (the `*_NUGET_VERSION` variables) instead of the
Xamarin.iOS/Xamarin.Mac versions (the `IOS_PACKAGE_VERSION` /
`MAC_PACKAGE_VERSION` variables) for the buildinfo file we put in our .NET
NuGets.

This also means we can share the same logic for all .NET platforms, instead of
having to special-case macOS.

Besides this being the correct value to put in the file (the Xamarin versions
have nothing to do with the .NET versions), it also decouples legacy logic
from .NET logic, which makes it easier to remove legacy logic when that time
comes.
2024-01-12 08:52:30 +01:00
dotnet-maestro[bot] edc6f28c39
[main] Update dependencies from dotnet/installer (#19793)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 8.0.0 to 8.0.1 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0 to 8.0.1 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0 to 8.0.1 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100**: from 8.0.0 to 8.0.1 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0 to 8.0.1 (parent: Microsoft.Dotnet.Sdk.Internal)

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

- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20240110.42
- **Date Produced**: January 11, 2024 12:59:50 AM UTC
- **Commit**: 5e12b89c162aeca1ee3244be8ede3b3109938d17
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.102-servicing.24060.3 to 8.0.102-servicing.24060.42][1]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.0 to 8.0.1][2]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0 to 8.0.1][3]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0 to 8.0.1][2]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100**: [from 8.0.0 to 8.0.1][4]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0 to 8.0.1][2]

[1]: 351592c3af...5e12b89c16
[2]: https://dev.azure.com/dnceng/internal/_git/dotnet-runtime/branches?baseVersion=GC5535e31a712343a63f5d7d796cd874e563e5ac14&targetVersion=GCbf5e279d9239bfef5bb1b8d6212f1b971c434606&_a=files
[3]: https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/branches?baseVersion=GC3f1acb59718cadf111a0a796681e3d3509bb3381&targetVersion=GC8e941eb42f819adb116b881195158b3887a70a1c&_a=files
[4]: 2406616d0e...201f4dae9d
2024-01-12 08:07:21 +01:00
Manuel de la Pena 53f682586c
[Tests] Fix the Blittable tests in cecil to provide a reason for the failure. (#19799)
The current reults are hard/impossible to understand by a human. Fix the
way we report the error so that we go from:

```
(AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingConfiguration ObjCRuntime.Messaging::AVAudioVoiceProcessingOtherAudioDuckingConfiguration_objc_msgSend(System.IntPtr,System.IntPtr), )
```

to

```
AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingConfiguration ObjCRuntime.Messaging::AVAudioVoiceProcessingOtherAudioDuckingConfiguration_objc_msgSend(System.IntPtr,System.IntPtr) - The return type is AVFoundation.AVAudioVoiceProcessingOtherAudioDuckingConfiguration: (EnableAdvancedDucking: has a [MarshalAs] attribute)
at no match Mono.Cecil.MethodDefinition
```

fulle example here:
https://gist.github.com/mandel-macaque/30f54ac5b0e22454d57644d2b7b94eca
2024-01-11 21:28:41 -05:00
Manuel de la Pena 4494d7efe6
[Tests] Reuse the Helper assert method for the consistency tests. (#19798)
Add a much nicer error message and reuse code. There is not need to add
[Fail] at all in the messages.

Example of the changes:
https://gist.github.com/mandel-macaque/255597f2390804a5a1c2675959b2f35c

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2024-01-11 21:28:20 -05:00
Manuel de la Pena 477c4cccef
[Tests] Move to use the Helpers method to report MarshalAsTest failures. (#19795)
As with others, make the results more readable, in this case we just
need to re-use the already present method.

Diff in the ouputs can be found here:

https://gist.github.com/mandel-macaque/7015b2f9c7dfc857caa72f7c1ea19b0a

In this case we move to have the enumerated list.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-01-11 16:19:36 -05:00
Rolf Bjarne Kvinge 720a4f7ce2
[src] Remove the Protocolize attribute. (#19684)
Remove support for the Protocolize attribute from the generator, and remove
all usages of it in our api definitions - just use the protocol interface.

The Protocolize attribute was used to support binding stuff using the Model
class with Classic Xamarin code + and binding stuff using the protocol
interface with Unified Xamarin code, using the same source code.

Classic Xamarin has been dead for quite a few years ago now though, so there's
no need to keep his code around anymore, we can just upgrade the api
definitions to use the protocol interface directly.

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

---------

Co-authored-by: Alex Soto <alex@soto.dev>
2024-01-11 16:23:15 +01:00
Manuel de la Pena 3211315104
[Tests] Make the test FindMissingObsoleteAttributes usable. (#19784)
The ToString of a named tuple does not make sense for a human, this
tests, while it does find issues with the API, it does not help the
developer to find the real reason.

This PR has 2 important fixes.

1. Add a generic constrain to the Assert.Failures. The developer that
wrote the code got lucky and always used T that are IComparable. I mean
lucky, because the OrderBy from Linq needs T to be IComparable, and I am
surprise we never got a rutime error with the test.
2. Use a record type with a reasonable ToString.

The following gist contains a diff between the output with the fix and
without it.

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

The diff is:

New code:

```
AVFoundation.AVAudioSessionRouteSharingPolicy AVFoundation.AVAudioSessionRouteSharingPolicy::LongForm: AVFoundation.AVAudioSessionRouteSharingPolicy AVFoundation.AVAudioSessionRouteSharingPolicy::LongForm is obsoleted on MacOSX but not on iOS, TVOS, MacCatalyst
```

Old code:
```
(AVFoundation.AVAudioSessionRouteSharingPolicy AVFoundation.AVAudioSessionRouteSharingPolicy::LongForm, AVFoundation.AVAudioSessionRouteSharingPolicy AVFoundation.AVAudioSessionRouteSharingPolicy::LongForm, Cecil.Tests.OSPlatformAttributes[], Cecil.Tests.OSPlatformAttributes[])
```

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2024-01-11 08:47:17 -05:00
dotnet-maestro[bot] 530867c971
[main] Update dependencies from dotnet/installer (#19779)
This pull request updates the following dependencies

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

- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20240110.3
- **Date Produced**: January 10, 2024 10:38:11 AM UTC
- **Commit**: 351592c3af1ddf81e5452dbf14eaaf89aa09b57f
- **Branch**: refs/heads/release/8.0.1xx

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

[1]: 2f83a5e7bb...351592c3af
2024-01-11 11:41:03 +01:00
Rolf Bjarne Kvinge 779f064d04
[src] Add a TransientCFString struct. (#19763)
In order to make it easier to pass C-style strings to P/Invokes, we
introduced
a TransientString struct some time ago.

This works quite well, so I implemented the same for CFStrings - a
TransientCFString struct - and started using it in a few places. The
idea
would be to slowly start migrating our codebase to this new pattern.

Instead of:

    var ptr = CFString.CreateNative ("somestring");
    try {
    	CallPInvoke (ptr);
    } finally {
    	CFString.ReleaseNative (ptr);
    }

we'll do:

    using var ptr = new TransientCFString ("somestring");
    CallPInvoke (ptr);
2024-01-11 09:39:27 +01:00
Rolf Bjarne Kvinge ef03fa8bca
[msbuild] Merge the OptimizeImage[TaskBase] classes. (#19774) 2024-01-11 09:03:00 +01:00
Rolf Bjarne Kvinge b7044bc46d
[msbuild] Merge the OptimizePropertyList[TaskBase] classes. (#19775) 2024-01-11 09:02:52 +01:00
Rolf Bjarne Kvinge d9efe082f2
[msbuild] Merge the PackLibraryResources[TaskBase] classes. (#19783) 2024-01-11 09:02:42 +01:00
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