-
Notifications
You must be signed in to change notification settings - Fork 409
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
bugfix(command/build.rs): Cancel Escape #396
Conversation
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.
so PathBuf doesn't have a default display on purpose- you'll likely want to use to_str
or to_string_lossy
(the previous can fail, the former is likely the better option here, though may sometimes print weird things).
I believe this is the preferred method for formatting paths: https://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.display |
oh huh, good call @fitzgen i didn't even know that existed. i'm curious that if that exists why Display trait isn't formally impl'd but anyways, seems the right way to go (as best as i can tell that |
this fix may conflict with #389 |
@huangjj27 thanks for this! one ask- could you please include test(s)? |
@ashleygwilliams I would be glad to! |
@huangjj27 add a test case here to check whether windows path output is unneccesarily escaped as this PR intended to fix. the existing testcases are good examples for you to create a test case such as |
@huangjj27 if you would prefer i can also grab this PR and add the tests for you! just let me know what you'd like :) |
Hi! I added a test for the change, but the test case seems to keep failing on installing wasm-bindgen, but the source code of test crate generated can be built using normal call of what the "source code of test crate generated" means the file generated by here is the log:
this error is likely caused by not finding the |
@ashleygwilliams thanks! I'm working on the test(s) and glad to do the job, but I need some hints and times to finish it (for I could use only about an hour at night during workdays) |
hrm. let me investigate! thanks @huangjj27 and no worries on taking your time, i just wanted to make sure you weren't stuck! |
Hi, @fitzgen @ashleygwilliams , I just update a test case that can pass without redirecting $CARGO_TARGET_DIR of the temporary proejct. this can be merged after solving #408 |
It seems the test case triggered an panic |
It's so weird that I passed the test on my windows but failed on appveyor. I even can't get the logs from appveyor. What should I do next? |
It's so strange that the result of |
Hi, @ashleygwilliams , I get such error that never occur at local and I'm not sure if it's the appveyor that causes the problem. Would you re-trigger the CI? |
I fixed the appveyor CI on master, so if you rebase, then it should start passing and we can merge this! |
err, I suppose this hasn't had another round of review yet, so maybe not merge immediately after rebase :-p |
use Path::display to show out_dir
the test case would pass after solving rustwasm#408
this commit fixes rustwasm#390, rustwasm#414, and closes rustwasm#408 for the test case have to pass after a successful build.
fixes conflicts encountered when rebasing to master fixes # 390
I once thought that it's using git bash in my vscode that makes the test failed. but after I change to powershell as integrated terminal, all test passed again. |
in the CI, there is no user. begining with "C:\" is just enough
I finally figure out there is difference of the path between ch and local, and |
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 is great! thanks so much for sticking with it!
fix #390
Make sure these boxes are checked! 📦✅
rustfmt
installed and have yourcloned directory set to nightly
$ rustup override set nightly $ rustup component add rustfmt-preview --toolchain nightly
rustfmt
on the code base before submitting✨✨ 😄 Thanks so much for contributing to wasm-pack! 😄 ✨✨