Skip to content

Refactor error serialization #1259

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

Merged
merged 1 commit into from
May 13, 2020
Merged

Conversation

ehmicky
Copy link
Contributor

@ehmicky ehmicky commented May 12, 2020

When a build fails, we print in the build logs.
As part of "plugin statuses" (#1223), we will also surface error information in the UI.

This PR refactors the code to ensure both can share as much logic as possible:

  • the common logic to retrieve error information is put under parseError() at src/error/parse.js
  • the build logs-specific logic uses this, and adds few terminal-specific logic (such as adding sub-header lines)
  • an upcoming PR will use this shared logic as well, but tailored for "plugin statuses"

By having both share some common logic, we enforce a consistent experience and improve maintainability while still allowing build logs and plugin statuses to be shown in different ways.

This PR just moves lines of code around, it does not add logic.

@ehmicky ehmicky added the type: chore work needed to keep the product and development running smoothly label May 12, 2020
@ehmicky ehmicky requested a review from erezrokah May 12, 2020 19:20
@ehmicky ehmicky self-assigned this May 12, 2020
@ehmicky ehmicky merged commit 2c153c2 into master May 13, 2020
@ehmicky ehmicky deleted the chore/refactor-error-serialization branch May 13, 2020 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants