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

Boilerplate error improvements #500

Merged
merged 11 commits into from
Oct 2, 2020
Merged

Boilerplate error improvements #500

merged 11 commits into from
Oct 2, 2020

Conversation

greglittlefield-wf
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf commented Jun 16, 2020

Motivation

Boilerplate-related error messages need some love:

  1. Using the wrong generated config wrong for a function component resulted in an error message that was confusing and unhelpful
    Screen Shot 2020-09-18 at 1 05 36 PM

  2. Error messages relating to missing boilerplate members weren't explicit about mismatched names being the likely culprit

    Screen Shot 2020-09-18 at 1 22 40 PM
  3. Many error messages on boilerplate members referenced the whole node as a span, which can be difficult to read in builder output (since the whole span is highlighted) and in the analyzer warnings (since the error can overlap other errors)
    (see image for Set up CI and coverage #2)

  4. Comments in generated code in place to help debug bad references to generated mixins were a bit vague

Changes

  1. Update factory error messages to mention generated factory config used by function components and also include examples

    Screen Shot 2020-09-18 at 12 51 35 PM
  2. When boilerplate members cannot be found, include information about checking that names match

    Screen Shot 2020-09-18 at 1 21 42 PM - Also update the runtime error specific to mismatched state with this information
  3. Update boilerplate error to use the name where possible instead of the whole node
    (see image for Set up CI and coverage #2)

  4. Clarify comments in generated code that bad references to generated mixins can be caused by bad imports as well as bad export

Release Notes

  • Improve error messages for boilerplate-related issues; this notably improves build/analyzer errors for function components

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 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

@aviary-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.

CHANGELOG.md Outdated
@@ -1,5 +1,11 @@
# OverReact Changelog
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO also add

  • improved messaging for runtime errors when state is missing
  • build time error/warning when state is missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI @joebingham-wk I plan to address these in this PR

@greglittlefield-wf greglittlefield-wf changed the title WIP - Error improvements Boilerplate error improvements Sep 18, 2020
@greglittlefield-wf greglittlefield-wf marked this pull request as ready for review September 18, 2020 21:00
Copy link
Contributor

@smaifullerton-wk smaifullerton-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 to the wording changes

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.

QA +1

@greglittlefield-wf
Copy link
Contributor Author

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

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

+1 from RM

@rmconsole4-wk rmconsole4-wk merged commit ac85e9d into master Oct 2, 2020
@rmconsole4-wk rmconsole4-wk deleted the error-improvements branch October 2, 2020 21:32
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.

6 participants