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

[pigeon] [swift] Changes PigeonError class to conform to Sendable. #8302

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion packages/pigeon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 23.0.0

* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
* [swift] Changes `PigeonError` class to conform to `Sendable`.

## 22.7.0

Expand Down
4 changes: 2 additions & 2 deletions packages/pigeon/example/app/ios/Runner/Messages.g.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import Foundation
final class PigeonError: Error {
let code: String
let message: String?
let details: Any?
let details: Sendable?

init(code: String, message: String?, details: Any?) {
init(code: String, message: String?, details: Sendable?) {
self.code = code
self.message = message
self.details = details
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/lib/generator_tools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import 'ast.dart';
/// The current version of pigeon.
///
/// This must match the version in pubspec.yaml.
const String pigeonVersion = '22.7.0';
const String pigeonVersion = '23.0.0';

/// Read all the content from [stdin] to a String.
String readStdin() {
Expand Down
5 changes: 3 additions & 2 deletions packages/pigeon/lib/swift_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2470,10 +2470,11 @@ private func nilOrValue<T>(_ value: Any?) -> T? {
() {
indent.writeln('let code: String');
indent.writeln('let message: String?');
indent.writeln('let details: Any?');
indent.writeln('let details: Sendable?');
indent.newln();
indent.writeScoped(
'init(code: String, message: String?, details: Any?) {', '}', () {
'init(code: String, message: String?, details: Sendable?) {', '}',
() {
indent.writeln('self.code = code');
indent.writeln('self.message = message');
indent.writeln('self.details = details');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import Foundation
final class PigeonError: Error {
let code: String
let message: String?
let details: Any?
let details: Sendable?

init(code: String, message: String?, details: Any?) {
init(code: String, message: String?, details: Sendable?) {
self.code = code
self.message = message
self.details = details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import Foundation
final class EventChannelTestsError: Error {
let code: String
let message: String?
let details: Any?
let details: Sendable?

init(code: String, message: String?, details: Any?) {
init(code: String, message: String?, details: Sendable?) {
self.code = code
self.message = message
self.details = details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import Foundation
final class ProxyApiTestsError: Error {
let code: String
let message: String?
let details: Any?
let details: Sendable?

init(code: String, message: String?, details: Any?) {
init(code: String, message: String?, details: Sendable?) {
self.code = code
self.message = message
self.details = details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import Foundation
final class PigeonError: Error {
let code: String
let message: String?
let details: Any?
let details: Sendable?

init(code: String, message: String?, details: Any?) {
init(code: String, message: String?, details: Sendable?) {
self.code = code
self.message = message
self.details = details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import Foundation
final class EventChannelTestsError: Error {
let code: String
let message: String?
let details: Any?
let details: Sendable?

init(code: String, message: String?, details: Any?) {
init(code: String, message: String?, details: Sendable?) {
self.code = code
self.message = message
self.details = details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import Foundation
final class ProxyApiTestsError: Error {
let code: String
let message: String?
let details: Any?
let details: Sendable?

init(code: String, message: String?, details: Any?) {
init(code: String, message: String?, details: Sendable?) {
self.code = code
self.message = message
self.details = details
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: pigeon
description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
repository: https://github.com/flutter/packages/tree/main/packages/pigeon
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+pigeon%22
version: 22.7.0 # This must match the version in lib/generator_tools.dart
version: 23.0.0 # This must match the version in lib/generator_tools.dart

environment:
sdk: ^3.4.0
Expand Down
Loading