-
Notifications
You must be signed in to change notification settings - Fork 8
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 --depth
option
#19
Conversation
removed `--direct-dependencies-only` option, as it is equivalent to `--depth 1`
src/graph/build.rs
Outdated
// Don't add dependencies of dependencies if we're at the depth limit | ||
if depth + 1 < config.depth.unwrap_or(u32::MAX) { | ||
deps_add_queue.push_back((dep.pkg.clone(), depth + 1)); | ||
} |
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.
Thinking more about this, workspace-only seems like a special case of depth
. I don't think it should be removed here in favor of --depth=0
, but I wonder why workspace-only is handled differently than this. If you don't have an answer that's fine, I guess that means I should just revisit this code after merging the PR but before releasing.
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.
While thinking about this i noticed that --depth 0
is actually broken.
I will take a look at this either tomorrow or the day after.
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.
Great, thanks :)
simplified workspace member detection
My new version of To simplify the code and reduce redundancy, we could remove the |
Let's make them mutually exclusive. I think clap supports mutually exclusive arguments somehow (you don't even have to raise an error "by hand"). |
Re. removal of |
You are correct. That also means |
Oh, as in |
Yes. Though i don't see a real usecase of the top of my head, you could even combine it further with |
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
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.
Thanks!
added
--depth
optionremoved
--direct-dependencies-only
option, as it is equivalent to--depth 1