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

fix: cross-platform build #1072

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cocktailpeanut
Copy link

The rebuilder has been using the hard-coded process.platform value as the platform attribute all this time.

This means, no matter what platform option you pass in, it would just use the current OS platform.

Basically, cross platform prebuild has not been working at all.

Combined with the electron-builder fix here cocktailpeanut/electron-builder@73f751b - now you can do cross platform electron builds that include prebuilt binaries.

The rebuilder has been using the hard-coded `process.platform` value as the platform attribute all this time.

This means, no matter what platform option you pass in, it would just use the current OS platform.

Basically, cross platform prebuild has not been working at all.

Combined with the electron-builder fix here cocktailpeanut/electron-builder@73f751b - now you can do cross platform electron builds that include prebuilt binaries.
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2023

Codecov Report

Merging #1072 (ed1ca18) into main (29365ad) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1072   +/-   ##
=======================================
  Coverage   76.44%   76.44%           
=======================================
  Files          19       19           
  Lines         692      692           
  Branches      134      135    +1     
=======================================
  Hits          529      529           
  Misses        118      118           
  Partials       45       45           
Impacted Files Coverage Δ
src/rebuild.ts 72.52% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@MarshallOfSound MarshallOfSound left a comment

Choose a reason for hiding this comment

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

I think this is valid for prebuild modules but is invalid for modules powered via node-gyp. There should probably be checks in place to ensure that non-system-platform builds aren't even attempted for node-gyp builds

@erickzhao erickzhao self-assigned this Nov 7, 2023
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.

None yet

4 participants