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

Cannot use rust_shared_library as a dependency of rust_library_group #3204

Closed
ashi009 opened this issue Jan 25, 2025 · 4 comments
Closed

Cannot use rust_shared_library as a dependency of rust_library_group #3204

ashi009 opened this issue Jan 25, 2025 · 4 comments

Comments

@ashi009
Copy link

ashi009 commented Jan 25, 2025

ERROR: <redacted>/proj2/wasm/BUILD.bazel:8:19: in deps attribute of rust_library_group rule //proj2/wasm:_normal_deps: '//proj1/wasm:wasm' does not have mandatory providers: 'CrateGroupInfo' or 'CrateInfo'

However, it's ok to put this target under the deps of another rust_shared_library

@UebelAndre
Copy link
Collaborator

I think this is by design. rust_library_group is supposed to represent a collection of rusr_library targets (e.g. targets that produce rlib files) where rust_shared_library produces dynamic lib files and tends to be an output from rust into other languages. That’s why the rule doesn’t return these providers.

@ashi009
Copy link
Author

ashi009 commented Jan 25, 2025 via email

@UebelAndre
Copy link
Collaborator

Yeah, I would recommend that if you wanted to share the code.

@UebelAndre
Copy link
Collaborator

Gonna close this out for now since the behavior is currently expected.

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

No branches or pull requests

2 participants