Fix duplicate prefix for produce_or_load(; filename)
#400
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removing mentioned line did not work, as that would break usages like
produce_or_load(; filename=hash, prefix="foo")
. We could makeappend_prefix_suffix()
a little more fuzzy, but that would invalidate other cache files.Let me describe my use case: I just wanted to replace the
savename(; connector)
to have the cache file names a little more readable. According to the documentation, I could simply useproduce_or_load(; kwargs...)
for that purpose. Upon doing so, the warning told me to use thefilename
kwarg instead, which led me to the duplicated prefix described in #392 (comment). Maybe one should set the innerprefix=""
. What do you think?Having looked into the code, another issue popped up: should
append_prefix_suffix()
adhere tosavename(; connector)
? Currently, it uses_
regardless.Fix #392