-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(native-loader): safely handle report.getReport() on Termux/Android #6123
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
Conversation
On Termux/Android, `report.getReport()` crashes because CPU information is not available in the environment, causing the native Rollup loader to throw `Failed to get cpu info`. This change wraps calls to `report.getReport()` in try/catch: - `isMusl()` now returns `false` if report information is unavailable, allowing Rollup to continue loading native bindings. - Windows MINGW detection (`isMingw32()`) is also safely wrapped. These changes are non-breaking and maintain existing behavior on supported platforms. They ensure Rollup can run on Termux/Android without crashing while preserving all existing bindings and error handling. No other logic is modified; this strictly improves environment robustness.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lukastaegert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just minor comments, but this sounds like a good improvement.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6123 +/- ##
==========================================
- Coverage 98.73% 98.72% -0.02%
==========================================
Files 271 271
Lines 10630 10637 +7
Branches 2846 2846
==========================================
+ Hits 10496 10501 +5
- Misses 89 91 +2
Partials 45 45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This PR has been released as part of [email protected]. You can test it via |
On Termux/Android,
report.getReport()crashes because CPU information is not available in the environment, causing the native Rollup loader to throwFailed to get cpu info.This change wraps calls to
report.getReport()in try/catch:isMusl()now returnsfalseif report information is unavailable, allowing Rollup to continue loading native bindings.isMingw32()) is also safely wrapped.These changes are non-breaking and maintain existing behavior on supported platforms. They ensure Rollup can run on Termux/Android without crashing while preserving all existing bindings and error handling.
No other logic is modified; this strictly improves environment robustness.
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description