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] Allows kotlin generator to skip error class generation #6183

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

tarrinneal
Copy link
Contributor

@tarrinneal tarrinneal commented Feb 22, 2024

Allows kotlin generator to skip error class generation by creating includeErrorClass argument.

This may be considered only a partial fix, as it requires another pigeon file with the class generated rather than creating a new file with the class.

This solution seems to me to solve the problem well enough as creating another file is a non-trivial task and there is already a working solution - renaming the error class per file.

fixes: flutter/flutter#142099

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@tarrinneal tarrinneal changed the title Kotlin error sharing [pigeon] Allows kotlin generator to skip error class generation Feb 22, 2024
@tarrinneal tarrinneal marked this pull request as ready for review February 22, 2024 23:53
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

How does sharing work without an import of the file that defines it?

@tarrinneal
Copy link
Contributor Author

How does sharing work without an import of the file that defines it?

As long as it's in the same directory, an import isn't necessary. That's why this is a problem in the first place.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

Weird; LGTM then.

packages/pigeon/CHANGELOG.md Outdated Show resolved Hide resolved
@tarrinneal tarrinneal added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 27, 2024
@auto-submit auto-submit bot merged commit 679bdd7 into flutter:main Feb 27, 2024
78 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 29, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 29, 2024
flutter/packages@353086c...6d02f03

2024-02-28 [email protected] Manual roll Flutter from c30f998 to d00bfe8 (32 revisions) (flutter/packages#6222)
2024-02-28 [email protected] [google_maps_flutter] Add `style` to widget (flutter/packages#6192)
2024-02-28 [email protected] Add library annotations for js interop (flutter/packages#6216)
2024-02-28 [email protected] [google_map_flutter] Add style to widget - platform impls (flutter/packages#6205)
2024-02-28 [email protected] [google_maps_flutter_web] Migrate to package:web (flutter/packages#5254)
2024-02-28 [email protected] [pigeon] Remove heap allocation in generated C++ code (flutter/packages#6196)
2024-02-27 [email protected] [pigeon] Allows kotlin generator to skip error class generation (flutter/packages#6183)
2024-02-27 [email protected] [camerax] Implements `setExposureMode` (flutter/packages#6110)
2024-02-27 [email protected] Roll Flutter from b77560e to c30f998 (12 revisions) (flutter/packages#6211)
2024-02-26 [email protected] Add `InkResponse`, `Material` and fix `Opacity` (flutter/packages#6199)
2024-02-26 [email protected] [url_launcher] Add explicit imports of UIKit (flutter/packages#6208)
2024-02-26 [email protected] [pigeon] Fix tool hangs on verbose sub-processes (flutter/packages#6198)
2024-02-26 [email protected] [tool] Ignore GeneratedPluginRegistrant.swift for `format` (flutter/packages#6195)
2024-02-26 [email protected] Roll Flutter from 1e8dd1e to b77560e (8 revisions) (flutter/packages#6207)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
LouiseHsu pushed a commit to LouiseHsu/packages that referenced this pull request Mar 7, 2024
…ter#6183)

Allows kotlin generator to skip error class generation by creating `includeErrorClass` argument.

This may be considered only a partial fix, as it requires another pigeon file with the class generated rather than creating a new file with the class.

This solution seems to me to solve the problem well enough as creating another file is a non-trivial task and there is already a working solution - renaming the error class per file.

fixes: flutter/flutter#142099
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
…ter#6183)

Allows kotlin generator to skip error class generation by creating `includeErrorClass` argument.

This may be considered only a partial fix, as it requires another pigeon file with the class generated rather than creating a new file with the class.

This solution seems to me to solve the problem well enough as creating another file is a non-trivial task and there is already a working solution - renaming the error class per file.

fixes: flutter/flutter#142099
auto-submit bot pushed a commit that referenced this pull request Oct 23, 2024
Since the Kotlin generator allows skipping error class generation, it makes sense for the Swift generator to have the same option.

Related to:
#6183 
flutter/flutter#142099
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: pigeon platform-android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pigeon] Allow sharing FlutterError declaration across multiple Kotlin output files
2 participants