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

memo v2: thunk-based bass.lock #71

Merged
merged 3 commits into from
Feb 14, 2022
Merged

memo v2: thunk-based bass.lock #71

merged 3 commits into from
Feb 14, 2022

Conversation

vito
Copy link
Owner

@vito vito commented Feb 14, 2022

instead of setting arbitrary categories in a global namespace, bass.lock now stores results associated to a Bass thunk + function binding.

this paves the way for adding a bass --bump command for bumping dependencies, by re-running the embedded thunks and updating the output values.

it's also much more precise.

the gap I have yet to solve is when to remove/garbage collect stale entries. but that was a problem before too.

vito added 3 commits February 13, 2022 22:43
not amazing, but better than panicking
bass.lock now stores not only the results for a function, but everything
needed to re-run it if desired.

instead of a category, each input/output is associated to a Bass thunk
to (load) and the binding of the function to call.

this should be much more airtight.

along the way, replace (memo) with a native bass implementation in terms
of two more low-level bindings (which I might move to the internal
scope).
@vito vito merged commit 05a86e6 into main Feb 14, 2022
vito added a commit that referenced this pull request Feb 20, 2022
memo v2: thunk-based bass.lock
@vito vito deleted the wip-thunk-memo branch February 20, 2022 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant