-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Update non-ASCII crate name warning message #11017
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -253,8 +253,7 @@ fn check_name( | |||||
if restricted_names::is_non_ascii_name(name) { | ||||||
shell.warn(format!( | ||||||
"the name `{}` contains non-ASCII characters\n\ | ||||||
Support for non-ASCII crate names is experimental and only valid \ | ||||||
on the nightly toolchain.", | ||||||
Non-ASCII crate names are not supported by Rust.", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should say
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had also considered that but currently Cargo does support non-ASCII crates without much issue. Its just
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure whether it's too much, but I might put something like "it will become a hard error in a future release" if we are trying to scare away folks using non-ASCII crate name 😆. Either way, they will evenutually figure out it won't work when using as an extern crate (dependency). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally, I wouldn't mind if Cargo still supported it so that you could make binaries with non-ASCII names, regardless of how well everything else on the system handles it :D |
||||||
name | ||||||
))?; | ||||||
} | ||||||
|
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 am wondering if this should be a warning or an error. To me, it seems like it should be an error but one of the cargo team members may have a different idea.
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.
Such a package rename still works. I feel like changing it to hard error is a bit rush at this moment.