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

Encapsulate rust toolchain details behind a depset with all inputs #843

Open
hlopko opened this issue Jul 19, 2021 · 1 comment
Open

Encapsulate rust toolchain details behind a depset with all inputs #843

hlopko opened this issue Jul 19, 2021 · 1 comment

Comments

@hlopko
Copy link
Member

hlopko commented Jul 19, 2021

Right now, rust_toolchain has many simple fields that return rustc binary, rustc_lib files, C++ toolchain files, rust stdlib files, or with #836 also target json file.

AFAIK there is not a good reason why we need these fine grained artifacts. It will be more convenient to use and more backward-compatibility-friendly to expose one "all inputs relevant to compilations" depset that contains all users need. What's even better is that Bazel can save a bit of memory by reusing this single depset instead of creating slightly duplicated ones.

@hlopko
Copy link
Member Author

hlopko commented Jul 19, 2021

Oh one more detail - the way inputs for rustc action, rustdoc action, and cargo build script action are computed is slightly different in each of them, very likely unintentionally. Another reason to provide a better API.

@hlopko hlopko mentioned this issue Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant