Skip to content

[pigeon] Fix enum parameters in Dart test #2749

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

Merged
merged 3 commits into from
Oct 31, 2022

Conversation

stuartmorgan-g
Copy link
Contributor

Fixes the handling of enum parameters in the Dart test class generation for testing host APIs.

Fixes flutter/flutter#105742

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.

Fixes the handling of enum parameters in the Dart test class generation
for testing host APIs.

Fixes flutter/flutter#105742
@stuartmorgan-g
Copy link
Contributor Author

This generated the same code that I wrote manually as a workaround in flutter/plugins#6635.

@tarrinneal
Copy link
Contributor

Seems to be failing the dart analyze tool. I'm not sure why, as you didn't change anything that would result in those failures.

@stuartmorgan-g stuartmorgan-g force-pushed the dart-test-class-enum-fix branch from 852d908 to dd419d8 Compare October 30, 2022 00:33
@stuartmorgan-g
Copy link
Contributor Author

That failure will be fixed by #2751 (see link there for an explanation of the issue).

Copy link
Contributor

@tarrinneal tarrinneal left a comment

Choose a reason for hiding this comment

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

lgtm

@tarrinneal tarrinneal added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2022
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2022
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 31, 2022

auto label is removed for flutter/packages, pr: 2749, due to - This commit is not mergeable and has conflicts. Please rebase your PR and fix all the conflicts.

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2022
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2022
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 31, 2022

auto label is removed for flutter/packages, pr: 2749, due to - The status or check suite repo_checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@stuartmorgan-g
Copy link
Contributor Author

stuartmorgan-g commented Oct 31, 2022

Ugh, the workaround we did isn't enough for Pigeon's unusual package structure (dart-lang/pub#3618 (comment)). I think we'll need to flip publishable back to stable again temporarily.

@stuartmorgan-g
Copy link
Contributor Author

I forgot that publishable was combined into a task with various other things that we ideally want to stay on master. Rather than split it back out, I inserted an ugly workaround into the Cirrus config to pre-fetch all of the sub-packages of pigeon. Hopefully we won't need the hack for long, since it doesn't scale well; if it's not fixed soon we'll probably have to split the task out and move it to stable instead.

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2022
@auto-submit auto-submit bot merged commit 4b37722 into flutter:main Oct 31, 2022
percula pushed a commit to percula/packages that referenced this pull request Nov 17, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pigeon] enums parameters do not work with the dartHostTestHandler
2 participants