Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHIP] Add support for Xcode13 beta2. #12025

Merged
merged 19 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,767 changes: 1,767 additions & 0 deletions src/chip.cs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -1924,6 +1924,7 @@ MAC_FRAMEWORKS = \
BusinessChat \
CallKit \
CFNetwork \
Chip \
ClassKit \
CloudKit \
Contacts \
Expand Down Expand Up @@ -2024,6 +2025,7 @@ IOS_FRAMEWORKS = \
CallKit \
CarPlay \
CFNetwork \
Chip \
ClassKit \
CloudKit \
Contacts \
Expand Down Expand Up @@ -2113,6 +2115,7 @@ IOS_FRAMEWORKS = \

WATCHOS_FRAMEWORKS = \
$(COMMON_FRAMEWORKS) \
Chip \
ClockKit \
CloudKit \
Contacts \
Expand Down Expand Up @@ -2145,6 +2148,7 @@ TVOS_FRAMEWORKS = \
AudioUnit \
BackgroundTasks \
CFNetwork \
Chip \
CloudKit \
CoreAnimation \
CoreGraphics \
Expand Down
4 changes: 3 additions & 1 deletion tests/introspection/ApiTypoTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public virtual bool Skip (MemberInfo methodName, string typo) {
"Cda", // acronym: Clinical Document Architecture
"Cdrom",
"Celu", // Continuously Differentiable Exponential Linear Unit (ML)
"Chip", // framework name
"Cfa", // acronym: Color Filter Array
"Celp", // MPEG4ObjectID
"Characterteristic",
Expand Down Expand Up @@ -1062,9 +1063,10 @@ public void ConstantsCheck ()
break;
#endif
#if !__MACOS__
case "ChipLibrary":
case "MediaSetupLibrary":
case "MLComputeLibrary":
// Xcode 12 beta 2 does not ship this framework/headers for the simulators
// Xcode 12 beta 2 does not ship these framework/headers for the simulators
if (Runtime.Arch == Arch.DEVICE)
Assert.True (CheckLibrary (s), fi.Name);
break;
Expand Down
1 change: 1 addition & 0 deletions tests/introspection/iOS/iOSApiProtocolTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public iOSApiProtocolTest ()
protected override bool Skip (Type type)
{
switch (type.Namespace) {
case "Chip":
case "MetalKit":
case "MonoTouch.MetalKit":
case "MetalPerformanceShaders":
Expand Down
1 change: 1 addition & 0 deletions tests/introspection/iOS/iOSApiSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ protected override bool Skip (Type type)
if ((Runtime.Arch == Arch.SIMULATOR) && !TestRuntime.CheckXcodeVersion (7, 0))
return true;
break;
case "Chip":
case "MetalKit":
case "MonoTouch.MetalKit":
case "MetalPerformanceShaders":
Expand Down
1 change: 1 addition & 0 deletions tests/mtouch/RegistrarTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ public void MT4134 ()
new { Framework = "QuickLookThumbnailing", Version = "13.0" },
new { Framework = "AutomaticAssessmentConfiguration", Version = "13.4" },
new { Framework = "CoreLocationUI", Version = "15.0" },
new { Framework = "Chip", Version = "15.0" },
};
foreach (var framework in invalidFrameworks)
mtouch.AssertError (4134, $"Your application is using the '{framework.Framework}' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS {framework.Version}, while you're building with the iOS {mtouch.Sdk} SDK.) Please select a newer SDK in your app's iOS Build options.");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# framework is missing in Xcode13 beta 1
!missing-enum! CHIPErrorCode not bound
!missing-enum! CHIPOnboardingPayloadType not bound
!missing-enum! CHIPOptionalQRCodeInfoType not bound
!missing-enum! CHIPPairingStatus not bound
!missing-enum! CHIPRendezvousInformationFlags not bound
!missing-field! CHIPErrorDomain not bound
!missing-field! CHIPVersionNumber not bound
!missing-field! CHIPVersionString not bound
!missing-protocol! CHIPDevicePairingDelegate not bound
!missing-protocol! CHIPPersistentStorageDelegate not bound
!missing-selector! +CHIPDeviceController::sharedController not bound
Expand Down
2 changes: 2 additions & 0 deletions tests/xtro-sharpie/common-CHIP.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!missing-field! CHIPVersionNumber not bound
!missing-field! CHIPVersionString not bound
403 changes: 0 additions & 403 deletions tests/xtro-sharpie/iOS-CHIP.todo

This file was deleted.

403 changes: 0 additions & 403 deletions tests/xtro-sharpie/macOS-CHIP.todo

This file was deleted.

403 changes: 0 additions & 403 deletions tests/xtro-sharpie/tvOS-CHIP.todo

This file was deleted.

403 changes: 0 additions & 403 deletions tests/xtro-sharpie/watchOS-CHIP.todo

This file was deleted.

8 changes: 8 additions & 0 deletions tools/common/Frameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ public static Frameworks MacFrameworks {
{ "UserNotificationsUI", "UserNotificationsUI", 11,0 },

{ "AdServices", "AdServices", 11,1 },

{ "Chip", "CHIP", 12, 0 },
};
}
return mac_frameworks;
Expand Down Expand Up @@ -420,6 +422,8 @@ public static Frameworks CreateiOSFrameworks (bool is_simulator_build)

{ "CoreLocationUI", "CoreLocationUI", 15,0 },

{ "Chip", "CHIP", new Version (15, 0), NotAvailableInSimulator /* no headers in beta 2 */ }

// the above MUST be kept in sync with simlauncher
// see tools/mtouch/Makefile
// please also keep it sorted to ease comparison
Expand Down Expand Up @@ -487,6 +491,8 @@ public static Frameworks GetwatchOSFrameworks (bool is_simulator_build)
{ "Accessibility", "Accessibility", 7,0 },
{ "UniformTypeIdentifiers", "UniformTypeIdentifiers", 7,0 },

{ "Chip", "CHIP", new Version (8, 0), NotAvailableInSimulator /* no headers in beta 2 */ },

};
}
return watch_frameworks;
Expand Down Expand Up @@ -575,6 +581,8 @@ public static Frameworks TVOSFrameworks {
{ "MLCompute", "MLCompute", new Version (14,0), NotAvailableInSimulator },
{ "UniformTypeIdentifiers", "UniformTypeIdentifiers", 14,0 },
{ "Intents", "Intents", 14,0 },

{ "Chip", "CHIP", new Version (15, 0), NotAvailableInSimulator /* no headers in beta 2 */ },
};
}
return tvos_frameworks;
Expand Down
3 changes: 3 additions & 0 deletions tools/common/StaticRegistrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,9 @@ void CheckNamespace (string ns, List<Exception> exceptions)
}
}
goto default;
case "Chip":
h = "<CHIP/CHIP.h>";
break;
case "GLKit":
// This prevents this warning:
// /Applications/Xcode83.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:5:2: warning: gl.h and gl3.h are both
Expand Down
1 change: 1 addition & 0 deletions tools/common/Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ public void GatherFrameworks ()
case "Metal":
case "MetalKit":
case "MetalPerformanceShaders":
case "CHIP":
Copy link
Member

Choose a reason for hiding this comment

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

@dalexsoto out of curiosity, why doesn't the default case handle this?

if (App.IsSimulatorBuild && !App.IsFrameworkAvailableInSimulator (framework.Name)) {
if (App.LinkMode != LinkMode.None) {
ErrorHelper.Warning (5223, Errors.MX5223, framework.Name, App.PlatformName);
} else {
Driver.Log (3, Errors.MX5223, framework.Name, App.PlatformName);
}
continue;
}

Copy link
Member

Choose a reason for hiding this comment

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

@rolfbjarne good question, I did not have a close look at it I wonder if there is a casing issue somewhere @mandel-macaque looks like we'll need to check deeper

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm looking atm.

// some frameworks do not exists on simulators and will result in linker errors if we include them
if (App.IsSimulatorBuild)
continue;
Expand Down
1 change: 1 addition & 0 deletions tools/linker/ObjCExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ static class Namespaces {
public const string AppKit = nameof (AppKit);
public const string AVFoundation = nameof (AVFoundation);
public const string AVKit = nameof (AVKit);
public const string Chip = nameof (Chip);
public const string CloudKit = nameof (CloudKit);
public const string Contacts = nameof (Contacts);
public const string ContactsUI = nameof (ContactsUI);
Expand Down