-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add validation for crate/package name in new/init #1943
Conversation
✅ Deploy Preview for maturin-guide ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Agreed.
Makes sense. |
name, | ||
); | ||
} | ||
if is_windows_reserved(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.
The original code bailed if the platform is actually windows, I think this should be good enough for now
@messense I believe this is ready for review 😄 |
@messense Thanks! |
partially solves #1398 (only cargo)
The current commit only adds a very basic validation as a POC before implementing the needed cargo / pypi checks
A few questions i have before finishing the implementation
The cargo validation seems to be comprised of 2 main parts,
a. Basic validation which is part of the crate cargo-util-schemas, and is not made public outside the crate
b. Extra validations that are public from the cargo package
I believe we should vendor these logics - one is private, and the other requires the cargo package which i believe will add many dependencies to the project
The
generate_project
function is de-facto defining a default value forGenerateProjectOptions.name
- would it be better to move this logic intoGenerateProjectOptions
?