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

patch nested batches #385

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

piboistudios
Copy link

@piboistudios piboistudios commented Sep 14, 2024

The commits refer to interleaving batches, but the patch is really for nested batches

@piboistudios piboistudios changed the title patch interleaving batches patch nested batches Sep 22, 2024
cache.commands.push(irc_command);
while (cache?.tags?.batch) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call me old fashioned, but I like my caches to not change while I'm reading them.

Are you sure this is what you want to do ?

@klexas
Copy link
Contributor

klexas commented Sep 30, 2024

atches, but the patch is really for

Can you define a bit more or your changes please.
There is a mechanism to cache the batches themselves.. The cache is an internal mechanism that can definitely be modified and improved if needs be. If nested have been an issue for you, I would personally prefer to see the problem.

The changes to handler.js bother me a bit too much for this particular CR.

Looking at your changes though, it LOOKS like some timing issues ? It's not clear and I see no issues linked. Help me out here! :)

@piboistudios piboistudios marked this pull request as draft September 30, 2024 20:36
@piboistudios
Copy link
Author

piboistudios commented Sep 30, 2024

atches, but the patch is really for

Can you define a bit more or your changes please. There is a mechanism to cache the batches themselves.. The cache is an internal mechanism that can definitely be modified and improved if needs be. If nested have been an issue for you, I would personally prefer to see the problem.

The changes to handler.js bother me a bit too much for this particular CR.

Looking at your changes though, it LOOKS like some timing issues ? It's not clear and I see no issues linked. Help me out here! :)

After some testing there were further changes that needed to be made, and also as you have pointed out I am also unsure of the way this PR is designed/written.

I talked to @ItsOnlyBinary on Libera.Chat and his preference would be that the irc-framework events triggered by each message are gathered into an array and emitted in the batch end command (so batch.events alongside batch.commands, if I'm recalling correctly).

@ItsOnlyBinary
Copy link
Contributor

Im not sure on the best solution for this yet, grouping the batched events might be an issue due to the current way it collects the commands then sends the events (which behaviour needs to be kept as it makes sense), I have written some tests and been exploring options.

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.

3 participants