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

Rename cc_common_internal_do_not_use back to cc_common #18849

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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 @@ -113,7 +113,7 @@ public void init(ConfiguredRuleClassProvider.Builder builder) {
builder.addStarlarkBuiltinsInternal("MemProfProfileInfo", MemProfProfileProvider.PROVIDER);
builder.addStarlarkBuiltinsInternal(
"PackageSpecificationInfo", PackageGroupConfiguredTarget.PROVIDER);
builder.addStarlarkBuiltinsInternal("cc_common_internal_do_not_use", bazelCcModule);
builder.addStarlarkBuiltinsInternal("cc_common", bazelCcModule);
builder.addStarlarkBootstrap(
new CcBootstrap(
bazelCcModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/** Utilites related to C++ support. */
@StarlarkBuiltin(
name = "cc_common_internal_do_not_use",
name = "cc_common",
category = DocCategory.TOP_LEVEL_MODULE,
doc = "Utilities for C++ compilation, linking, and command line generation.")
public interface BazelCcModuleApi<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

/** Utilites related to C++ support. */
@StarlarkBuiltin(
name = "cc_common_internal_do_not_use",
name = "cc_common",
category = DocCategory.TOP_LEVEL_MODULE,
doc = "Utilities for C++ compilation, linking, and command line generation.")
public interface CcModuleApi<
Expand Down
2 changes: 1 addition & 1 deletion src/main/starlark/builtins_bzl/common/cc/cc_common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
load(":common/cc/cc_info.bzl", "CcInfo")
load(":common/cc/cc_shared_library_hint_info.bzl", "CcSharedLibraryHintInfo")

cc_common_internal = _builtins.internal.cc_common_internal_do_not_use
cc_common_internal = _builtins.internal.cc_common
CcNativeLibraryInfo = _builtins.internal.CcNativeLibraryInfo

# buildifier: disable=name-conventions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8136,7 +8136,7 @@ public void testCheckPrivateApiCanOnlyBeCalledFromCcCommonBzl() throws Exception
scratch.file(
"foo/custom_rule.bzl",
"def _impl(ctx):",
" cc_common_internal_do_not_use.check_private_api(allowlist = [])",
" cc_common.check_private_api(allowlist = [])",
" return []",
"custom_rule = rule(",
" implementation = _impl,",
Expand All @@ -8145,7 +8145,7 @@ public void testCheckPrivateApiCanOnlyBeCalledFromCcCommonBzl() throws Exception
AssertionError e =
assertThrows(AssertionError.class, () -> getConfiguredTarget("//foo:custom"));

assertThat(e).hasMessageThat().contains("name 'cc_common_internal_do_not_use' is not defined");
assertThat(e).hasMessageThat().contains("'struct' value has no field or method 'check_private_api'");
}

@Test
Expand Down
Loading