-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#6611Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.19Found to occur in 3.19Found to occur in 3.19found in release: 3.22Found to occur in 3.22Found to occur in 3.22has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Description
Steps to reproduce
- Create a new Flutter app and plugin, respectively.
- Add pigeon to both projects and generate Swift code.
- Add an extension to FlutterError in both projects (
extension FlutterError: Swift.Error {}). - Try to build the project.
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.
Flutter Doctor output
Doctor output
$ flutter doctor -v
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale en-KR)
• Flutter version 3.19.6 on channel stable at /Users/leebc/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 54e66469a9 (8 days ago), 2024-04-17 13:08:03 -0700
• Engine revision c4cd48e186
• Dart version 3.3.4
• DevTools version 2.31.1
...Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listfound in release: 3.19Found to occur in 3.19Found to occur in 3.19found in release: 3.22Found to occur in 3.22Found to occur in 3.22has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team