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.
Various fixes detailed in release notes below.
Todo:
Concerns
val
s tovar
s for consistency regarding the replacement of the mutableTapInfo
s. That is, if changing tovar
s is actually a good thing. I think it is, but some validation would be nice 😊untap
API. Doesuntap
convey appropriate intent and usability?name
for debugging purposes. Should we just use thename
as the ID? I feel like, no, because this could be commonly overwritten. Take the case of some plugin that wants to be applied twice, applying it the second time will override the first hooks, most likely causing some undue strife. Tbh, the wholename
thing is not really used usefully anyways, and was only added as a direct port from JS tapable.Release Notes
Small fixes
suspend
methodAsyncParallelHook
to actually suspend properly until all callbacks completeTapInfo
with a mutablevar
containing an immutable list (this fixes an issue when tapping a hook that is currently being called:ConcurrentModificationException
)Untapping
In order to allow calling sites to unregister stale callbacks and prevent memory leaks, the
tap
API now returns aString
representing the ID of the specific "tap". The ID can then be passed into the newuntap
API to remove the callback from the hook. This ID can be randomly generated or manually passed when tapping a hook. Manually passing an ID is useful for when the tapper wants to replace a stale callback without calling needing tountap
explicitly.Version
Published prerelease version:
0.10.4-next.2
Changelog
next
Authors: 1