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

[6.2.0]Expose cc_proto_aspect as a toplevel symbol. #17980

Merged
merged 7 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public void init(ConfiguredRuleClassProvider.Builder builder) {
GraphNodeAspect graphNodeAspect = new GraphNodeAspect();
builder.addConfigurationFragment(CppConfiguration.class);
builder.addStarlarkAccessibleTopLevels("CcSharedLibraryInfo", Starlark.NONE);
builder.addStarlarkAccessibleTopLevels("cc_proto_aspect", Starlark.NONE);
builder.addBuildInfoFactory(new CppBuildInfo());

builder.addNativeAspectClass(graphNodeAspect);
Expand Down
2 changes: 1 addition & 1 deletion src/main/starlark/builtins_bzl/bazel/exports.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
load("@_builtins//:common/java/java_library.bzl", "java_library")
load("@_builtins//:common/java/java_plugin.bzl", "java_plugin")
load("@_builtins//:common/java/proto/java_proto_library.bzl", "java_proto_library")
load("@_builtins//:common/cc/cc_proto_library.bzl", "cc_proto_library")
load("@_builtins//:common/cc/cc_proto_library.bzl", "cc_proto_aspect", "cc_proto_library")

exported_toplevels = {}
keertk marked this conversation as resolved.
Show resolved Hide resolved
exported_rules = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _aspect_impl(target, ctx):
providers.append(header_provider)
return providers

_cc_proto_aspect = aspect(
cc_proto_aspect = aspect(
implementation = _aspect_impl,
attr_aspects = ["deps"],
fragments = ["cpp", "proto"],
Expand Down Expand Up @@ -290,7 +290,7 @@ cc_proto_library = rule(
implementation = _impl,
attrs = {
"deps": attr.label_list(
aspects = [_cc_proto_aspect],
aspects = [cc_proto_aspect],
allow_rules = ["proto_library"],
allow_files = False,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class CcProtoLibraryTest extends BuildViewTestCase {
private final StarlarkAspectClass starlarkCcProtoAspect =
new StarlarkAspectClass(
Label.parseAbsoluteUnchecked("@_builtins//:common/cc/cc_proto_library.bzl"),
"_cc_proto_aspect");
"cc_proto_aspect");

@Before
public void setUp() throws Exception {
Expand Down