Skip to content

[pigeon] Rename and validate the native interop migration skill - #13531

Open
reidbaker-agent wants to merge 6 commits into
flutter:mainfrom
reidbaker-agent:ds-pr-pigeon
Open

reidbaker-agent wants to merge 6 commits into
flutter:mainfrom
reidbaker-agent:ds-pr-pigeon

Conversation

@reidbaker-agent

@reidbaker-agent reidbaker-agent commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Update to skills_lint 0.5.3 and enable new configs for published skills.
Along the way we found that pigeon's published skill had no frontmatter and did not follow the package skill naming convention, so this fixes and renames it.

@reidbaker

Details

This PR makes the agent skill that pigeon publishes valid, and adds a test so it stays valid.

Changes:

  1. Renames skills/native-interop-migration to skills/pigeon-native-interop-migration. The published-skill-name rule requires a skill in a package's skills/ directory to start with the package name.
  2. Adds YAML frontmatter (name and description) to SKILL.md, and removes one trailing space.
  3. Adds skills_lint: ^0.5.3 as a dev dependency and a skills_lint.yaml that enables these rules for skills/:
    • pub-archive-includes-skill (new in 0.5.3): reports skill files that dart pub publish would leave out.
    • check-relative-paths with within-skill: true (new in 0.5.3): reports relative links that leave the skill directory.
    • published-skill-name (since 0.5.2) and check-absolute-paths (both existed before 0.5.3).
  4. Adds test/validate_skills_test.dart. It asserts that validateSkills returns true. It also asserts that config.parsingErrors is empty, because the 0.5.3 CHANGELOG notes that validateSkills returns true even when the configuration has parsing errors.
  5. Bumps the version to 29.1.1 (pubspec and generator_tools.dart) and adds a CHANGELOG entry.

This renames a published skill. skills/native-interop-migration has shipped since pigeon 29.0.0. After this PR, it ships as pigeon-native-interop-migration, which is the name package:skills expects for a skill from the pigeon package (enforced by published-skill-name). Anyone who refers to the old name has to update. The old SKILL.md had no frontmatter, so it may never have installed as a skill under the old name. If you would rather keep the old name, the alternative is to turn off published-skill-name for pigeon.

skills_lint 0.5.3 requires Dart 3.12 or later. pigeon still allows sdk: ^3.11.0, so a developer on Dart 3.11 cannot run pub get for pigeon's dev dependencies. CI is not affected: stable CI uses a newer Flutter, and the legacy analyze job removes dev dependencies first.

No issue tracks this change. The template asks for at least one issue, and I have none to link.

This change was prepared with help from an AI agent. I reviewed it.

Verification, run locally against skills_lint 0.5.3 from pub.dev:

  • dart run script/tool/bin/flutter_plugin_tools.dart analyze --packages pigeon: no issues.
  • dart run script/tool/bin/flutter_plugin_tools.dart format --packages pigeon --no-java --no-kotlin --no-swift --no-clang-format: no changes.
  • dart run script/tool/bin/flutter_plugin_tools.dart validate --packages pigeon --check-for-missing-changes --base-sha=origin/main: no issues.
  • dart run script/tool/bin/flutter_plugin_tools.dart license-check: all files pass.
  • dart run script/tool/bin/flutter_plugin_tools.dart publish-check --packages pigeon: dart pub publish --dry-run reports 0 warnings from a clean tree.
  • dart run skills_lint in packages/pigeon: the skill is valid.
  • dart test in packages/pigeon: all 600 tests pass. With a mismatched name in SKILL.md, test/validate_skills_test.dart fails.

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

- Fail the skills test when validateSkills returns false.
- Sort skills_lint among dev_dependencies and type the local.
- Remove trailing blank line from pubspec.yaml.
- Reword the CHANGELOG entry to describe the user-facing rename.

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

Copy link
Copy Markdown
Contributor

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 pigeon to version 29.1.1, renames the native-interop-migration skill to pigeon-native-interop-migration with YAML frontmatter, and adds skills_lint configuration along with a validation test. Feedback highlights a compatibility issue where adding skills_lint as a dev dependency and using it in tests breaks support for Dart SDK ^3.11.0, as skills_lint requires SDK >=3.12.0.

