Add validation for crate/package name in new/init
solves https://github.com/PyO3/maturin/issues/1398
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_projectfunction is de-facto defining a default value forGenerateProjectOptions.name- would it be better to move this logic intoGenerateProjectOptions?
Deploy Preview for maturin-guide ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 9b21beb3fc12603bc124e2b978f7b9244fcfd6f0 |
| Latest deploy log | https://app.netlify.com/sites/maturin-guide/deploys/65d9fb0ee8676600086e03ee |
| Deploy Preview | https://deploy-preview-1943--maturin-guide.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
- 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
Agreed.
2. The
generate_projectfunction is de-facto defining a default value forGenerateProjectOptions.name- would it be better to move this logic intoGenerateProjectOptions?
Makes sense.
@messense I believe this is ready for review 😄
@messense Thanks!