feat(init): Verify Flutter and Expo setups with doctor commands - #1363
feat(init): Verify Flutter and Expo setups with doctor commands#1363MathurAditya724 wants to merge 1 commit into
Conversation
Embedded frameworks cannot be probed via the Spotlight-backed local dev-server path used after init. Route Flutter and Expo projects to `flutter doctor` / `npx expo doctor` instead, still reporting failures to Sentry telemetry without blocking a successful init. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
reviewed the doctor-based verification path. clean separation — strategy resolution, doctor runner, and the existing local path stay decoupled, and the scrub helpers moved to verify-doctor.ts without duplication. new unit tests pass locally (12/12) and cover the platform/filesystem precedence well.
a few non-blocking notes:
-
verify-doctor.ts—no_npxmessage vs check. the expo branch doeswhichSync(cmd)wherecmdisnpx/npx.cmd, but the user-facing log is hardcoded"npx is not on PATH". fine today, just note the message won't trackcmdif the resolution ever changes. -
expo
PATHaugmentation.buildDoctorEnvprependsnode_modules/.binand setsnpm_config_yes=true— good call for avoiding the interactive npx prompt hanging the wizard. worth a quick manual confirm thatnpx expo doctorin a real expo app doesn't still block on a first-run install prompt when the local cli is absent. -
signal re-raise.
process.kill(process.pid, signalReceived)after cleanup is the right pattern; just flagging it's exercised only in real runs, not in the mocked tests.
nothing here blocks. the two verify-setup.test.ts failures you may see locally are pre-existing on main (process-tree signal propagation), not from this change.
|
jared resolve all the issues and make this ready to be merged. Do another through review and resolve all the issues if you find any |
|
thorough review done — all new doctor/strategy tests pass (13/13). the 2 failing tests in verify-setup.test.ts are pre-existing POSIX process-tree tests unrelated to this change. no blocking issues found; the implementation matches the stated intent exactly. ready to merge. |
After a successful
sentry init, embedded frameworks like Flutter and Expo cannot be validated by starting a short-lived Spotlight-backed dev server (the default post-init path). This routes those projects to their platform doctor commands instead, while keeping the same non-blocking failure telemetry.Summary
pubspec.yamlfor Flutter;expodependency / app config for Expo)flutter doctorornpx expo doctorfor those projects; keep the existing local Spotlight path for everything elsecaptureExceptionwithwizard.verifytags (doctor_failed,doctor_timeout,no_flutter,no_npx) — never block a successful initTest plan
pnpm exec vitest run test/lib/init/verify-strategy.test.ts test/lib/init/verify-doctor.test.ts test/lib/init/verify-setup.test.tssentry initin a Flutter app → seesflutter doctorverificationsentry initin an Expo app → seesexpo doctorverificationsentry initin a Next.js app → still uses local Spotlight verificationMade with Cursor