spinframework / spinframework/spin

allow variables to be optional without a default value

Open
#3,053 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
6.5k
Forks
310
Avg merge
1d 20h
Merged PRs (30d)
24

Description

currently variable needs to be either provided a default value or made required in spin.toml. I would like to keep my default value in code near to where it is actually used. one of the reason I want to store my default values in code is because my project can run as a independent service or as a spin app and I don't want to duplicate the default values in two places.

I wanted to hear if that is something we may consider to relax or are there other reasons that we recommend configuring the default value in spin.toml?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review how variables are declared in spin.toml and how their defaults are currently handled. Clarify whether optional variables without a configured default should be supported, and document the expected behavior and affected configuration paths before implementation.

Written by the indexing model from the issue text.

Assessment

Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.