Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
4 changes: 4 additions & 0 deletions packages/pigeon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 26.3.5

* [swift] Adds `CaseIterable` conformance to generated enums.

## 26.3.4

* [kotlin] Updates generated error class to inherit from `RuntimeException`
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/lib/src/generator_tools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'generator.dart';
/// The current version of pigeon.
///
/// This must match the version in pubspec.yaml.
const String pigeonVersion = '26.3.4';
const String pigeonVersion = '26.3.5';

/// Default plugin package name.
const String defaultPluginPackageName = 'dev.flutter.pigeon';
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/lib/src/swift/swift_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class SwiftGenerator extends StructuredGenerator<InternalSwiftOptions> {
_docCommentSpec,
);

indent.write('enum ${anEnum.name}: Int ');
indent.write('enum ${anEnum.name}: Int, CaseIterable ');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The addition of CaseIterable to generated Swift enums is a useful improvement. However, I noticed that no new tests or updates to existing golden files were included in this pull request to verify this change. Please ensure that the generated output is covered by tests to prevent regressions and verify the correct syntax is produced.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is now included in test

indent.addScoped('{', '}', () {
enumerate(anEnum.members, (int index, final EnumMember member) {
addDocumentationComments(
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: 26.3.4 # This must match the version in lib/src/generator_tools.dart
version: 26.3.5 # This must match the version in lib/src/generator_tools.dart

environment:
sdk: ^3.9.0
Expand Down