-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[pigeon][swift] Removes FlutterError in favor of PigeonError #6611
Commits on Apr 25, 2024
-
[pigeon] Do not use FlutterError when generating Swift code
Swift has more strict type system than Objective-C. For example, protocol conformance must not be redundant[1]. Also, Both FlutterError and Swift.Error are public, extension `FlutterError` to `Swift.Error` is also public. If someone create a such extension in the plugin code, Flutter app can't create a such extension in the app code, which forces Plugin developers to use Objective-C when they want to use pigeon, instead of Swift. To avoid this issue, this change makes pigeon to use another error type, named PigeonError, instead of FlutterError. By declaring PigeonError as internal visibility, their existence won't make compilation error even if PigeonError is declared in the app code. [1] https://docs.swift.org/swift-book/documentation/the-swift-programming-language/declarations/#Protocol-Conformance-Must-Not-Be-Redundant
Configuration menu - View commit details
-
Copy full SHA for c510bd6 - Browse repository at this point
Copy the full SHA c510bd6View commit details -
[pigeon] Add option to whether emit PigeonError class in Swift code
While PigeonError is defined as an internal visibility, so different modules don't have problems with the same class name, it's still troublesome to have it in the generated code if users call pigeon multiple times in the same module. To solve this problem, add a new option, `swift_emit_error_class`, to control whether to emit the PigeonError class in the generated Swift code. The default value is true, which means the PigeonError class will be emitted as before.
Configuration menu - View commit details
-
Copy full SHA for d8968d7 - Browse repository at this point
Copy the full SHA d8968d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2beea1 - Browse repository at this point
Copy the full SHA c2beea1View commit details -
[pigeon] Always make sure CoreTests.gen.swift has PigeonError class
Apparently, when checking `pod lib lint`, other generated files might be missing.
Configuration menu - View commit details
-
Copy full SHA for 6a8a94c - Browse repository at this point
Copy the full SHA 6a8a94cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b874f09 - Browse repository at this point
Copy the full SHA b874f09View commit details -
[pigeon] Rename swiftEmitErrorClass to emitPigeonErrorClass
And add a test for the new option.
Configuration menu - View commit details
-
Copy full SHA for df102e3 - Browse repository at this point
Copy the full SHA df102e3View commit details
Commits on Apr 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b30a0cc - Browse repository at this point
Copy the full SHA b30a0ccView commit details -
[pigeon] Emit Error class for Swift with different names per file
Like Kotlin, to not have a conflict with the same name of the error class, we should emit different names for each error class.
Configuration menu - View commit details
-
Copy full SHA for 30ac050 - Browse repository at this point
Copy the full SHA 30ac050View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92c97af - Browse repository at this point
Copy the full SHA 92c97afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 86d9168 - Browse repository at this point
Copy the full SHA 86d9168View commit details -
Configuration menu - View commit details
-
Copy full SHA for 20ac87a - Browse repository at this point
Copy the full SHA 20ac87aView commit details -
[pigeon] Generate Swift error on CoreTests.gen.swift
This is because `pod lib lint` runs without the generated code. Therefore, CoreTests.gen.swift must be able to compile on its own.
Configuration menu - View commit details
-
Copy full SHA for 800ba60 - Browse repository at this point
Copy the full SHA 800ba60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fa6b75 - Browse repository at this point
Copy the full SHA 8fa6b75View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4bd3dbc - Browse repository at this point
Copy the full SHA 4bd3dbcView commit details -
Configuration menu - View commit details
-
Copy full SHA for fae49ea - Browse repository at this point
Copy the full SHA fae49eaView commit details
Commits on May 8, 2024
-
Merge commit 'd670b2c38c8db0a773aa703e7d3f15682e05ad7f' into feature/…
…pigeon-swift-error
Configuration menu - View commit details
-
Copy full SHA for b386a96 - Browse repository at this point
Copy the full SHA b386a96View commit details
Commits on May 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 78c3bb6 - Browse repository at this point
Copy the full SHA 78c3bb6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f13a06a - Browse repository at this point
Copy the full SHA f13a06aView commit details -
Update the documentation for using PigeonError in Swift
And replace existing usage of FlutterError.
Configuration menu - View commit details
-
Copy full SHA for 63df915 - Browse repository at this point
Copy the full SHA 63df915View commit details
Commits on May 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 428736d - Browse repository at this point
Copy the full SHA 428736dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 88cd27d - Browse repository at this point
Copy the full SHA 88cd27dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a78cae7 - Browse repository at this point
Copy the full SHA a78cae7View commit details
Commits on May 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4ed7852 - Browse repository at this point
Copy the full SHA 4ed7852View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8ab4f8 - Browse repository at this point
Copy the full SHA a8ab4f8View commit details
Commits on May 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 877015d - Browse repository at this point
Copy the full SHA 877015dView commit details