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

Add -a, --all flag to garbage command #118

Merged
merged 1 commit into from
Aug 13, 2018

Conversation

userzimmermann
Copy link
Contributor

And here it is: The first --all flag according to #109 :)

I also added some new twiggy garbage tests for the new flag, based on fixtures/wee_alloc.wasm, since fixtures/garbage.wasm unfortunately only produces 9 items, but -n <max_items> defaults to 10 :D

And extend tests accordingly

Relates to rustwasm#109
}

/// Set the maximum number of items to display.
pub fn set_max_items(&mut self, max: u32) {
self.max_items = max;
self.all_items = false;
Copy link
Member

Choose a reason for hiding this comment

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

Good catch here 😸

"json",
"-a"
);

Copy link
Member

Choose a reason for hiding this comment

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

Nice job adding these tests as well!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Testing is the most important ;)

@data-pup
Copy link
Member

LGTM! Nice work @userzimmermann! 😸 I see you've also started out on #120, that's awesome! Unless @fitzgen has any other input, I think this can be merged.

@fitzgen
Copy link
Member

fitzgen commented Aug 13, 2018

Unless @fitzgen has any other input, I think this can be merged.

If it gets your approval stamp, that is all I need to know :)

@fitzgen fitzgen merged commit cdbee30 into rustwasm:master Aug 13, 2018
@userzimmermann
Copy link
Contributor Author

Thx for nice feedback @data-pup @fitzgen! And approving, merging, etc :) Just right after you merged, it came to my mind that the ...top_10... expectations should be better named like ...default_10... or so :D to better understand what they are actually about... What do you think? Worth some extra PR? ;)

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.

3 participants