wasp new prints these rules when a name fails:
The project's name is not in a valid format! The project's name:
- must start with a letter or an underscore
- must contain only letters, numbers, dashes, or underscores
- must not be a Wasp keyword
But validation runs on the converted app name (kebabToCamelCase), which can repair violations - while the directory is created from the raw name:
$ wasp new -- -app # converts to "App" -> passes validation
$ wasp new "app'" # trailing ' allowed by identifier rule
Both proceed into template creation and leave shell-hostile directories behind:
🐝 --- Creating your project from the "basic" template... -------------------------
./-app
🐝 --- Creating your project from the "basic" template... -------------------------
./app'
Cause: parseWaspProjectNameIntoAppName validates the converted name (cli/src/Wasp/Cli/Command/CreateNewProject/ProjectDescription.hs:98) using isValidWaspIdentifier (src/Wasp/Analyzer/AST.hs:45), which also permits trailing ' primes the printed rules never mention.
Fix options: validate the raw project name against the printed rules as well, or extend the rules text to describe actual acceptance.
wasp newprints these rules when a name fails:But validation runs on the converted app name (
kebabToCamelCase), which can repair violations - while the directory is created from the raw name:Both proceed into template creation and leave shell-hostile directories behind:
Cause:
parseWaspProjectNameIntoAppNamevalidates the converted name (cli/src/Wasp/Cli/Command/CreateNewProject/ProjectDescription.hs:98) usingisValidWaspIdentifier(src/Wasp/Analyzer/AST.hs:45), which also permits trailing'primes the printed rules never mention.Fix options: validate the raw project name against the printed rules as well, or extend the rules text to describe actual acceptance.