-
Notifications
You must be signed in to change notification settings - Fork 176
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
fix: cross-platform prebuild downloads #1153
fix: cross-platform prebuild downloads #1153
Conversation
…tead of hardcoded `process.platform`. Throws an error when attempting to cross-compile (`buildFromSource` || no prebuilds found)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1153 +/- ##
==========================================
+ Coverage 76.93% 84.05% +7.11%
==========================================
Files 21 21
Lines 763 765 +2
Branches 142 144 +2
==========================================
+ Hits 587 643 +56
+ Misses 122 121 -1
+ Partials 54 1 -53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Co-authored-by: Erick Zhao <[email protected]>
Writing a few tests for the code coverage requirement. Stay tuned. |
…/error. Added `platform` to `CacheOptions` cache key generation
Good thing I added tests. I had missed adding I could use a tad bit of help though. (I'll continue investigating as well) I'm running into this test failure for the "early exit" when attempting cross-compilation via node-gyp.
Oddly enough, if I rebuild/src/module-type/node-gyp/node-gyp.ts Lines 86 to 89 in fff2255
rebuild/test/module-type-node-gyp.ts Lines 69 to 74 in fff2255
Example with logging:
Logs in console show error logic is hit. Looks like something is swallowing the error?
Also, quick note, I changed |
…rwise it kicks off full rebuild of modules and that timesout after 2000ms
Investigation update. It's throwing the error as written, but the event isn't propagating to mocha specifically. It properly logs the error being thrown if I add a All tests are passing 🙃 rebuild/test/module-type-node-gyp.ts Lines 75 to 82 in 0fbaba0
|
@mmaietta E.g. |
Thanks @MarshallOfSound! I had overlooked the |
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 for the added tests!
😞 Looks like this needed to be rebased off latest |
🎉 This PR is included in version 3.6.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Allow prebuilt binaries to be downloaded for target platform instead of hardcoded
process.platform
. Throws an error when attempting to cross-compile (buildFromSource
|| no prebuilds found)Example:
rebuild/src/module-type/node-pre-gyp.ts
Line 31 in cb372cd
Origin of issue:
rebuild/src/rebuild.ts
Line 135 in cb372cd
Updated interface with new
platform
option and added docs