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

notifier returned by makeNotifierFromAsyncIterable is lossless #5413

Closed
turadg opened this issue May 20, 2022 · 0 comments · Fixed by #5737
Closed

notifier returned by makeNotifierFromAsyncIterable is lossless #5413

turadg opened this issue May 20, 2022 · 0 comments · Fixed by #5737
Assignees
Labels
bug Something isn't working notifier
Milestone

Comments

@turadg
Copy link
Member

turadg commented May 20, 2022

Describe the bug

The design of Notifier is that if you call getUpdateSince() without any arguments, you get the latest state.

This is different for the alleged Notifier returned by makeNotifierFromAsyncIterable. It never skips elements of the iteration of the underlying subscription.

Expected behavior

A Notifier skips states consistently. Either makeNotifierFromAsyncIterable conforms or is renamed. (Or replaced if there's something better.)

@turadg turadg added the bug Something isn't working label May 20, 2022
@turadg turadg added the SwingSet package: SwingSet label Jun 1, 2022
@warner warner added notifier and removed SwingSet package: SwingSet labels Jun 8, 2022
gibson042 added a commit that referenced this issue Jul 8, 2022
gibson042 added a commit that referenced this issue Jul 8, 2022
gibson042 added a commit that referenced this issue Jul 8, 2022
Cherry-picked from gh-5413-lossy-makeNotifierFromAsyncIterable.
See #5695 .
gibson042 added a commit that referenced this issue Jul 8, 2022
gibson042 added a commit that referenced this issue Jul 8, 2022
Cherry-picked from gh-5413-lossy-makeNotifierFromAsyncIterable.
See #5695 .
gibson042 added a commit that referenced this issue Jul 8, 2022
turadg pushed a commit that referenced this issue Jul 8, 2022
turadg pushed a commit that referenced this issue Jul 8, 2022
@mergify mergify bot closed this as completed in #5737 Jul 14, 2022
mergify bot added a commit that referenced this issue Jul 14, 2022
* fix(notifier): Make makeAsyncIterableFromNotifier lossy

Cherry-picked from gh-5413-lossy-makeNotifierFromAsyncIterable.
See #5695 .

* fix(notifier): Revert "Make makeAsyncIterableFromNotifier lossy"

Eager consumption led to infinite loops; see
#5695 for context.

* feat(notifier): Add makeNotifierFromSubscriber

Fixes #5413

* test(notifier): Update per code review

* chore(notifier): Resolve lint warnings

* fix(notifier): Align makeNotifierFromSubscriber with makeNotifierKit

getUpdateSince() always consults the source subscribeAfter() rather than
using a possibly-stale local cache.

* fix master merge

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Turadg Aleahmad <turadg@agoric.com>
turadg added a commit that referenced this issue Jul 14, 2022
* fix(notifier): Make makeAsyncIterableFromNotifier lossy

Cherry-picked from gh-5413-lossy-makeNotifierFromAsyncIterable.
See #5695 .

* fix(notifier): Revert "Make makeAsyncIterableFromNotifier lossy"

Eager consumption led to infinite loops; see
#5695 for context.

* feat(notifier): Add makeNotifierFromSubscriber

Fixes #5413

* test(notifier): Update per code review

* chore(notifier): Resolve lint warnings

* fix(notifier): Align makeNotifierFromSubscriber with makeNotifierKit

getUpdateSince() always consults the source subscribeAfter() rather than
using a possibly-stale local cache.

* fix master merge

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Turadg Aleahmad <turadg@agoric.com>
@Tartuffo Tartuffo added this to the Mainnet 1 milestone Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working notifier
Projects
None yet
5 participants