-
Notifications
You must be signed in to change notification settings - Fork 487
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
mergeOverwrite documentation unclear about sideeffects #997
Comments
The docs in question: https://github.com/helm/helm-www/blob/master/content/en/docs/chart_template_guide/function_list.md#mergeoverwrite-mustmergeoverwrite I see this line about
|
It is also worth noting that this documentation is ripped straight from Sprig's documentation. So any changes that need to be clarified here should also be provided upstream. https://github.com/Masterminds/sprig/blob/master/docs/dicts.md#mergeoverwrite-mustmergeoverwrite |
@bridgetkromhout the line you mentioned is ambiguous: Yes it says that "effectively overwriting values in the dest dictionary", which can mean two things:
My suggestion would be the following: Note/Side effect: The @bacongobbler If we have a merged PR/consensus here we can provide that to upstream |
The documentation suggests that only the
newdict
is created, yet the function in fact changes the passed$dest
as well. This is not clearly visible from the description of this function and should be added.E.g. a developer understands a function
f(a,b) -> c
thata
andb
are read and onlyc
is something new/created/calculated.Side effects are dangerous and must be clearly communicated.
https://github.com/helm/helm-www/blob/90ff5b8fae8616dc363bb09990fbc97876bfc92b/content/en/docs/chart_template_guide/function_list.md
The text was updated successfully, but these errors were encountered: