Skip to content
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

add distinct type for cache paths #202

Merged
merged 2 commits into from
Jul 3, 2022
Merged

add distinct type for cache paths #202

merged 2 commits into from
Jul 3, 2022

Conversation

vito
Copy link
Owner

@vito vito commented Jul 3, 2022

previously, a 'naked' file or dir path would be treated like a cache when passed to a thunk as a mount source. this was a bit hastily slapped together and it was never really obvious behavior. if anything folks would likely do this trying to mount a host path in, and have it do something, but not what they expect.

now cache paths are a distinct path type constructed like so:

(cache-dir "foo")

where "foo" is an explicit identifier for the cache dir. rather than using the path itself as the cache key, the user provides one for the root. this means you can now pass a subdirectory of a cache dir to a thunk if you want - previously that would yield an entirely different cache key.

you can also use a cache path as a thunk command now, because why not.

vito added 2 commits July 3, 2022 14:54
previously, a 'naked' file or dir path would be treated like a cache
when passed to a thunk. this was a bit hastily slapped together and
it was never really obvious behavior. if anything folks would likely do
this trying to mount a host path in, and have it do _something_, but not
what they expect.

now cache paths are a distinct path type constructed like so:

  (cache-dir "foo")

where "foo" is an explicit identifier for the cache dir. rather than
using the path itself as the cache key, the user provides one for the
root. this means you can now pass a subdirectory of a cache dir to a
thunk if you want - previously that would yield an entirely different
cache key.

you can also use a cache path as a thunk command now, because why not.
@vito vito added enhancement New feature or request breaking Removes or replaces previously supported functionality labels Jul 3, 2022
@vito vito merged commit d8b27ed into main Jul 3, 2022
@vito vito deleted the proper-cache-paths branch July 3, 2022 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Removes or replaces previously supported functionality enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant