Skip to content

[pigeon] Require analyzer 5.13.0, prepare for NamedType refactoring. #4127

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 6 commits into from
Jun 7, 2023

Conversation

scheglov
Copy link
Contributor

@scheglov scheglov commented Jun 1, 2023

We would like to make a breaking change to the Dart analyzer.
https://dart-review.googlesource.com/c/sdk/+/303280

flutter/flutter#128212

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

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.

@scheglov scheglov requested a review from tarrinneal as a code owner June 1, 2023 18:17
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@stuartmorgan-g
Copy link
Contributor

legacy_version_analyze is almost certainly going to time out again; for some reason pub resolver failures show up as hangs with no output in CI, so a hang in that step means the resolution failed. Since it's only 3.3 that fails resolving, this update must not be 3.3 compatible, so the package's minimum supported just needs to be updated to 3.7.

@stuartmorgan-g
Copy link
Contributor

Or rather, the Dart SDK needs to be updated to 2.19. (And indeed, current versions of analyzer require 2.19.)

@scheglov scheglov force-pushed the pigeon-analyzer-5.13 branch from 99ca398 to 12aa5a4 Compare June 5, 2023 17:49
@@ -1546,3 +1534,13 @@ ${_argParser.usage}''';
}
}
}

extension on dart_ast.NamedType {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this temporary or permanent?

if it's temporary, please add a TODO explaining the timeline for when it will be removed

if it's permanent, please use a function instead of an extension. The use of Dart extension features violates our style guide due to its harm on readability (someone reading the code will look for "qualifiedName" on the dart_ast.NamedType API and not find it; there's nothing to point them to this part of the code).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was not supposed to be temporary. So, I changed it to a private static method.
Let me know if you want it to be exactly a function instead of a static method.

@Hixie
Copy link
Contributor

Hixie commented Jun 5, 2023

test-exempt: code refactor with no semantic change

@tarrinneal
Copy link
Contributor

It appears that the code will need to be formatted dart pub global run flutter_plugin_tools format --packages pigeon.

You will also need to update the version number in the pubspec.yaml file, as well as the generator_tools.dart file, and add to the changelog.

@scheglov scheglov force-pushed the pigeon-analyzer-5.13 branch from df0f0d8 to 6924b9c Compare June 6, 2023 19:04
@tarrinneal tarrinneal added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 7, 2023
@auto-submit auto-submit bot merged commit d83ab7f into flutter:main Jun 7, 2023
@scheglov scheglov deleted the pigeon-analyzer-5.13 branch June 7, 2023 18:50
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 8, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 8, 2023
flutter/packages@a84b2c2...e13b8c4

2023-06-08 [email protected] [tool] Only run unit tests in Chrome for inline web (flutter/packages#4153)
2023-06-08 [email protected] [in_app_purchase] Make the _FeatureCard constructor const in the Android example app (flutter/packages#4162)
2023-06-08 [email protected] [shared_preferences] Fix initialization race (flutter/packages#4159)
2023-06-07 [email protected] [go_router] Refactors imperative APIs and browser history (flutter/packages#4134)
2023-06-07 [email protected] [various] Add `http` 1.0 compatibility (flutter/packages#4147)
2023-06-07 [email protected] [go_router_builder] Accept required parameters not in path (flutter/packages#4039)
2023-06-07 [email protected] Roll Flutter from 0b74153 to 8a5c22e (46 revisions) (flutter/packages#4160)
2023-06-07 [email protected] [pigeon] Require analyzer 5.13.0, prepare for NamedType refactoring. (flutter/packages#4127)
2023-06-07 [email protected] Roll Flutter (stable) from f92f441 to 682aa38 (1 revision) (flutter/packages#4157)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 needs tests p: pigeon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants