-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Handle Windows-reserved paths consistently on all platforms #10461
Conversation
Cargo had error handling and test coverage for the fact that path names such as `aux.rs` are not allowed on Windows. More recent versions of Windows do support such path names, but given that Cargo still supports older versions it would be better to have consistent handling of path names across all platforms. Indeed, there is already code to prevent packages containing reserved path names from being published, so it makes sense to be consistent elsewhere. This commit changes the behavior to be consistent and tested on all platforms that Cargo supports.
(rust-highfive has picked a reviewer for you, use r? to override) |
This looks reasonable to me. It is, technically, a breaking change for non-Windows platforms, on which crates could otherwise work with such paths as long as they didn't publish to crates.io and didn't need to run on Windows. So, let's see if we have consensus for this. (The other reasonable alternative would be making this same change but keeping the @rfcbot merge |
Team member @joshtriplett has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Agree with this patch 👍🏾 |
I don't think this is a change we should make. There are legitimate packages that contain these paths. This would be a breaking change for them. I don't think cargo should start to refuse supporting them on all platforms, as they work today on all non-windows platforms (and those authors may be perfectly content with that). I would prefer to keep the original behavior. I'm not sure I follow how #10322 lead to this. I would be fine with testing if the current platform supports |
Per discussion on Zulip, I agree that it's alright to just test if the OS actually reserves these filenames, as long as the code used to test that is not the same implementation as the code used for that purpose when unpacking (which would be circular). @rfcbot cancel |
@joshtriplett proposal cancelled. |
Cargo had error handling and test coverage for the fact that path names such as
aux.rs
are not allowed on Windows. More recent versions of Windows do support such path names, but given that Cargo still supports older versions it would be better to have consistent handling of path names across all platforms. Indeed, there is already code to prevent packages containing reserved path names from being published, so it makes sense to be consistent elsewhere.This commit changes the behavior to be consistent and tested on all platforms that Cargo supports.
This PR is a better way of doing what #10322 tried to do.