Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Conversation

@jelmansouri
Copy link

No description provided.

.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("\\", "/");
Copy link
Contributor

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?

Copy link
Author

@jelmansouri jelmansouri Jun 28, 2020

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.

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Author

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.

Copy link
Author

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.

@acmcarther
Copy link
Member

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("\\", "/");
Copy link
Contributor

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.

@jelmansouri jelmansouri requested a review from acmcarther July 27, 2020 14:20
dfreese pushed a commit that referenced this pull request Aug 21, 2020
Adds an additional error for non-unicode paths, which was previously a TODO in terms of handling.  #178 provided a similar solution.
samschlegel pushed a commit to discord/cargo-raze that referenced this pull request Aug 26, 2020
Adds an additional error for non-unicode paths, which was previously a TODO in terms of handling.  google#178 provided a similar solution.
@UebelAndre
Copy link
Contributor

@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.

@UebelAndre
Copy link
Contributor

Is this change still necessary?

Base automatically changed from master to main February 24, 2021 20:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants