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

builder: impose argument naming consistency #212

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mathstuf
Copy link
Contributor

Instead of path being the in-archive name in some arguments and the
on-disk name in others, make it so that name is always the in-archive
name and path is always an on-disk name.


It is unfortunate that Builder::append_path_with_name is the only one where the name argument is not before what is being appended like every other method. Is there a new method name that could be used and the current one deprecated to keep consistency there as well. Is it worth it?

@mathstuf mathstuf force-pushed the builder-arg-name-consistency branch 2 times, most recently from 74ced82 to ce34662 Compare October 26, 2019 04:37
@mathstuf
Copy link
Contributor Author

Will rebase on #211 once merged.

@alexcrichton
Copy link
Owner

This is a great idea, thanks for this! I'd be fine using deprecation to rename the method, although nothing jumps to mind per se :(

@mathstuf
Copy link
Contributor Author

append_named_path? That also lets the method name match the argument order.

@alexcrichton
Copy link
Owner

👍

Instead of `path` being the in-archive name in some arguments and the
on-disk name in others, make it so that `name` is always the in-archive
name and `path` is always an on-disk name.
This makes the method use the same "name comes first" argument order
consistency used in all other methods. Deprecate `append_path_with_name`
in favor of it.
@mathstuf mathstuf force-pushed the builder-arg-name-consistency branch from ce34662 to d23dc27 Compare October 28, 2019 15:38
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