Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Received runtime error that should be thrown at component build time #2520

Open
asteurer opened this issue May 20, 2024 · 1 comment
Open

Comments

@asteurer
Copy link

Received the below error when running spin up. I incorrectly capitalized the variables in my spin.toml file, and this caused some delays when the app succeeded after spin build, but failed at runtime. Can we have this error at build time, rather than runtime?
Error: invalid variable name: "DB_URL": invalid character 'D'. Variable names may contain only lower-case letters, numbers, and underscores.

@itowlson
Copy link
Contributor

We used to fully load the manifest at build time, but it threw up a lot of irrelevant “you need to fix this completely different thing before you can find out why the borrow checker is mad” errors. It was derailing so we made it more forgiving. That said:

  1. Spin 2 introduced a better pipeline for manifest loading. Spin 1 had a monolithic loader which meant anything wrong would fail the load. So reading the whole manifest may be less derailing now.
  2. We could rearrange things so that spin build does the build regardless and also does a validation pass on the manifest. This would allow us to report validation failures at build time without them being derailing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants