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] If both plugin and app uses Swift for generating code, extension for FlutterError make project not buildable. #147371
Labels
found in release: 3.19
Found to occur in 3.19
found in release: 3.22
Found to occur in 3.22
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
p: pigeon
related to pigeon messaging codegen tool
P2
Important issues not at the top of the work list
package
flutter/packages repository. See also p: labels.
platform-ios
iOS applications specifically
team-ecosystem
Owned by Ecosystem team
triaged-ecosystem
Triaged by Ecosystem team
Comments
11 tasks
Thanks for the detailed bug report and potential fix. stable, master flutter doctor -v
|
darshankawar
added
platform-ios
iOS applications specifically
package
flutter/packages repository. See also p: labels.
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
p: pigeon
related to pigeon messaging codegen tool
found in release: 3.19
Found to occur in 3.19
found in release: 3.22
Found to occur in 3.22
team-ecosystem
Owned by Ecosystem team
and removed
in triage
Presently being triaged by the triage team
labels
Apr 26, 2024
stuartmorgan
added
P2
Important issues not at the top of the work list
triaged-ecosystem
Triaged by Ecosystem team
labels
Apr 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
found in release: 3.19
Found to occur in 3.19
found in release: 3.22
Found to occur in 3.22
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
p: pigeon
related to pigeon messaging codegen tool
P2
Important issues not at the top of the work list
package
flutter/packages repository. See also p: labels.
platform-ios
iOS applications specifically
team-ecosystem
Owned by Ecosystem team
triaged-ecosystem
Triaged by Ecosystem team
Steps to reproduce
extension FlutterError: Swift.Error {}
).Expected results
The project should build successfully.
Actual results
error: redundant conformance of 'FlutterError' to protocol 'Error'
Code sample
Check out https://github.com/bc-lee/demo-flutter-pigeon-swift.git with
aca044733e3f624a14ab6cd40851c733b519f1e7 commit.
Failing GitHub Action: Link
Analysis
Requiring users to add
extension FlutterError: Swift.Error {}
was due to #137057. However, even with that workaround, the project still remains unbuildable.The root cause of this issue is that Swift has much stricter type system than Objective-C. For example, protocol conformance must not be redundant[1].
We need better solution to avoid this issue. I'm working on a PR to fix this issue.
[1] https://docs.swift.org/swift-book/documentation/the-swift-programming-language/declarations/#Protocol-Conformance-Must-Not-Be-Redundant
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: