Skip to content

Commit

Permalink
Merge branch 'main' into darc-main-38ef8300-a7b5-4ebc-9dd4-75e9ac8721ed
Browse files Browse the repository at this point in the history
  • Loading branch information
spouliot committed Apr 17, 2021
2 parents c837f58 + dec81b6 commit 50e7fcc
Show file tree
Hide file tree
Showing 58 changed files with 668 additions and 29 deletions.
1 change: 0 additions & 1 deletion dotnet/targets/Xamarin.Shared.Sdk.DefaultItems.targets
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
RuntimePackNamePatterns="Microsoft.$(_PlatformName).Runtime.**RID**"
RuntimePackRuntimeIdentifiers="$(_RuntimePackRuntimeIdentifiers)"
Profile="$(_PlatformName)"
IsTrimmable="true"
/>
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@
<ResolvedFileToPublish
Update="@(ResolvedFileToPublish)"
RelativePath="$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)$(PublishDir),$(_DylibPublishDir)))\%(Filename)%(Extension)"
Condition="'$(_SdkIsSimulator)' != 'false' And '%(Extension)' == '.dylib'" />
Condition="('$(_SdkIsSimulator)' != 'false' Or '$(_PlatformName)' == 'macOS' Or '$(_PlatformName)' == 'MacCatalyst') And '%(Extension)' == '.dylib'" />
<ResolvedFileToPublish
Update="@(ResolvedFileToPublish)"
RelativePath="$([MSBuild]::MakeRelative($(MSBuildProjectDirectory)$(PublishDir),$(_AssemblyPublishDir)))\%(Filename)%(Extension)"
Expand Down
2 changes: 2 additions & 0 deletions src/AssemblyInfo.cs.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ using System.Runtime.CompilerServices;
// [assembly: AssemblyCopyright ("Copyright 2011-2014 Xamarin Inc.")]
[assembly: AssemblyCompany ("Xamarin Inc.")]

[assembly: AssemblyMetadata ("IsTrimmable", "True")]

