-
Notifications
You must be signed in to change notification settings - Fork 105
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
Root path fix for windows #178
base: main
Are you sure you want to change the base?
Conversation
.split_off(package_root_path.display().to_string().len() + 1); | ||
.split_off(package_root_path.display().to_string().len() + 1) | ||
// Handle Windows case where we end up here with backslashes | ||
.replace("\\", "/"); |
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 behavior on lines 743-749/751 looks quite a bit like strip_prefix. Could that be used instead? Would that help get rid of the special casing for 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.
I think we would still endup with src\lib.rs for example instead of src/lib.rs.
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.
Thanks for the clarification. For my own reference, from std::path::Path:
separated by / on Unix and by either / or \ on Windows
It would be nice to have a test case for this, though I'm not sure if CI even runs on windows. @acmcarther can you confirm.
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.
Yeah, CI doesn't currently run on windows. Travis might have some support for running tests on windows though.
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'll be happy to add CI for windows support.
Commit bazelbuild/rules_rust@d2c4b14 just adds it on the bazel rust rules. So all windows support is quite fresh, if we're building through bazel in the CI we need the latest rust rules.
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.
Can this be accepted, if no CI work is planned please.
I don't have a strong preference on this one way or the other, but would like to wait for dfreese@'s LGTM since he provided an initial review. |
.split_off(package_root_path.display().to_string().len() + 1); | ||
.split_off(package_root_path.display().to_string().len() + 1) | ||
// Handle Windows case where we end up here with backslashes | ||
.replace("\\", "/"); |
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.
Thanks for the clarification. For my own reference, from std::path::Path:
separated by / on Unix and by either / or \ on Windows
It would be nice to have a test case for this, though I'm not sure if CI even runs on windows. @acmcarther can you confirm.
Adds an additional error for non-unicode paths, which was previously a TODO in terms of handling. #178 provided a similar solution.
Adds an additional error for non-unicode paths, which was previously a TODO in terms of handling. google#178 provided a similar solution.
@jelmansouri Hey, would you be able to rebase and fix the conflict here? @dfreese @acmcarther And would you guys be able to do another review here? Perhaps @damienmg would be able to fill in for @acmcarther if he's not reachable. |
Is this change still necessary? |
No description provided.