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

Code evaluations are duplicated #189

Open
munshkr opened this issue Jan 6, 2024 · 8 comments
Open

Code evaluations are duplicated #189

munshkr opened this issue Jan 6, 2024 · 8 comments
Assignees
Labels
bug Something isn't working critical Important to fix
Milestone

Comments

@munshkr
Copy link
Owner

munshkr commented Jan 6, 2024

No description provided.

@munshkr munshkr converted this from a draft issue Jan 6, 2024
@munshkr munshkr self-assigned this Jan 7, 2024
@munshkr munshkr moved this from Todo to In Progress in Flok: Backlog Jan 7, 2024
@munshkr munshkr moved this from In Progress to Todo in Flok: Backlog Jan 7, 2024
@munshkr munshkr removed this from Flok: Backlog Jan 7, 2024
@munshkr munshkr modified the milestones: Flok 1.0, Version 1.0, Version 1.1 Jan 8, 2024
@munshkr munshkr removed the flok-next label Jan 8, 2024
@munshkr munshkr added the bug Something isn't working label Jan 8, 2024
@tmhglnd
Copy link
Contributor

tmhglnd commented Jan 12, 2024

I have noticed this some time as well, where code was posted twice in the flok-repl when I just evaluated once. Don't have any specific steps for reproducing currently, also not sure if it still happened lately. I'll keep an eye out!

@munshkr
Copy link
Owner Author

munshkr commented Jan 12, 2024

Yes, this still happens.. I think I know what's the problem, it's your own message that gets back at you from the server, and evaluates it (thinking it was from some other user). I need to filter your own messages correctly.

@totalgee
Copy link
Contributor

It's definitely happening here all the time, with SC REPL (both users are getting double evaluations of everything).

@Bubobubobubobubo
Copy link
Contributor

Can confirm that I'm getting this error too! It really makes things weird with my setup. SC is getting confused about it.

@munshkr munshkr added the critical Important to fix label May 18, 2024
@munshkr munshkr moved this from Todo to In Progress in Flok: Backlog May 18, 2024
@tmhglnd
Copy link
Contributor

tmhglnd commented Jul 18, 2024

I tried to look into this issue but I'm having a hard time and no idea where to look to try and fix this. I've been searching through the code for a while to find from where the actually evaluating is "emitted" to the repl. Sadly there is too little documentation in the code for me to figure out how this actually works. Can you give some pointers/explanation where this can be fixed? Then I'm happy to help, because I like this issue to be resolved.

I've been able to trace that the BaseREPL receives a message with { docID, body, user, mode, from, to } via the pubSubSubscribe.

I have not been able to find how this works in the PubSub class though and also not how this message is send from the web session to the server.

I'm also wondering if you could explain how you develop for Flok packages? Because only the web package has an option to run npm run dev (if I see correctly), how can I work on the Repl and other packages without having to run npm run build every time? Maybe I'm missing something basic here about how Typescript works (for example I see there is a debugModule(), but I also have no idea how to work with that and wasn't able to find documentation about it so far), I usually install some package like watchify to be able to develop without building every time, but I don't see that (or something similar) listed in the dependencies.

@tmhglnd
Copy link
Contributor

tmhglnd commented Oct 29, 2024

@munshkr, a little bump here too, if you find some time :)

@felixroos
Copy link
Contributor

that might be the same issue as this: #299 ?

@Bubobubobubobubo
Copy link
Contributor

This bug also happens with Sardine and other languages I have tried. Only appears when multiple people join the session though. Hard to reproduce when playing/experimenting alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working critical Important to fix
Projects
Status: In Progress
Development

No branches or pull requests

5 participants