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

Improve Dev error details on extension validation #4853

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

isaacroldan
Copy link
Contributor

WHY are these changes introduced?

Fixes #0000

WHAT is this pull request doing?

How to test your changes?

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor

github-actions bot commented Nov 14, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
74.28% (-0.07% 🔻)
8517/11466
🟡 Branches
70% (-0.14% 🔻)
4155/5936
🟡 Functions
73.82% (-0.05% 🔻)
2239/3033
🟡 Lines
74.8% (-0.08% 🔻)
8055/10769
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / dev-session.ts
3.54% (-0.72% 🔻)
0%
3.85% (-0.7% 🔻)
3.88% (-0.82% 🔻)
🟢
... / ConcurrentOutput.tsx
98.36% (-1.64% 🔻)
88% (-4% 🔻)
100%
98.33% (-1.67% 🔻)

Test suite run success

1942 tests passing in 884 suites.

Report generated by 🧪jest coverage report action from b1e6082

Comment on lines +267 to +271
errors.forEach(async (error) => {
const on = error.on as {user_identifier: string}
const extension = options.app.allExtensions.find((ext) => ext.uid === on.user_identifier)
await printError(error.message, stdout, extension?.handle ?? 'dev-session')
})
Copy link

Choose a reason for hiding this comment

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

forEach with async operations won't wait for all promises to resolve. Use Promise.all(errors.map()) to ensure all errors are processed before the function returns. This avoids potential race conditions and ensures proper error handling.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant