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

FED-1720 Conditionally null-safe builder output (tests) #868

Merged
merged 20 commits into from
Dec 18, 2023

Conversation

sydneyjodon-wk
Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk commented Dec 6, 2023

Motivation

Right now in the null safety branch, we have some logic in place around conditionally generating null-safe code, in order to support consumers migrating to null safety.

We currently support language version comments in files, but we don't have a mechanism for detecting package-level language versions.

Changes

  • Merge in implementation of package-config-based implementation present in spike branch: null-safety...null-safety-conditional-builder
  • Add tests and test cases for
    • different package-level versions
      • Can use test packages in in test branch and pub run build_runner build to inspect output of generated code, looking for comment that says how nullability was calculated
    • different library-level language versions
      • Different boilerplate versions
        • Note: this is likely going to be have a LOT of test cases, to ensure all versions of boilerplate work in both null safe and non-null-safe code.

Release Notes

Review

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

Please review:

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 Frontend Frameworks Design 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

@sydneyjodon-wk sydneyjodon-wk changed the base branch from master to v5_wip December 6, 2023 23:27
@aviary3-wk
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

@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 one comment, otherwise copied over tests look good!

@sydneyjodon-wk sydneyjodon-wk marked this pull request as ready for review December 12, 2023 22:29
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 one small comment about an additional test coverage, otherwise this looks perfect, and I'll be ready to QA after that's addressed

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.

  • Changes look good
    • All tests under non_null_safe_builder_integration_tests look good, verified via:
      git diff \
          origin/master:test/over_react/component_declaration/builder_integration_tests \
          origin/FED-1720-conditionally-null-safe-builder:test/over_react/component_declaration/non_null_safe_builder_integration_tests
  • Newly-added tests run and pass in CI

+10

Copy link
Contributor Author

@sydneyjodon-wk sydneyjodon-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 in spirit

Copy link
Contributor

@kealjones-wk kealjones-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

@greglittlefield-wf greglittlefield-wf merged commit daa47e1 into v5_wip Dec 18, 2023
10 checks passed
@sydneyjodon-wk sydneyjodon-wk deleted the FED-1720-conditionally-null-safe-builder branch December 18, 2023 18:12
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