-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Problem
Actually, you can create a lib or a bin where the package contains files such as aux.rs which have Windows reserved filenames.
As soon as #8055 is closed, cargo will display a proper error when you try to unpack these types of packages.
But it actually doesn't say anything to the user when you try to build/publish a crate.
Obviously, you maybe are not building your package to be ran in Windows but Linux, and then this is not an issue at all.
But maybe it should at least make the user know that if he is targeting Windows as an OS where the package is going to be deployed, using windows reserved filenames will make the package impossible to install or run.
Possible Solution(s)
- Add a warning when you're trying to publish a crate with reserved filenames on any of it's files or folders. Nothing that prevents you to do this, but that explains that this can cause errors as the one that will be printed once Cargo should check for windows-reserved filenames when extracting a package. #8055 lands.
- Imo it will be so annoying to have a warning on build level. Even something like
#![allow(windows_reserved_filenames)]will do the job. But again, seems too much to me.
I don't know if that makes sense from the teams perspective, but the previous issue made me think that if we will error when we find that filenames, we should then advise users before publishing.