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

Fix garbled output #514

Merged
merged 5 commits into from
Nov 18, 2020
Merged

Fix garbled output #514

merged 5 commits into from
Nov 18, 2020

Conversation

vladaionescu
Copy link
Member

Fixes #338

The way it works:

  • If output is not terminated by a \n, then we store the final line as an "open line" and repeat it on the next call. We print the open line as it is for now and append our own \n
  • On the next call, any open line is pre-pended to the output
  • So far this results in the following output for curl, which is an improvement:
    Screenshot from 2020-11-17 19-01-43
  • As an extra optimization, if there is an open line and the previous output was from the same vertex, then we go up one line using an ANSI control char and overwrite that line
  • This results in this final output for curl (as well as meaningful visual updates while it's ongoing):
    Screenshot from 2020-11-17 19-50-07

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.

Printout of build logs in Earthly is sometimes garbled
2 participants