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

feat: Show more numbers in human readable form #790

Merged
merged 2 commits into from
Feb 23, 2023
Merged

Conversation

flub
Copy link
Contributor

@flub flub commented Feb 23, 2023

This shows sizes in KiB, MiB etc. Also adds a few totals and transfer
summaries.

This shows sizes in KiB, MiB etc.  Also adds a few totals and transfer
summaries.
dignifiedquire
dignifiedquire previously approved these changes Feb 23, 2023
Copy link
Contributor

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so human

src/main.rs Outdated
@@ -315,11 +315,20 @@ async fn provide_interactive(

let (db, hash) = provider::create_collection(sources).await?;

println!("Collection: {}\n", Blake3Cid::new(hash));
out_writer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure we want to push all this to stderr? seems to me that this is stdout content for the provider

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, good catch. I'm not sure at all. I guess this is "data" and not progress information so should go to stdout? But like the peer ID, auth token and ticket are also written using to OutWriter, and this seems to fall in that category to me and why I changed this. Are they wrong too?

Also see, https://github.com/n0-computer/iroh/pull/781/files#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fcR319-R327

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they are wrong too, yes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, updated them all to direct println! calls. PTAL

flub added a commit that referenced this pull request Feb 23, 2023
The others are done in #790.
@flub flub merged commit a0b7c26 into main Feb 23, 2023
@flub flub deleted the flub/human-output branch February 23, 2023 18:46
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.

2 participants