[assembly: InternalsVisibleTo ("System.Net.Http,PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
2 changes: 2 additions & 0 deletions src/Compression/Compression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

namespace Compression
{
#if !NET
[iOS (9,0), Mac (10,11)]
#endif
public partial class CompressionStream : Stream
{
private const int DefaultBufferSize = 8192;
Expand Down
3 changes: 2 additions & 1 deletion src/Compression/CompressionStreamStruct.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

namespace Compression
{

#if !NET
[iOS (9,0), Mac (10,11)]
#endif
[StructLayout(LayoutKind.Sequential)]
struct CompressionStreamStruct {
public IntPtr Destination; // uint8_t * dst_ptr
Expand Down
4 changes: 3 additions & 1 deletion src/Compression/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

namespace Compression {

// this enum as per the headers is an int NOT an NSInterger
// this enum as per the headers is an int NOT an NSInteger
#if !NET
[iOS (9,0), TV (9,0), Mac (10,11)]
#endif
public enum CompressionAlgorithm {
LZ4 = 0x100,
LZ4Raw = 0x101,
Expand Down
2 changes: 2 additions & 0 deletions src/CoreData/NSEntityDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ namespace CoreData
{
public partial class NSEntityDescription
{
#if !NET
[iOS (9,0), Mac (10,11)]
#endif
public NSObject[][] UniquenessConstraints {
get { return NSArray.FromArrayOfArray (_UniquenessConstraints); }
set { _UniquenessConstraints = NSArray.From (value); }
Expand Down
27 changes: 27 additions & 0 deletions src/CoreImage/CIContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

using System.Runtime.Versioning;

using Foundation;
using CoreGraphics;
using CoreFoundation;
Expand Down Expand Up @@ -86,7 +89,9 @@ public int? CIImageFormat {
}
}

#if !NET
[Mac (10,12)]
#endif
public bool? PriorityRequestLow {
get {
return GetBoolValue (CIContext.PriorityRequestLow);
Expand All @@ -105,7 +110,9 @@ public bool? HighQualityDownsample {
}
}

#if !NET
[iOS (7,0)]
#endif
public bool? OutputPremultiplied {
get {
return GetBoolValue (CIContext.OutputPremultiplied);
Expand All @@ -115,7 +122,9 @@ public bool? OutputPremultiplied {
}
}

#if !NET
[iOS (10,0)][Mac (10,12)]
#endif
public bool? CacheIntermediates {
get {
return GetBoolValue (CIContext.CacheIntermediates);
Expand All @@ -125,7 +134,13 @@ public bool? CacheIntermediates {
}
}

#if NET
[SupportedOSPlatform ("ios13.0")]
[SupportedOSPlatform ("tvos13.0")]
[SupportedOSPlatform ("macos10.15")]
#else
[iOS (13,0)][TV (13,0)][Mac (10,15)]
#endif
public bool? AllowLowPower {
get {
return GetBoolValue (CIContext.AllowLowPower);
Expand All @@ -135,7 +150,13 @@ public bool? AllowLowPower {
}
}

#if NET
[SupportedOSPlatform ("ios14.0")]
[SupportedOSPlatform ("tvos14.0")]
[SupportedOSPlatform ("macos11.0")]
#else
[iOS (14,0)][TV (14,0)][Mac (11,0)]
#endif
public string? Name {
get {
return GetStringValue (CIContext.Name);
Expand All @@ -148,7 +169,9 @@ public string? Name {

public partial class CIContext {

#if !NET
[iOS (8,0)]
#endif
public CIContext (CIContextOptions options) :
this (options?.Dictionary)
{
Expand Down Expand Up @@ -183,7 +206,11 @@ public static CIContext FromMetalDevice (IMTLDevice device, CIContextOptions? op
#endif

#if MONOMAC
#if NET
[UnsupportedOSPlatform ("macos10.11")]
#else
[Deprecated (PlatformName.MacOSX, 10, 11)]
#endif
public CGLayer? CreateCGLayer (CGSize size)
{
return CreateCGLayer (size, null);
Expand Down
2 changes: 2 additions & 0 deletions src/CoreImage/CIDetectorOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public partial class CIDetectorOptions {
public FaceDetectorAccuracy? Accuracy { get; set; }
public float? MinFeatureSize { get; set; }

#if !NET
[iOS (10,0)][Mac (10,12)]
#endif
public int? MaxFeatureCount { get; set; }

public bool? TrackingEnabled { get; set; }
Expand Down
3 changes: 3 additions & 0 deletions src/CoreImage/CIFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@

namespace CoreImage {
public partial class CIFilter {

#if !NET
[iOS (8,0)]
#endif
protected CIFilter () : base ()
{
}
Expand Down
4 changes: 4 additions & 0 deletions src/CoreImage/CIImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ public class CIAutoAdjustmentFilterOptions {

public CIImageOrientation? ImageOrientation;

#if !NET
[iOS (8,0)]
#endif
public bool? AutoAdjustCrop;
#if !NET
[iOS (8,0)]
#endif
public bool? AutoAdjustLevel;

internal NSDictionary? ToDictionary ()
Expand Down
16 changes: 16 additions & 0 deletions src/CoreImage/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
//

using System;
using System.Runtime.Versioning;
using ObjCRuntime;

#nullable enable
Expand Down Expand Up @@ -76,9 +77,14 @@ public enum CIFormat {
RGf = 22
}

#if NET
[SupportedOSPlatform ("ios11.0")]
[SupportedOSPlatform ("tvos11.0")]
#else
[iOS (11,0)]
[Mac (10,13)]
[TV (11,0)]
#endif
[Native]
public enum CIQRCodeErrorCorrectionLevel : long {
L = 76,
Expand All @@ -87,9 +93,14 @@ public enum CIQRCodeErrorCorrectionLevel : long {
H = 72,
}

#if NET
[SupportedOSPlatform ("ios11.0")]
[SupportedOSPlatform ("tvos11.0")]
#else
[iOS (11,0)]
[Mac (10,13)]
[TV (11,0)]
#endif
[Native]
public enum CIDataMatrixCodeEccVersion : long {
V000 = 0,
Expand All @@ -100,9 +111,14 @@ public enum CIDataMatrixCodeEccVersion : long {
V200 = 200,
}

#if NET
[SupportedOSPlatform ("ios11.0")]
[SupportedOSPlatform ("tvos11.0")]
#else
[iOS (11,0)]
[Mac (10,13)]
[TV (11,0)]
#endif
[Native]
public enum CIRenderDestinationAlphaMode : ulong {
None = 0,
Expand Down
8 changes: 8 additions & 0 deletions src/CoreMedia/CMBufferQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ namespace CoreMedia {
public delegate bool CMBufferGetBool (INativeObject buffer);
public delegate int CMBufferCompare (INativeObject first, INativeObject second);

#if !NET
[iOS (7,1), Watch (6,0)]
#endif
public delegate nint CMBufferGetSize (INativeObject buffer);

public class CMBufferQueue : INativeObject
Expand Down Expand Up @@ -294,12 +296,16 @@ public CMTime Duration {
}
}

#if !NET
[iOS (7,1)][Mac (10,10)]
#endif
[DllImport(Constants.CoreMediaLibrary)]
extern static /* size_t */ nint CMBufferQueueGetTotalSize (/* CMBufferQueueRef */ IntPtr queue);

#if !NET
[iOS (7,1)]
[Mac (10, 10)]
#endif
public nint GetTotalSize ()
{
return CMBufferQueueGetTotalSize (handle);
Expand Down Expand Up @@ -367,7 +373,9 @@ static nint GetTotalSize (IntPtr buffer, IntPtr refcon)
}
#endif // !COREBUILD

#if !NET
[Watch (6,0)]
#endif
public enum TriggerCondition {
WhenDurationBecomesLessThan = 1,
WhenDurationBecomesLessThanOrEqualTo = 2,
Expand Down
6 changes: 6 additions & 0 deletions src/CoreMidi/MidiCIDeviceIdentification.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using ObjCRuntime;
using CoreFoundation;
using Foundation;

namespace CoreMidi {

#if NET
[SupportedOSPlatform ("ios12.0")]
[UnsupportedOSPlatform ("tvos")]
#else
[NoWatch, NoTV, Mac (10,14), iOS (12,0)]
#endif
[StructLayout (LayoutKind.Sequential)]
public struct MidiCIDeviceIdentification {
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
Expand Down
Loading

1 comment on commit 50e7fcc

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

Packages generated

View packages

Test results

10 tests failed, 172 tests passed.

Failed tests

  • monotouch-test/iOS Unified 64-bits - simulator/Debug [dotnet]: TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk): TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar): TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations): TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (all optimizations): TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk) [dotnet]: TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar) [dotnet]: TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations) [dotnet]: TimedOut
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (all optimizations) [dotnet]: TimedOut
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 5.0): LaunchFailure

Pipeline on Agent XAMBOT-1017
Merge branch 'main' into darc-main-38ef8300-a7b5-4ebc-9dd4-75e9ac8721ed

Please sign in to comment.