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

Make "declared function" printouts debug mode #472

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oflatt
Copy link
Member

@oflatt oflatt commented Nov 18, 2024

The eggcc project relies on info printing, and the declared function print outs are becoming super verbose (one per variable, which we generate tens of thousands of)
This PR makes these prints debug instead of info

It also slightly cleans up a confusing error message in the extractor

@oflatt oflatt requested a review from a team as a code owner November 18, 2024 19:50
@oflatt oflatt requested review from mwillsey and removed request for a team November 18, 2024 19:50
Copy link

codspeed-hq bot commented Nov 18, 2024

CodSpeed Performance Report

Merging #472 will not alter performance

Comparing oflatt-less-verbose (4a194a3) with main (1d31817)

Summary

✅ 8 untouched benchmarks

@yihozhang
Copy link
Collaborator

I'm not sure if this should be in the main. Right now info is mostly used for responding to user commands (i.e., if it succeed), while debug is for recording internal processing information. We should generate at least one INFO message per user command. If you want a less overwhelming log, you should probably make egglog print desired log info to stdout via some commands, and then redirect egglog's stdout to e.g., a log file

@Alex-Fischman
Copy link
Collaborator

We should generate at least one INFO message per user command.

Is this documented anywhere? Why would this be the case?

@oflatt
Copy link
Member Author

oflatt commented Nov 19, 2024

@yihozhang is this for the web demo? Or for sidecar egglog?
Sidecar egglog shouldn't use info prints, it should use the normal stdout right? Perhaps we've been abusing log::info

@yihozhang
Copy link
Collaborator

Sidecar egglog only uses stdout for communication. log::info is for CLI and web demo. I believe one of the original intentions of log::info is so that the user can see when each command has finished running (otherwise how would a REPL user know?), while stdout should be silent until the user expects a result (e.g., an extractant, run statistics). This is not documented.

@oflatt
Copy link
Member Author

oflatt commented Nov 20, 2024

Racket's REPL, for example, doesn't print out something on each command, it just runs it. It's pretty verbose to print on each command unless you need that interactivity for sidecar egglog.
Perhaps we should have a new interactive mode that is verbose and parse-able?

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