Skip to content

Add resource_set attr to all expensive rules #3474

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

illicitonion
Copy link
Collaborator

This allows better control over resource usage for expensive rules in resource-constrained systems.

This allows better control over resource usage for expensive rules in
resource-constrained systems.
@sebas-zip
Copy link

this is an awesome feature. Thank you for implementing it. Do these documents get automagically updated when you change the API like this?
https://bazelbuild.github.io/rules_rust/rust.html

A doc test example would go a long way in explaining how to use it.

@illicitonion
Copy link
Collaborator Author

this is an awesome feature. Thank you for implementing it. Do these documents get automagically updated when you change the API like this? https://bazelbuild.github.io/rules_rust/rust.html

A doc test example would go a long way in explaining how to use it.

Yeah, they get updated on release :) with any luck we can get this merged soon and then release with #3473

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this attribute not associated with a deprecated flag?
bazelbuild/bazel#24934

@@ -16,6 +16,7 @@ bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_shell", version = "0.3.0")
bazel_dep(name = "apple_support", version = "1.17.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "aspect_bazel_lib", version = "2.19.4")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to pull in this dependency? Could we instead add the attribute directly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could vendor this whole file if we preferred: https://github.com/bazel-contrib/bazel-lib/blob/main/lib/resource_sets.bzl - I don't have a strong preference, WDYT?

@illicitonion
Copy link
Collaborator Author

Is this attribute not associated with a deprecated flag? bazelbuild/bazel#24934

I followed up - the flag is deprecated because the feature is now always-on, so the flag can no longer be used to disable it :) deprecated-because-stabilised rather than deprecated-because-becoming-unsupported

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

Successfully merging this pull request may close these issues.

3 participants