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

Refactor UI to use structured output util #40

Open
waynexia opened this issue Mar 2, 2023 · 4 comments
Open

Refactor UI to use structured output util #40

waynexia opened this issue Mar 2, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@waynexia
Copy link
Member

waynexia commented Mar 2, 2023

Describe This Problem

Currently sqlness outputs everything with println!. This is hard to maintain.

Proposal

Consider a structured way to organize our outputs. Either using existing util like TestReporter from nextest or wrap our own.

Additional Context

No response

@waynexia waynexia added the enhancement New feature or request label Mar 2, 2023
@jiacai2050
Copy link
Member

Any user case to collect stdout output?

@waynexia
Copy link
Member Author

waynexia commented Mar 2, 2023

Any user case to collect stdout output?

No for now, just for refactoring

@jiacai2050
Copy link
Member

jiacai2050 commented Mar 3, 2023

Then I suggest we could define a trait to collect those info

trait Collector {
  fn append(&self, &str) -> Result<()>
  fn flush(&self) -> Result<()>
}

@waynexia
Copy link
Member Author

waynexia commented Mar 6, 2023

Not sure if these are enough. This collector may also be exposed to users to replace their println in their sqlness runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants