-
Notifications
You must be signed in to change notification settings - Fork 791
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
fix: assign default values to all internal variables #1518
Conversation
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.
LGTM
One assumes that the fact all our tests passed without changes that this is not a breaking change 🤔 Though it does change the behaviour of ENV VARS which are part of the "public" API so should be considered breaking 🙃 Do you consider this to be a breaking change @hyperupcall ? If this is breaking we would need to use |
Unless I'm missing something, I don't think it's a breaking change. The environment variables are a part of the "public" API as you mention, but as far as I can tell, the behavior of the env vars isn't changing, the thing that changes is where it is set (if at all). If asdf launches a subprocess like executing a plugin, the value of the environment variable are either the same or no longer empty, so if people were depending on a non-empty value, those values don't change. And the fix is that previous unset environment variables are now set, so that doesn't break anything. I suppose theoretically someone plugin somewhere could be relying on the fact that one or more of these variables were incorrectly unset or set, but empty - I don't personally care about that because if those were breaking changes, then too many changes would be breaking change due to Hyrum's Law and semantic versioning would be meaningless to me - intent/explicitness plays a part in my opinion. |
Thanks for the input, |
fi | ||
|
||
printf "%s\n" "$ASDF_DIR" | ||
asdf_default_tool_versions_filename() { |
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.
nitpick: The default tool versions file name is .tool-versions
. If the user has customized it by setting ASDF_DEFAULT_TOOL_VERSIONS_FILENAME
then this function won't return the default filename. I think asdf_tool_versions_filename
would be a better function name. Sorry for the late comment, but I figured I'd bring this up just for future reference.
Summary
As mentioned here, this fixes the behavior of defaulting
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME
to the correct version. This is also done to$ASDF_DATA_DIR
.