-
Notifications
You must be signed in to change notification settings - Fork 449
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
Fix crate deps with condition #1901
Conversation
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! Is this something you'd be able to add an integration test for at https://github.com/bazelbuild/rules_rust/tree/0.19.1/examples/crate_universe? I thought the alias example there would have caught an issue like this but it's clearly lacking. Could you update this so we don't have aliases break again in the future?
sure I'll add it. but sorry for the confusion I think we still need some polish to this PR #1880 (comment) |
@UebelAndre I think I made some progress, and got a new error
any suggestions where to go next step? |
@UebelAndre sorry i wasn't able to make any progress. do you have any suggestions? |
for condition, deps in dependencies.items(): | ||
crate_deps += selects.with_or({_CONDITIONS[condition]: deps.values()}) |
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.
For deps
since it's a list, it could be done a bit simpler with selects.with_or
without for-loop
- crate_deps += selects.with_or({_CONDITIONS[condition]: deps.values()})
+ crate_deps += selects.with_or({tuple(_CONDITIONS[condition]): deps.values()})
I've got to the same issue with my small research on this topic. It looks like the problem is |
Hey! So sorry, this one fell off my radar, thanks for the ping. If you can add a small integration-test/example to this PR I can find some time to context shift to this issue. I think it'd be fine to process more in Rust vs Starlark. The thing I care most about is that issues are easy to identify and to be honest the current implementation fails at that. Simplifying this without changing the interface sounds amazing to me 😄 |
Since I've spent some time tinkering on |
Fixed #1880