-
Notifications
You must be signed in to change notification settings - Fork 105
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
Implemented binary_deps
behind a feature
#407
Conversation
The version of rust in github actions was updated to solve for
|
@acmcarther Can I get you to take a look at this and some other PRs? |
This PR updates the resolver to use a version of `cargo-raze` which does not require any dependencies from the `binary_deps` feature. This should make it much easier and faster to compile. The upstream PR is google/cargo-raze#407
@acmcarther Hey, just pinging this one again 🙏 |
@acmcarther Can you please take a look at this 🙏 |
I'm quite hesitant about feature flags as it makes testing all combinations more difficult. The cli and binary-deps features here seem to bifurcate the codebase. Is the intention is to use cargo-raze as a library, rather than a binary? |
Yes, the intent is to use cargo-raze as a library |
Wider context here is that we're using |
Got it. So the typical approach here would be to pull things out into a Is there was a way for this feature break to happen strictly at a module level? That will probably help with the discussion here. |
How does a large chunk of the planning code change? |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@illicitonion I'll need you to address CLA 🙏 |
@googlebot I consent. |
This PR updates the resolver to use a version of `cargo-raze` which does not require any dependencies from the `binary_deps` feature. This should make it much easier and faster to compile. The upstream PR is google/cargo-raze#407
@dfreese re bazelbuild/rules_rust#415 (comment)
#407 (comment) is me trying to understand what you're saying so I can appropriately assess your module question |
@UebelAndre that wasn't intended to be the main point of that comment, the main thing is that planning.rs and metadata.rs now have two paths #[cfg(feature = "binary_deps")] and #[cfg(not(feature = "binary_deps"))] for quite a number of things. This splits tests and makes it harder to keep track of what any specific code does. If there could be one spot where we could do: #[cfg(feature = "binary_deps")]
mod some_name_for_raze_binary_related_functionality
#[cfg(not(feature = "binary_deps"))]
mod fake_some_name_for_raze_binary_related_functionality as some_name_for_raze_binary_related_functionality; and the rest of the code could remain free of feature gates, that would convince me that this is maintainable within cargo-raze, or that there's a clear set of functionality that can be pulled into a -core or -base crate. edit: formatting |
@dfreese Can you provide a concrete example of this? Specifically, a crate where that was done to test branching behavior in a couple different places within a project? |
Also, I feel so strongly that this feature is just an anti-pattern and should be deleted (#305). It's undefined behavior and something that could probably be solved without requiring this tool to have a built-in solution. It should just be removed. |
The
binary_deps
flag brings in some pretty large dependencies. This PR creates the featurebinary_deps
and wraps all uses of that functionality behind it.Additionally, the feature
cli
was added to have additional control over the dependencies required bycargo-raze
when used as a library.