-
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
Add support for Unicode characters in paths #2254
base: main
Are you sure you want to change the base?
Conversation
9ecaeac
to
abeafbe
Compare
a75f2ad
to
096d6df
Compare
Please do not request reviews until all tests are green. |
At second, in my opinion, they are looking not good becouse find-python.js script is not looking good (may be i dont know something). and in therd, i just dont know how to test it (as previos author). In such way i am fixing complex bug, complex becouse it is formed inside python it self... may be in python in symbiosis with windows. in this case we cant use unit tests. we should use something bigger or more complex... the bug is in that python when called from, another process (in our case node.js) doesn't specifing default encodng for stds streams to utf8. then we just reconfiguring these streams to right encoding. and in case of python 2.7 it even return sys.executable in wrong encoding.
Now work in progress. I will publish commits soon. |
096d6df
to
9e1397c
Compare
c947fa5
to
a54fcc6
Compare
a54fcc6
to
66c0f04
Compare
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.
@cclauss
if i merge changes with master then test/test-addon.js
is breaking. also Error: Could not locate the bindings file. Tried
@richardlau, @DeeDeeG, @cclauss can some one pls review my code or at least approve to run workflows? |
thanks) |
@owl-from-hogvarts I'm not sure why the tests/CI is not running here. (Reminder: I am not part of the node-gyp team, so I personally can't fix CI here.) But you can run the tests at your fork if you want. Just enable the CI actions here: https://github.com/owl-from-hogvarts/node-gyp/settings/actions (and you might need to push a commit after the workflows are enabled, to trigger a new CI run.) Edit: Okay, someone appears to have triggered the CI manually, after being notified of these comments. |
@DeeDeeG thank you for smart idea) |
@rvagg hi) can you pls review this PR and if possible, merge it) |
@owl-from-hogvarts hmm, there is a merge conflict from my PRs. Sorry about that. I believe this pull request has changed Using Unix line endings (LF) solves the merge conflict. |
@DeeDeeG now i can't see any merge conflicts. In |
@owl-from-hogvarts this branch has overwritten/undone the change I made in #2375. I suppose you can re-apply it by doing Note about merge conflicts (click to expand if you want)(I guess I should clarify briefly: All of this is not really relevant to this PR right now. The Maybe this doesn't need to be said, and maybe it was just an oversight. Anyhow, I say this to give a friendly hint: When encountering merge conflicts during a I personally like to resolve complex merge conflicts with the Atom text editor: https://flight-manual.atom.io/using-atom/sections/github-package/#resolve-conflicts, but I have found that the interface there shows what's going on so clearly, over time I have become familiar enough with the process that I have become comfortable doing this with a basic text editor like Notepad or It is probably too late to resolve the merge conflict the usual way on this branch, as the "resolution" of the conflicts is baked into the rebased commits now. It would require some complex interactive rebasing ( Sorry this got really long. I dunno, I am a nerd about |
@DeeDeeG i have done this!!! your changes are picked up. No merge conflicts |
https://github.com/nodejs/node-gyp/pull/2254/checks?check_run_id=2634323722#step:9:26 @DeeDeeG @cclauss as i understand, tests are not passing due to timeout. So does this mean that node-gyp works too slow? or it may be an error internally with some kind of infinite loop or never ending awaiting or so? |
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 re-ran the tests and all pass now. My sense is that we have at least one flaky test.
I approve the Python changes which are reasonable and minimal but someone else needs to carefully review and approve the JavaScript changes and there are a lot of them. Are all of these changes required to support Unicode pathnames?
Thank you very much) In fact in js part only one line change is strictly necessary, but that one line breaks all old tests. I think i can use new tests but with old source of |
My strong recommendation would be to move all |
@cclauss i have folowed your advice: now node-gyp use old |
@rvagg @DeeDeeG @joaocgreis PLEASE review this PR! |
@joaocgreis also what the purpose of running some checks in |
@rvagg @joaocgreis hey! Will this PR be reviewed some day? The year has passed since this PR was opened. There is really not so much to review. In JS part only tests were changed. |
I'd like to see this resolved but I don't have the expertise, either on Python or Windows, to make a call either way. Does someone else here feel confident enough this is a reasonable change? @nodejs/platform-windows maybe? |
On Windows 10 i discovered an issue that if there are non-english letters or symbols in path for python find-python.js script can't find it. This bug is couse by encoding issue which I have (i hope) fixed. At least this bug fix works for me. Have changed: modified: gyp/pylib/gyp/easy_xml.py python 2.7 handle xml_string in wrong way becouse of encoding (line 128) modified: gyp/pylib/gyp/input.py if "encoding:utf8" on line 240 doesn't marked cause to error new file: lib/find-python-script.py i have created this file for convience. Script which can handle non-eanglish letters and symbols cann't °fit one lne becouse it is necessary to specify instarctions for several versions of python modified: lib/find-python.js to make js understand python (line 249)
created file test-find-python-script.py
github-close-issue: 2505
cb7b53c
to
6169230
Compare
Checklist
npm install && npm test
passesDescription of change
On Windows 10 i discovered an issue that if there are
Unicode letters or symbols in path
for Python, find-python.js script can't find it.
This bug is caused by an encoding issue which (i hope)
I have fixed. At least this bug fix works for me.
Have changed:
because of encoding (line 128)
letters and symbols can't fit on one line
because it is necessary to specify
instructions for several versions of python