Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPLAT-9411 Add standalone PropsMixin / StateMixin migrator #77

Conversation

aaronlademann-wf
Copy link
Contributor

Motivation

We need a migrator that converts standalone @PropsMixin() / @StateMixin classes into mixins, and removes / deprecates the meta / props / state fields/getters in the class.

Changes

  1. Add logic for the migrator
  2. Write tests

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review: @joebingham-wk @sydneyjodon-wk @greglittlefield-wf

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Client Platform member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@aviary2-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

Copy link
Contributor

@joebingham-wk joebingham-wk left a comment

Choose a reason for hiding this comment

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

Just one comment, but otherwise looks good!

lib/src/util.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf left a comment

Choose a reason for hiding this comment

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

Partial pass, will look more in a bit

lib/src/boilerplate_suggestors/boilerplate_utilities.dart Outdated Show resolved Hide resolved
lib/src/boilerplate_suggestors/boilerplate_utilities.dart Outdated Show resolved Hide resolved
lib/src/boilerplate_suggestors/boilerplate_utilities.dart Outdated Show resolved Hide resolved
lib/src/boilerplate_suggestors/props_mixins_migrator.dart Outdated Show resolved Hide resolved
lib/src/util.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@joebingham-wk joebingham-wk left a comment

Choose a reason for hiding this comment

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

+1

…plate-codemod/CPLAT-9411

# Conflicts:
#	lib/src/boilerplate_suggestors/boilerplate_utilities.dart
Copy link
Contributor

@joebingham-wk joebingham-wk left a comment

Choose a reason for hiding this comment

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

+1 Refresh

Copy link
Contributor

@greglittlefield-wf greglittlefield-wf left a comment

Choose a reason for hiding this comment

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

Just a couple more small comments, mostly around guarding against AST edge-cases.

Super clean implementation, looks awesome!

lib/src/boilerplate_suggestors/boilerplate_utilities.dart Outdated Show resolved Hide resolved
lib/src/boilerplate_suggestors/boilerplate_utilities.dart Outdated Show resolved Hide resolved
lib/src/boilerplate_suggestors/boilerplate_utilities.dart Outdated Show resolved Hide resolved
lib/src/boilerplate_suggestors/props_mixins_migrator.dart Outdated Show resolved Hide resolved
lib/src/boilerplate_suggestors/props_mixins_migrator.dart Outdated Show resolved Hide resolved
lib/src/boilerplate_suggestors/boilerplate_utilities.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf left a comment

Choose a reason for hiding this comment

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

+10

@greglittlefield-wf greglittlefield-wf merged commit 9f53684 into CPLAT-9205-new-boilerplate-codemod Feb 6, 2020
@greglittlefield-wf greglittlefield-wf deleted the CPLAT-9205-new-boilerplate-codemod__CPLAT-9411 branch February 17, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants