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

feat: yarn 3 support for native modules #8112

Merged
merged 14 commits into from
Mar 9, 2024
Merged

Conversation

mmaietta
Copy link
Collaborator

@mmaietta mmaietta commented Mar 9, 2024

Feat: implementing electron/rebuild with config option nativeRebuilder default: legacy to preserve current functionality.

Yarn 3 removed the implicit link between install and rebuild steps, now requiring rebuild to be called directly. electron-builder's native rebuilding utilizes app-builder Go binary, which is not actively maintained and does not support yarn 3.

Setting nativeRebuilder: 'sequential' // or 'parallel' will utilize electron/rebuild during both the dependency installation phase (to make sure native modules are built the first time since install simply doesn't trigger it) and used again for any subsequent builds (such as mac universal builds). sequential and parallel values determine the RebuildMode for electron/rebuild

This inadvertently also enables reactivating a native module test that couldn't run with app-builder due to the native dependency node-mac-permissions not having an actual install step, electron/rebuild bypasses that and allows the binaries to be compiled and lipo'd into a universal build.

Fixes: #8024

Copy link

changeset-bot bot commented Mar 9, 2024

🦋 Changeset detected

Latest commit: 8db8e5d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Major
dmg-builder Major
electron-builder-squirrel-windows Major
electron-builder Major
electron-forge-maker-appimage Major
electron-forge-maker-nsis-web Major
electron-forge-maker-nsis Major
electron-forge-maker-snap Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Mar 9, 2024

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit 8db8e5d
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/65ecba5b92c1cf0008d8a8a4
😎 Deploy Preview https://deploy-preview-8112--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mmaietta mmaietta merged commit 9edfee6 into master Mar 9, 2024
15 checks passed
@mmaietta mmaietta deleted the electron-rebuild-migration branch March 9, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Yarn 3 module rebuild failing
1 participant