Skip to content

Conversation

@dgyurov
Copy link
Contributor

@dgyurov dgyurov commented Nov 3, 2025

Adds compatibility with version 8 of the analyzer package. I did not update to version 9 of the analyzer directly, because I think it's sensible to adopt 8 and have a release of pigeon that conforms to 8 first. This will give the chance to consuming projects to upgrade analyzer versions at their own pace. As as follow up PR, I can also work on updating to version 9 for a future release.

Fixes flutter/flutter#175432

Pre-Review Checklist

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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@dgyurov dgyurov requested a review from tarrinneal as a code owner November 3, 2025 16:06
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the pigeon package to add compatibility with version 8 of the analyzer package. The changes include updating the package version to 26.0.3 in pubspec.yaml and lib/src/generator_tools.dart, updating the analyzer dependency constraint, and adding a corresponding entry to the CHANGELOG.md. The changes are consistent and correctly implemented.

Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@stuartmorgan-g
Copy link
Collaborator

This will give the chance to consuming projects to upgrade analyzer versions at their own pace.

This is always true of expanding a range, as the PR currently does. Does this mean compatibility with 9.x requires changes that break compatibility with 6-8?

@dgyurov
Copy link
Contributor Author

dgyurov commented Nov 4, 2025

This will give the chance to consuming projects to upgrade analyzer versions at their own pace.

This is always true of expanding a range, as the PR currently does. Does this mean compatibility with 9.x requires changes that break compatibility with 6-8?

I think the update to 9.x will be fairly straightforward as well. There is however one hurdle:

analyzer 8.0.0 -> introduces NamedType.name and deprecates NamedType.name2
analyzer 9.0.0 -> removes NamedType.name2

It seems that NamedType.name2 is used at couple of places in pigeon_lib_internal.dart. I believe that adopting 9.x, will require to move the minimum version to 8.0.0. It's a little bit unfortunate. The analyzer package is a very special dependency, because it's tightly coupled with Dart.

@dgyurov dgyurov force-pushed the dimi/upgrade-analyzer branch from d547723 to ae6c549 Compare November 4, 2025 21:31
@stuartmorgan-g
Copy link
Collaborator

Ah, I missed that there was one of those rename cycles in 8+9. We did indeed need to drop old versions last time, so it definitely makes sense to do that separately.

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.

Thanks for doing this!

@tarrinneal tarrinneal added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 5, 2025
@auto-submit auto-submit bot merged commit b87777c into flutter:main Nov 5, 2025
80 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2025
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] Support analyzer 8.x

3 participants