Skip to content

Make sure that extensions are bundled with the package they claim to be. - #9981

Merged
johnpryan merged 15 commits into
flutter:masterfrom
johnpryan:package-centric-extensions
Sep 16, 2026
Merged

johnpryan merged 15 commits into
flutter:masterfrom
johnpryan:package-centric-extensions

Conversation

@johnpryan

Copy link
Copy Markdown
Contributor

With this change, extensions are enabled if and only if the package name on disk matches the package name in extension/devtools/config.yaml.

This supersedes #9965

With this change, extensions are enabled if and only if the package name
on disk matches the package name in extension/devtools/config.yaml.
@johnpryan
johnpryan requested review from a team, bkonyi and kenzieschmoll as code owners August 26, 2026 21:40
@johnpryan
johnpryan requested review from srawlins and removed request for a team August 26, 2026 21:40

@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 improves DevTools extension isolation by tracking the providing package name for enablement, deduplication, and asset loading, and adds validation checks for extension names. The review feedback highlights a compilation error in _extensions_api.dart due to invalid map literal syntax, a potential runtime TypeError in _validate.dart when casting the configuration name, and a suggestion to normalize packageRoot in extension_manager.dart for more robust path comparisons.

Comment thread packages/devtools_app/lib/src/shared/server/_extensions_api.dart Outdated
Comment thread packages/devtools_extensions/bin/_validate.dart Outdated
Comment thread packages/devtools_shared/lib/src/extensions/extension_manager.dart Outdated
Comment thread packages/devtools_app/lib/src/extensions/extension_service_helpers.dart Outdated
Comment thread packages/devtools_shared/lib/src/extensions/extension_model.dart Outdated
Comment thread packages/devtools_shared/CHANGELOG.md
Comment thread packages/devtools_extensions/bin/_validate.dart
Comment thread packages/devtools_shared/lib/src/extensions/extension_model.dart Outdated
Comment thread packages/devtools_shared/lib/src/extensions/extension_model.dart
@johnpryan

Copy link
Copy Markdown
Contributor Author

@kenzieschmoll this is ready for another look

Comment thread packages/devtools_app/lib/src/shared/server/_extensions_api.dart Outdated
Comment thread packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md Outdated
Comment thread packages/devtools_extensions/CHANGELOG.md
Comment thread packages/devtools_shared/lib/src/extensions/extension_enablement.dart Outdated
Comment thread packages/devtools_shared/lib/src/extensions/extension_enablement.dart Outdated
Comment thread packages/devtools_shared/lib/src/extensions/extension_model.dart Outdated
Comment thread packages/devtools_shared/test/extensions/extension_model_test.dart Outdated
Comment thread packages/devtools_shared/test/helpers/extension_test_manager.dart Outdated
Make extensionPackage a required non-nullable parameter in extensionEnabledState
Make packageName non-nullable parameter in TestPackageWithExtension
@johnpryan

Copy link
Copy Markdown
Contributor Author

@kenzieschmoll this should be ready for another review

@kenzieschmoll

Copy link
Copy Markdown
Member

Please address all unresolved comments before merging.

@johnpryan
johnpryan merged commit fcf987c into flutter:master Sep 16, 2026
51 checks passed
@johnpryan
johnpryan deleted the package-centric-extensions branch September 16, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants