From cd8169650784f434fe3b7e7876fd84fb58253a71 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 29 Nov 2017 14:04:04 -0800 Subject: [PATCH 1/2] Add macros to mark APIs as being deprecated or unavailable. --- .../darwin/ios/framework/Headers/Flutter.h | 6 ++++++ .../ios/framework/Headers/FlutterMacros.h | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/shell/platform/darwin/ios/framework/Headers/Flutter.h b/shell/platform/darwin/ios/framework/Headers/Flutter.h index 5ad9b64d76233..4de139fe56e97 100644 --- a/shell/platform/darwin/ios/framework/Headers/Flutter.h +++ b/shell/platform/darwin/ios/framework/Headers/Flutter.h @@ -5,6 +5,12 @@ #ifndef FLUTTER_FLUTTER_H_ #define FLUTTER_FLUTTER_H_ +/** + CHANGELOG: + + November 29, 2017: Added a CHANGELOG section. + */ + #include "FlutterAppDelegate.h" #include "FlutterBinaryMessenger.h" #include "FlutterChannels.h" diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h b/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h index 4e32b6c36c1c3..2d770705477e2 100644 --- a/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h +++ b/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h @@ -20,4 +20,21 @@ #define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") #endif // defined(NS_ASSUME_NONNULL_BEGIN) +/** + Indicates that the API has been deprecated for the specifed reason. Code that + uses the deprecated API will continue to work as before. However, the API will + soon become unavailable and users are encouraged to immediately take the + appropriate action mentioned in the deprecation message and the changelog + section present in the Flutter.h umbrella header. + */ +#define FLUTTER_DEPRECATED(msg) __attribute__((__deprecated__(msg))) + +/** + Indicates that the previously deprecated API is now unavailable. Code that + uses the API will not work and the declaration of the API is only a stub meant + to display the given message detailing the actions for the user to take + immediately. + */ +#define FLUTTER_UNAVAILABLE(msg) __attribute__((__unavailable__(msg))) + #endif // FLUTTER_FLUTTERMACROS_H_ From 897a4940506f0e2b64d188e4994d1ae5e9303f3c Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 29 Nov 2017 16:27:03 -0800 Subject: [PATCH 2/2] PR --- shell/platform/darwin/ios/framework/Headers/Flutter.h | 4 ++-- shell/platform/darwin/ios/framework/Headers/FlutterMacros.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Headers/Flutter.h b/shell/platform/darwin/ios/framework/Headers/Flutter.h index 4de139fe56e97..87604cf4559c5 100644 --- a/shell/platform/darwin/ios/framework/Headers/Flutter.h +++ b/shell/platform/darwin/ios/framework/Headers/Flutter.h @@ -6,9 +6,9 @@ #define FLUTTER_FLUTTER_H_ /** - CHANGELOG: + BREAKING CHANGES: - November 29, 2017: Added a CHANGELOG section. + November 29, 2017: Added a BREAKING CHANGES section. */ #include "FlutterAppDelegate.h" diff --git a/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h b/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h index 2d770705477e2..ea19d1cb5fb12 100644 --- a/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h +++ b/shell/platform/darwin/ios/framework/Headers/FlutterMacros.h @@ -24,8 +24,8 @@ Indicates that the API has been deprecated for the specifed reason. Code that uses the deprecated API will continue to work as before. However, the API will soon become unavailable and users are encouraged to immediately take the - appropriate action mentioned in the deprecation message and the changelog - section present in the Flutter.h umbrella header. + appropriate action mentioned in the deprecation message and the BREAKING + CHANGES section present in the Flutter.h umbrella header. */ #define FLUTTER_DEPRECATED(msg) __attribute__((__deprecated__(msg)))