-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: gyp dependencies don't work properly
This is due to a bug in gyp that I've documented and reported at https://bugs.chromium.org/p/gyp/issues/detail?id=508. My test case is a bindings.gyp that has a dependency on another gyp file in a different directory. The problem I was seeing was makefiles being generated in what looked like random places up and down the file tree. It turns out that gyp is trying to use relative directories while at the same time letting the user switch directories using the --generator-output option. It took a while but I got a minimal reproducible test case that I could report to the gyp project. However, this could take forever to be merged and we have to deal with widespread existing gyps in the world. So... Solution: provide a workaround in node-gyp. The simplest workaround is to not use --generator-output. This has the disadvantage of creating gyp's makefiles in the main project directory. That's manageable with .gitignores. It is how most gyp projects work. It has the big advantage of not scattering its makefiles around the file system. I've called this option `-mklocal` and documented it. I've no idea how to add it to the regression test. Thanks for taking this patch into consideration.
- Loading branch information
Showing
4 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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