-
Notifications
You must be signed in to change notification settings - Fork 54
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
Report errors to stdout in REPL mode #417
base: main
Are you sure you want to change the base?
Conversation
I didn't know sidecar egglog was a thing!
That makes sense to me.
Hm, why doesn't it monitor stdout? |
Oops, I meant in the sidecar egglog the host only monitors stdout (not
stderr, which are just logging information that is hard to parse).
I didn't know sidecar egglog was a thing!
I’m trying this out for my current project just to see how robust egglog is
if the user only wants to use it as an external solver without writing any
Rust (or Python). We will see how it goes :)
…On Tue, Aug 20, 2024 at 8:19 AM Saul Shanabrook ***@***.***> wrote:
I didn't know sidecar egglog was a thing!
If a command fails, REPL egglog should just ignore this command and
continue to read second command, while it may make more sense for sidecar
egglog to halt.
That makes sense to me.
In REPL egglog because both stderr and stdout are printed in the CLI, we
should avoid duplicating information like error messages between
stdout/stderr. But this is not true for sidecar egglog since the host
process only monitors stderr.
Hm, why doesn't it monitor stdout?
—
Reply to this email directly, view it on GitHub
<#417 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADEKPFBX4N3POH3SD46WCP3ZSNM6TAVCNFSM6AAAAABMY3RL2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJZGEYTQNJTGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
For sidecar egglog, I think this PR isn't sufficient. We need a reliable way to check that a command has finished, since the absence of an error isn't enough. My recommendation is that we have an option that prints s-expressions as the output, one s-expression per command. As for the duplication, having a command line flag for REPL mode sounds fine to me |
Without this PR, the user of egglog (which can be say another process) cannot check if the command is successfully executed. The downside of this change is that every error message is now duplicated in the REPL mode. I don't know what the best design here would be. Maybe having another command line flag for this?
Indeed, there are some nuanced differences in the expected behaviors of REPL-mode egglog vs egglog communicating with other processes via stdin/out ("sidecar" egglog).
Thoughts and ideas are welcome!