Skip to content

Conversation

seun-ja
Copy link
Contributor

@seun-ja seun-ja commented Sep 16, 2025

Aims to resolve #3053

Offers an option for variables unset

Signed-off-by: Aminu Oluwaseun Joshua <[email protected]>
Copy link
Collaborator

@lann lann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a way to represent "default unset" in spin:variables/get. I think currently it would just return error.undefined which can't be distinguished from mistyping the name.

As-is I think this change isn't worth it when the alternative of default = "" will probably handle the vast majority of cases where this would be useful. If we really want to do this I think spin:variables should be revised to explicitly represent this case through e.g. a new error variant.

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

Successfully merging this pull request may close these issues.

allow variables to be optional without a default value
2 participants