flutter / flutter/flutter-intellij
☂️ [CQ] Manage our dependence on reflection in the plugins
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
Use of reflection to access hidden APIs is prone to runtime failures (see e.g., the recent #8795) and circumvents our verification baselining.
The regression reported in #8795 could have been avoided.
1. If we hadn't used reflection, we'd have seen a static compilation failure.
2. If we *had* used reflection but had it under-test, we would have detected when the API broke.
To protect against future issues, I propose a few next steps.
1. Review all the places we're using reflection and remove them where possible and add tests where not.
2. Explore a verification mechanism whereby new uses of reflection are detected (akin to our baseline verifier).
(This is an umbrella issue for the Flutter AND Dart plugins.)
Contributor guide
Assessment
This issue has not been assessed yet.