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

Implement pretty printing abstraction #175

Closed
cptartur opened this issue Jul 14, 2023 · 4 comments
Closed

Implement pretty printing abstraction #175

cptartur opened this issue Jul 14, 2023 · 4 comments
Labels
good first issue Good for newcomers

Comments

@cptartur
Copy link
Member

cptartur commented Jul 14, 2023

Right now, all printing within the forge source code is done just by calling methods from this module:

https://github.com/foundry-rs/starknet-foundry/blob/master/crates/forge/src/pretty_printing.rs

We should introduce a PrettyPrinting trait that will define necessary methods. Current code existing in pretty printing module should be used for creating a default implementation of that trait.

Code should be changed (e.g. here

pretty_printing::print_collected_tests_count(
) so it depends on the new PrettyPrinting trait and the implementation should be injected into relevant functions.

@cptartur cptartur converted this from a draft issue Jul 14, 2023
@cptartur cptartur added this to the Forge milestone Jul 14, 2023
@cptartur
Copy link
Member Author

Related #74

@piotmag769
Copy link
Member

Protostar Abstaction 💀

@MaksymilianDemitraszek
Copy link
Member

Why do we need to introduce a new trait? Wouldn't be better to just use Display or sth?

@cptartur
Copy link
Member Author

I don't think Display was designed to be used for that. We just want to decouple multiple possible output types of outputs from the runner code.

@MaksymilianDemitraszek MaksymilianDemitraszek removed this from the Forge milestone Jul 26, 2023
@github-project-automation github-project-automation bot moved this from Triage to Done in Starknet foundry Sep 28, 2023
@cptartur cptartur reopened this Sep 28, 2023
@github-project-automation github-project-automation bot moved this from Done to Triage in Starknet foundry Sep 28, 2023
@cptartur cptartur closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2023
@github-project-automation github-project-automation bot moved this from Triage to Done in Starknet foundry Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Archived in project
Development

No branches or pull requests

3 participants