-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add resolve & link progress bars #145
Conversation
let pb_style = ProgressStyle::default_bar() | ||
.template("💾 {bar:40} [{pos}/{len}] {wide_msg}") | ||
.unwrap(); | ||
let pb = ProgressBar::new(self.graph.inner.edge_count() as u64).with_style(pb_style); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 things:
- Anywhere that we use
indicatif
should only do things on non-wasm32, and should be conditionalized appropriately. - There should be a configuration, through
NodeMaintainerOptions
, that configures whether or not progress bars should be shown. This should default to false (because the default assumption is for node-maintainer to be used as a plain library without unwanted output)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully achieved what you meant here:
ed6711d
If it's way too ugly please let me know!
50afeaf
to
36affb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good now! And this resolves #156
Thanks again for all this! 🎉 |
Summary
This PR adds a progress bar to resolve & link steps (so
oro resolve
will only show one, andoro restore
will show both).For both - the progress bar's length is the expected edge count on the dependency graph.
For linking - we increase the progress for each dependency we link, and then call
finish
to round it up to the actual edge count, so while we don't link each edge necessarily, the progress bar will count those in, wasn't sure that's desired or not.Screen.Recording.2023-02-24.at.22.38.33.mov
This is very basic and naive, feedback is very welcome!