fix(templates/../spin.toml): skewer spin application name like a kebab #2531
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TLDR: Kebab skewers are great 🍡
With my Master's thesis handed in where I built a Temu/Wish knockoff of your products, I finally have time to try out your products proper. Howver, I encountered a bug while naively naming my spin project.
I'm not sure if omitting the kebab skewer from the generated spin.toml file was intentional or not, but I was met with this nifty error while trying to deploy the app I named with whitespaces:
Error: App name 'is it wednesday yet my dudes' contains characters that are not allowed. It may contain only letters, numbers, dashes and underscores
The error disappeared when I updated the name in my spin.toml to include the skewer, and I was able to deploy as expected.
I noticed that the
Cargo.toml
and folder name replaced the whitespace correctly, but notspin.toml.application.name
. No one would be stupid enough to name their project with whitespace, eh? (Hi, it's a me! 👋 👨💼)After digging through the source code that I'm now more suited for understanding after building Nebula (self-plug), I noticed that the kebab_case piping were missing in all the spin.toml templates. You're skewering the other other instances of project-name in here though, so I figured it might have been a mishap?
I'm able to build and deploy to Fermyon Cloud after installing the templates from the local git repository where I've update the templates.
My LSP complained about some of the .toml templates missing a newline between [component.name] and [component.name.build]. Let me know if I should revert these newlines.