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

Doesn't seem to unpack on Windows #1

Closed
coder543 opened this issue Nov 22, 2017 · 5 comments
Closed

Doesn't seem to unpack on Windows #1

coder543 opened this issue Nov 22, 2017 · 5 comments
Labels

Comments

@coder543
Copy link

I was trying to build reproto on Windows, and cargo failed in a way I haven't seen before:

image

I tried deleting the cached copies of genco from cargo, that way it would download it again and try to extract it, but the same issue occurred again. So, I went into the WSL/Bash and reproto compiles just fine under Linux.

The code generating the error is here. I'm not sure what would cause this failure.

@coder543
Copy link
Author

coder543 commented Nov 22, 2017

...It just hit me. Over the years, I've historically only used Unix-like OSes, but I try to stay familiar with Windows, since it helps me stay a well-rounded developer.

Let me introduce you to this fun article. Relevant quote:

Do not use the following reserved names for the name of a file:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension; for example, NUL.txt is not recommended.

You have a file named con.rs. The extension doesn't matter -- this is a holdover from the DOS days, when folders didn't even exist, and these reserved files were reserved with no regard for the 3 digit extension on the "8.3" format. CON is the console input/output "file". So, when tar-rs tries to unpack a file named CON, it just gets printed to the console, as we can see above, and then setting mtime fails, of course, since you can't set the modified time on the console.

I only made this connection when I tried to git clone this repository directly and the file was printed the console output there as well, with the file missing from the hierarchy.

So, to resolve this issue for Windows... the only option is to remove or rename con.rs. 😞

@udoprog
Copy link
Owner

udoprog commented Nov 22, 2017

Thank you!

I saw that error before but didn't have the time to figure out what was going on. You just saved me a ton of effort :).

Renaming the file to con_.rs should work (goto approach when dealing with reserved words). Maybe name the tour something better eventually.

@udoprog
Copy link
Owner

udoprog commented Nov 22, 2017

I've shipped an updated version of genco (0.1.11) which uses con_.
Please try a cargo update and rebuild reproto. Tell me if anything else pops up.

Thank you again!

@coder543
Copy link
Author

This issue is now fixed. Now I'm just dealing with trying to get the onig-sys library to compile... I wish syntect just used some native-Rust regex library, but it doesn't.

@udoprog
Copy link
Owner

udoprog commented Nov 22, 2017

@coder543 Thanks! Moving this to reproto/reproto#12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants