sdk
sdk copied to clipboard
`dfx new` not accepting names with dashes
I tried the following:
➜ dfx new test-performance
error: invalid value 'test-performance' for '<PROJECT_NAME>': Invalid character(s): "-"
For more information, try '--help'.
I expected to see this happen:
Accept dashes in project names for any serious modern sdk like this.
Instead, this happened: Dashes and other characters not accepted
Meta
dfx --version
:
0.15.2 (latest)
Is there any special reason for this limitation? I don't recall any other dev tool, sdk or project doing this, maybe understanding the causes can lead to think about a proper solution, but this seems a limiting and wrong design decision / convention IMHO.
Manually creating the project without dfx new
perfectly allows to use any legal character, so, why is dfx
purposely preventing this?
Thank you for reporting this! We currently forbid dashes because they interfere with our JS templating. We are currently reworking dfx new
anyways, so we added this as one of the features we'd like to support with the rework (note to self: ticket)