-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
stdio repl handling of both stderr and stdout for a form can be a problem sometimes #546
Comments
If you're up to modifying the Janet client code, you could try replacing:
with:
Please see: conjure/fnl/conjure/client/sql/stdio.fnl Line 96 in 4880144
for how things are handled in the SQL client. This might work with a Janet REPL. This is suggested as a simple work-around for handling other stdio clients. When @Olical completes his modularisation work (#500), hopefully, we can improve how the various REPLs work with Conjure. |
If using Janet's stdio repl [1], evaluating the following form leads to
on-stray-output
being called sometimes:IIUC, this occurs because a callback (
cb
) gets cleared here as a result ofon-stdout
triggering beforeon-stderr
(and they both callon-message
).By the time
on-stderr
gets called,cb
ends up being bound toon-stray-output
because of this.In my limited testing at the command line (evaluating the same form), stdout output appears to complete after stderr output which is the reverse order of the callbacks being called. I suppose it's possible that that's just the way it could end up being when using event-based things like libuv?
[1] Possibly this may be an issue for other languages too as relevant code lives in fnl/conjure/remote/stdio.fnl.
The text was updated successfully, but these errors were encountered: