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: remove build/node_gyp_bins if it exists #1025

Closed
wants to merge 1 commit into from
Closed

fix: remove build/node_gyp_bins if it exists #1025

wants to merge 1 commit into from

Conversation

VerteDinde
Copy link
Member

Addresses #1024

In node-gyp v9.0.0, node-gyp adds a python symlink for older versions of python. This symlink is added to a node_gyp_bins/python3 directory within the build directory, which electron-rebuild then tries to rebuild. This PR removes the node_gyp_bins directory once the node gyp module has finished rebuilding.

Copy link
Member

@malept malept left a comment

Choose a reason for hiding this comment

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

This seems fine from a high level.

Can there be a test for this new code?

@VerteDinde
Copy link
Member Author

@malept Definitely - I pushed this up as a draft first to make sure it passed CI, looking at how to best test this now

@malept
Copy link
Member

malept commented Aug 1, 2022

Whoops, I missed the draft part. Sorry about that.

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.

Hot take, this can go here, but I think it probably belongs in some kind of default ignore list in packager 🤔

Can we also potentially follow-up upstream with a change that moves this directory outside of node_modules. I don't see a technical need for the node_gyp_bins folder to be generated for every module or in the actual module folder itself (vs just being in a tmpdir)

@VerteDinde
Copy link
Member Author

@MarshallOfSound Yeah, I think that's a fair take! 🙂 I'll close this one and move the work over to packager. Will also file an issue upstream with node-gyp itself

@VerteDinde VerteDinde closed this Aug 1, 2022
@VerteDinde VerteDinde deleted the fix-node-gyp-symlink-bins branch August 1, 2022 21:26
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.

3 participants