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

[Bazel CI] Error: no native function or rule 'py_test' #255

Open
sgowroji opened this issue Oct 14, 2024 · 1 comment
Open

[Bazel CI] Error: no native function or rule 'py_test' #255

sgowroji opened this issue Oct 14, 2024 · 1 comment

Comments

@sgowroji
Copy link
Member

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4198#01928934-6200-4035-af00-d045db026e38

Platform: Windows

Logs:

 ERROR: Traceback (most recent call last):
	File "C:/b/4pbbpba4/external/protobuf+/java/core/BUILD.bazel", line 221, column 15, in <toplevel>
		staleness_test(
	File "C:/b/4pbbpba4/external/protobuf+/upb/cmake/build_defs.bzl", line 49, column 11, in staleness_test
		native.py_test(
Error: no native function or rule 'py_test'
Available attributes: action_listener, alias, available_xcodes, cc_binary, cc_import, cc_libc_top_alias, cc_library, cc_proto_library, cc_shared_library, cc_static_library, cc_test, cc_toolchain, cc_toolchain_alias, cc_toolchain_suite, config_feature_flag, config_setting, constraint_setting, constraint_value, environment, existing_rule, existing_rules, exports_files, extra_action, fdo_prefetch_hints, fdo_profile, filegroup, genquery, genrule, glob, java_binary, java_import, java_library, java_lite_proto_library, java_package_configuration, java_plugin, java_plugins_flag_alias, java_proto_library, java_runtime, java_test, java_toolchain, label_flag, label_setting, legacy_globals, memprof_profile, module_name, module_version, objc_import, objc_library, package, package_group, package_name, package_relative_label, platform, propeller_optimize, proto_lang_toolchain, proto_library, repo_name, repository_name, starlark_doc_extract, subpackages, test_suite, toolchain, toolchain_type, xcode_config, xcode_config_alias, xcode_version
(04:10:35) ERROR: C:/b/4pbbpba4/external/protobuf+/java/core/BUILD.bazel: no such target '@@protobuf+//java/core:toolchain': target 'toolchain' not declared in package 'java/core' defined by C:/b/4pbbpba4/external/protobuf+/java/core/BUILD.bazel
(04:10:35) ERROR: C:/b/4pbbpba4/external/protobuf+/BUILD.bazel:359:6: no such target '@@protobuf+//java/core:toolchain': target 'toolchain' not declared in package 'java/core' defined by C:/b/4pbbpba4/external/protobuf+/java/core/BUILD.bazel and referenced by '@@protobuf+//:java_toolchain'
(04:10:36) ERROR: Analysis of target '//stardoc/proto:stardoc_output_java_proto' failed; build aborted: Analysis failed

Culprit:

Steps:

git clone https://github.com/bazelbuild/stardoc
git reset 2ac0981b7c35ff46cf66cc92467c37411c7bfacc  --hard
export USE_BAZEL_VERSION=00fdb673ba8276e83f1c821a7f93aab7038377e2 

CC Greenteam @meteorcloudy

@brentleyjones
Copy link

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