-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: Address issues encountered while building on Windows+Cygwin environments #1817
fix: Address issues encountered while building on Windows+Cygwin environments #1817
Conversation
Use new style exceptions so that it works in both Python 2 and 3 Refs: nodejs#1817 (comment)
Use new style exceptions so that it works in both Python 2 and 3. Doing the same as previous commit, but in a different file. Refs: nodejs#1817 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work.
lib/configure.js
Outdated
|
||
// Do this to keep Cygwin environments happy, else the unescaped '\' gets eaten up, | ||
// resulting in bad paths, Ex c:parentFolderfolderanotherFolder instead of c:\parentFolder\folder\anotherFolder | ||
nodeLibFile = nodeLibFile.replace(/\\/g, '\\\\') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a windows-only branch so to be safe maybe this should only be invoked if windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do posix paths contain backslashes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ touch 'foo\\bar'
$ ls -al foo\\\\bar
-rw-r--r-- 1 rvagg staff 0 Jul 15 16:56 'foo\\bar'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs to be addressed @joquijada. I think can you wrap this in a conditional for Cygwin or at least Windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rvagg Done, wrapped in a Windows conditional.
I wasn't sure if I should/can write tests for this. |
ba0e3b5
to
908b9b0
Compare
FYI, squashed the commits into 1 via |
…ronments Addresses nodejs#1782
908b9b0
to
8770043
Compare
@refack would there be any objections to adding it back in to GYP3 if someone wants to put in the work? I assume it might not be too hard to figure out the changes that impact support and improve them for Cygwin. |
Fixes: #1782 PR-URL: #1817 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Landed in c7f1bca after some whitespace changes and commit message edits. @joquijada the caveat above about the coming GYP upgrade is important because these changes aren't necessarily going to be carried over and we don't Cygwin in any of our testing paths. You may need to come back and help get us sorted out but https://github.com/refack/GYP will probably be where GYP changes need to go. |
@rvagg Will check it out |
Fixes: #1782 PR-URL: #1817 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Address problems described here that were encountered during
npm rebuild
of modules that depend onnode-gyp
to compile C/C++ code.Fixes: #1782
Refs: https://github.com/joquijada/windows-node-js-node-gyp
Checklist
npm install && npm test
passesDescription of change