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

Breaks on filenames with backslashes #8

Open
cspotcode opened this issue Oct 28, 2018 · 2 comments
Open

Breaks on filenames with backslashes #8

cspotcode opened this issue Oct 28, 2018 · 2 comments

Comments

@cspotcode
Copy link

On Windows, filenames are delimited by backslashes. Unfortunately the CSV parser from v8-tools-core tries to parse them as \u0000 escapes when I believe it should be interpreting them verbatim.

This is the error I see when running on Windows:

$ deoptigate ./foo.js
deoptigate 🚫: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object

Here's an example of what the log lines look like:

KeyedLoadIC,0x294d02d15a2,229,32,0,.,0x19619e869d9,C:\Users\abradley\Documents\Personal-dev\foo-bar\foo.js\x00,,
KeyedLoadIC,0x294d02cf7fd,509,35,0,.,0x19619e869d9,C:\Users\abradley\Documents\Personal-dev\foo-bar\foo.js,,

I'm not 100% sure this CSV parsing is the underlying issue, but it seems to be the culprit.

@JGrimbert
Copy link

JGrimbert commented Nov 12, 2020

I had a first glance and note my thoughts :

  • This issue is silent and not the TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object.
  • Maybe the TypeError could result of a similiar Unix/Windows problematic, but it concerns others paths in an another location.

To avoid this blocking error, I'd juste added a key !== null condition in the resolve-files.js > resolveAll function :

  • The app can launch
  • The listed keys are not the sames as the strings reformated in csvparse.js > escapeFields

Furthermore, the app dont list any file to open at this state.
In view of the strings parsed in csvparse.js > escapeFields, this is probably due to the \u0000 issue you described.

@pbadenski
Copy link
Collaborator

@JGrimbert I don't want to steal this pull request from you ;) Will you be submitting one - I can otherwise.

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

No branches or pull requests

3 participants