Remove dependencies on 'meta'#4647
Conversation
|
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. 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. |
|
We actually do have a test for this in the flutter/flutter repo, FWIW. It just reads every Dart file and checks for the banned imports. test-exempt: code refactor with no semantic change |
I had considered this, but presumably there could be cases where we'd want to use something from |
|
We could also just require that anything we want to use has to be re-exported from foundation. But I don't feel strongly about this either way. |
|
I wish this could be done with: meta:
sdk: flutterThat way we don't have to remember the random place from which the framework reexports the meta pkg :/ |
bparrishMines
left a comment
There was a problem hiding this comment.
LGTM once pubspecs and CHANGELOGs are updated
It's not really that random, it's the foundation package of the core framework. :-) |
Flutter re-exports everything from meta that we actually use, and all plugins by definition require Flutter, so there's no need to use `meta` instead of Flutter to access common annotations (e.g., immutable, visibleForTesting). This removes all use of `meta`, as well as dependencies on the package, from all plugins. Fixes flutter/flutter#95658
Flutter re-exports everything from meta that we actually use, and all plugins by definition require Flutter, so there's no need to use
metainstead of Flutter to access common annotations (e.g., immutable, visibleForTesting).This removes all use of
meta, as well as dependencies on the package, from all plugins.Fixes flutter/flutter#95658
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).