Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1065 +/- ##
==========================================
- Coverage 99.50% 99.48% -0.03%
==========================================
Files 57 51 -6
Lines 2033 1934 -99
==========================================
- Hits 2023 1924 -99
Misses 10 10
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@jlandon thanks for this pr, that solves a lot of problems. |
There was a problem hiding this comment.
Pull request overview
This PR migrates mobx_codegen from the deprecated Element2 API to the new Element API to add support for analyzer 9.0.0. The migration updates the analyzer version constraint from < 9.0.0 to < 10.0.0 while maintaining backward compatibility with analyzer 7.4.0+.
Key Changes:
- Migrated all code from deprecated
Element2API to the newElementAPI - Updated analyzer version constraint to support versions 9.x
- Updated package version from 2.7.4 to 2.7.5
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mobx_codegen/pubspec.yaml | Updated analyzer version constraint to < 10.0.0 and bumped package version to 2.7.5 |
| mobx_codegen/lib/version.dart | Updated version constant to match pubspec.yaml |
| mobx_codegen/CHANGELOG.md | Added version 2.7.5 entry documenting the analyzer 9.0.0 support |
| mobx_codegen/lib/src/type_names.dart | Migrated from Element2 to Element API including property names (name3→name, children2→children, etc.) |
| mobx_codegen/lib/src/template/util.dart | Updated method signatures and property access from Element2 to Element API |
| mobx_codegen/lib/src/template/observable.dart | Updated ExecutableElement2 to ExecutableElement and name3 to name |
| mobx_codegen/lib/src/template/method_override.dart | Migrated method parameter types and property names to Element API |
| mobx_codegen/lib/src/store_class_visitor.dart | Comprehensive migration of all Element2 types, property names (name3→name, metadata2→metadata), and method calls (accept2→accept, visitChildren2→visitChildren) |
| mobx_codegen/lib/src/mobx_codegen_base.dart | Updated ClassElement2 to ClassElement and visitor method calls |
| mobx_codegen/test/util_test.dart | Updated mock classes from MethodElement2 to MethodElement |
| mobx_codegen/test/store_class_visitor_test.dart | Updated mock implementations to use Element API with nullable name property |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # mobx_codegen/CHANGELOG.md
ef89959 to
0804f4c
Compare
Drop support for analyzer versions prior to 9.0.0. Range-based constraints no longer viable due to breaking API changes between major versions.
|
@jlandon thanks |
|
@all-contributors please add @jlandon for code |
|
I've put up a pull request to add @jlandon! 🎉 |
Description
This PR adds support for analyzer 9.0.0 in
mobx_codegenby migrating from the deprecatedElement2API to the newElementAPI.Changes
Element2API toElementAPI^9.0.0mobx_codegenversion to2.7.5Pull Request Checklist
pubspec.yamlis updated.major/minor/patch/patch-count, depending on the complexity of changemelos run set_versioncommand from the root directory