# JNIgen's renamer, then update the version linked in its doc comment.
jnigen: 1.0.1
objective_c: ^9.6.2
skills_lint: ^0.5.3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Adding skills_lint: ^0.5.3 as a dev dependency will break pub get for any developer using Dart 3.11, because skills_lint 0.5.3 requires Dart SDK >=3.12.0 while pigeon's SDK constraint is ^3.11.0. Since this is a patch release (29.1.1), bumping the SDK constraint to ^3.12.0 might not be desirable.\n\nTo resolve this, consider one of the following approaches:\n1. Remove skills_lint from dev_dependencies and remove test/validate_skills_test.dart. Instead, run skills_lint as a global tool or a separate step in the CI workflow (e.g., dart pub global run skills_lint).\n2. If a minor/major version bump is acceptable, bump the SDK constraint of pigeon to ^3.12.0 and release this as 29.2.0 or 30.0.0.

Comment on lines +9 to +16
test('validate skills', () async {
final Configuration config = await ConfigParser.loadConfig();
// validateSkills returns true even if the config has parsing errors, so
// check those separately.
expect(config.parsingErrors, isEmpty);
final bool isValid = await validateSkills(config: config);
expect(isValid, isTrue, reason: 'Skills validation failed. See above for details.');
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

This test file imports package:skills_lint/skills_lint.dart, which requires Dart SDK >=3.12.0. Since pigeon supports Dart SDK ^3.11.0, this test will fail to compile/run for developers on Dart 3.11.\n\nIf you want to keep supporting Dart 3.11 without breaking pub get or test execution, consider removing this test file and validating the skills via a CI-based linter step instead (e.g., using dart pub global run skills_lint).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tarrinneal I dont like adding one off ci steps in this repo.
Let me know what you want to happen here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you rebase, this should be resolved now.

One heads-up when rebasing SKILL.md: 30.0.0 added a relative link at the end of §6.11 (Step 5 of the Native Interop Guide) that leaves the skill directory and will fail check-relative-paths (within-skill: true). Switching that link to main/packages/pigeon/native_interop_guide.md#step-5-plugin-registration-deregistration-and-multi-engine-support during the rebase will keep validate_skills_test green.

@reidbaker reidbaker added the CICD Run CI/CD label Nov 2, 2026
@reidbaker
reidbaker self-requested a review November 2, 2026 15:48
Comment on lines +9 to +16
test('validate skills', () async {
final Configuration config = await ConfigParser.loadConfig();
// validateSkills returns true even if the config has parsing errors, so
// check those separately.
expect(config.parsingErrors, isEmpty);
final bool isValid = await validateSkills(config: config);
expect(isValid, isTrue, reason: 'Skills validation failed. See above for details.');
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tarrinneal I dont like adding one off ci steps in this repo.
Let me know what you want to happen here.

Comment on lines +1 to +5
---
name: pigeon-native-interop-migration
description: Migrates a Flutter plugin from channel-based Pigeon code to direct Native Interop (useFfi for Swift, useJni for Kotlin)
---

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tarrinneal was this intended to be a skill that users could use? If not why have it in the skills directory. If so did anyone try using the skill?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

as mentioned offline, yes it is meant to be user facing.

@reidbaker
reidbaker requested a review from tarrinneal November 2, 2026 15:51
import 'package:test/test.dart';

void main() {
test('validate skills', () async {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tarrinneal longer term I think this repo should have one top level skills_lint.yaml but for now per package is easier to understand and can be adopted as skills get adopted across the repo.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If I open the pigeon directory directly in an editor and try to access a skill at the repo level, will that work properly?

void main() {
test('validate skills', () async {
final Configuration config = await ConfigParser.loadConfig();
// validateSkills returns true even if the config has parsing errors, so

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lets add the bug tracking this change in behavior. 0.6.0 plans to make this errorl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 28df556: the comment now links google/skills_lint.dart#152, which tracks making validateSkills fail on config errors in 0.6.0.

Comment thread packages/pigeon/skills_lint.yaml Outdated
severity: error
within-skill: true
check-absolute-paths: error
disallowed-field: error

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lets sort the single line rules above the multi line rules+

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

and remove disallowed_field

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 28df556: the single-line rules come first, then the check-relative-paths block.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed disallowed-field in 28df556.

Comment thread packages/pigeon/skills_lint.yaml Outdated
within-skill: true
check-absolute-paths: error
disallowed-field: error
check-trailing-whitespace: error

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed check-trailing-whitespace in 28df556.

@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Nov 3, 2026
@reidbaker reidbaker added the CICD Run CI/CD label Nov 3, 2026
reidbaker
reidbaker previously approved these changes Nov 3, 2026

@reidbaker reidbaker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tarrinneal you need to make the call on dart version 12 and if that is ok to bump or if we need to do something else.

@tarrinneal

Copy link
Copy Markdown
Contributor

Sorry for the delay on looking at this. It's been a busy couple weeks :)

tarrinneal
tarrinneal previously approved these changes Nov 12, 2026

@tarrinneal tarrinneal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved after a rebase

@tarrinneal tarrinneal Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we put this at the repo level?

@tarrinneal
tarrinneal dismissed stale reviews from reidbaker and themself via 7208f15 November 20, 2026 03:31
@flutter-dashboard flutter-dashboard Bot removed the CICD Run CI/CD label Nov 20, 2026
@github-actions
github-actions Bot marked this pull request as draft November 20, 2026 03:31
@github-actions github-actions Bot added the waiting for response The Flutter team cannot make further progress on this PR until the author responds label Nov 20, 2026
@github-actions

Copy link
Copy Markdown

Hi @reidbaker-agent, thank you for your contribution!

This pull request has been converted to a draft because it does not appear to follow our pull request template:

  • Unchecked checklist items (2 of 11): All items in the Pre-Review Checklist must be completed and checked off (- [x]) before the PR can be reviewed:
    • - [ ] I [linked to at least one issue that this PR fixes] in the description above.
    • - [ ] I updated/added any relevant documentation (doc comments with `///`).

How to fix this

  1. Click the ... menu in the top-right corner of your PR description above and select Edit.
  2. Address the issues listed above. Make sure every item in the Pre-Review Checklist is present without modifications and checked off (- [x]).
  3. Save your changes, then click the "Ready for review" button at the bottom of the PR.
Click here for the raw Markdown of the Pre-Review Checklist to copy and paste
## Pre-Review Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [ ] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
- [ ] I read the [Tree Hygiene] page, which explains my responsibilities.
- [ ] I read and followed the [relevant style guides] and ran [the auto-formatter].
- [ ] 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 [linked to at least one issue that this PR fixes] in the description above.
- [ ] I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1].
- [ ] I updated/added any relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
- [ ] All existing and new tests are passing.

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](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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.

[^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.

<!-- Links -->
[Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[AI contribution guidelines]: https://github.com/flutter/flutter/blob/master/CONTRIBUTING.ai.md#pull-requests
[Tree Hygiene]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[the auto-formatter]: https://github.com/flutter/packages/blob/main/script/tool/README.md#format-code
[CLA]: https://cla.developers.google.com/
[Discord]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[the version and CHANGELOG instructions]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version-and-changelog-updates
[semantic versioning]: https://dart.dev/tools/pub/versioning#semantic-versions
[repository CHANGELOG style]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[test exemption]: https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests

@tarrinneal tarrinneal added the CICD Run CI/CD label Nov 20, 2026
@tarrinneal
tarrinneal marked this pull request as ready for review November 20, 2026 03:32
@tarrinneal tarrinneal added autosubmit Merge PR when tree becomes green via auto submit App and removed waiting for response The Flutter team cannot make further progress on this PR until the author responds labels Nov 20, 2026

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

Copy link
Copy Markdown
Contributor

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 version 30.0.5. The changes rename the 'native-interop-migration' skill to 'pigeon-native-interop-migration', add YAML frontmatter, and update a documentation link in SKILL.md. Additionally, the 'skills_lint' package is added as a development dependency, a configuration file 'skills_lint.yaml' is introduced, and a new test file 'validate_skills_test.dart' is implemented to validate the skills configuration. There are no review comments, and I have no feedback to provide.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 20, 2026
@auto-submit

auto-submit Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/packages/13531, because This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a member of flutter-hackers before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@tarrinneal
tarrinneal requested a review from reidbaker November 20, 2026 03:34
@tarrinneal

Copy link
Copy Markdown
Contributor

@reidbaker This will need approval again after I merged main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants