Rebuild native dependencies#488
Merged
Merged
Conversation
5144c67 to
2d83b4f
Compare
Member
|
Rebased now that #485 has been merged. |
Member
Contributor
Author
|
@sirreal can you please open the dev tools and share your console logs? |
Member
I've redacted a few bits of my system paths as |
Contributor
Author
|
@sirreal thanks, can you please provide the logs from the apps dev tools console (render process) as well? To open up dev tools press Cmd+Alt+i |
sirreal
approved these changes
Aug 13, 2018
Member
sirreal
left a comment
There was a problem hiding this comment.
This seems to work nicely. Uncovered issue #493 while testing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
If you ever had to deal with native dependencies, you might know (and hate) this error messsage quite well.
It is a common problem with electron to have ABI mismatch issues when using native dependencies. It however can be solved easily with
electron-builder install-app-depsorelectron-rebuildThis PR adds
electron-rebuildvia a make targetmake rebuild-depsto do a fast re-build/install of the native dependencies. It is made available viamake rebuild-deps.make rebuild-depsis added as apostinstallscript and as a dependency ofmake startto ensure that you always have the native dependencies built against the nodejs version of electron.Motivation and Context
How to test
make distcleannpm install✔ Rebuild Completein console and be able to run the app without the error message from above.Why not using
electron-builder install-app-depsinstead?Running
npx electron-builder install-app-depsworks great but is time intensive as it always does a complete rebuild even though some dependencies might already be built against the correct node version.electron-builderchecks if the native dependency is already using the correct ABI version. This allows us to add the make targetrebuild-depstomake startas a dependency and always ensure that we are using the correct builds without wasting much time.Final note
This PR is based on #485 as the
CONFIG_ENVfix is required to successfully run the app.