-
Notifications
You must be signed in to change notification settings - Fork 259
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
Rename config to variables #1918
Conversation
a74e546
to
8616385
Compare
An annoying detail: the environment runtime variable provider is now confusingly named |
8616385
to
de0c39b
Compare
de0c39b
to
cbf2af1
Compare
3881bb0
to
fc5cb48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!! I have some small things I think we should address before we merge this though.
invalid-name(string), | ||
provider(string), | ||
other(string), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have a not-found
error for when the requested variable is not found? Right now this gets encoded as a provider
error which doesn't seem right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left it out because I didn't want to imply that not-found
was a "normal" condition (like the v1 key-value
no-such-key
); not being able to resolve a variable is a programming or operational mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange that this error is labeled as a provider error when it's fairly likely not a provider error. I think the most likely cause will be users thinking there is a variable name foo
and there not actually being one.
It's not a huge deal that this gets rendered as provider("no variable named 'foo'")
- the error is clear enough - it's just a bit strange is all.
I personally don't really see potential confusion from having another error case, but I guess I'm fine letting this go if everyone disagrees with me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a variant undefined
to specifically refer to this case @rylev. Could you take another look at the code and let me know what you think?
469bf4f
to
dd5125d
Compare
dd5125d
to
93472b0
Compare
invalid-name(string), | ||
provider(string), | ||
other(string), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange that this error is labeled as a provider error when it's fairly likely not a provider error. I think the most likely cause will be users thinking there is a variable name foo
and there not actually being one.
It's not a huge deal that this gets rendered as provider("no variable named 'foo'")
- the error is clear enough - it's just a bit strange is all.
I personally don't really see potential confusion from having another error case, but I guess I'm fine letting this go if everyone disagrees with me.
93472b0
to
462c2df
Compare
462c2df
to
4f2a3b3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of nits but otherwise LGTM!
2427936
to
f05a6ea
Compare
Signed-off-by: Brian H <[email protected]>
f05a6ea
to
7c6d865
Compare
SPIN_CONFIG_*
toSPIN_VARIABLE_*
for theEnvVariablesProvider
.config_provider
tovariables_provider
.crates/config
tocrates/variables
.