fermyon / feedback

Centralized repository for Fermyon Cloud feedback and bug reports
3 stars 1 forks source link

Single dash in new http-rust project name works, but two dashes do not #39

Closed gmlewis closed 9 months ago

gmlewis commented 10 months ago

Describe the bug Following the instructions in this video works, but if you name your project "hello-rust-2" instead of "hello-world", spin up fails.

Frequency of the bug Please check one:

Set-up information

$ spin -V
spin 2.0.0 (e4bb235 2023-11-03)

To Reproduce Steps to reproduce the behavior:

  1. Follow the instructions in the above video but name your new project hello-rust-2 instead of hello-world.
  2. Run spin build then spin up.

Expected behavior It should create a localhost:3000 server and serve your new Spin app.

Screenshots spin-2-2023-11-04_11-15-55

Additional context Here is the error from spin up:

$ spin up
Error: TOML parse error at line 11, column 13
   |
11 | component = "hello-rust-2"
   |             ^^^^^^^^^^^^^^
data did not match any variant of untagged enum ComponentSpec
lann commented 10 months ago

Thanks for the report! The actual constraint is in starting a "word" with a digit, but the error reporting is bad: https://github.com/fermyon/spin/issues/1950

tschneidereit commented 10 months ago

I also just filed https://github.com/fermyon/spin/issues/2051 to track validating component names earlier, so that the error message doesn't happen quite as late.

vdice commented 9 months ago

Now fixed (in canary) by https://github.com/fermyon/spin/pull/2092. Thank you!