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

[email protected] - Build using rules_cc vs rules_foreign_cc #3764

Merged
merged 6 commits into from
Feb 10, 2025

Conversation

UebelAndre
Copy link
Contributor

@UebelAndre UebelAndre commented Feb 10, 2025

This has been tested against googlebench:9d8201efd4cbbe6271d0579ec2047dbfc396d22d using the following diff

diff --git a/MODULE.bazel b/MODULE.bazel
index 62a3aa8..107a955 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -12,6 +12,10 @@ bazel_dep(name = "rules_python", version = "1.0.0", dev_dependency = True)
 bazel_dep(name = "googletest", version = "1.14.0", dev_dependency = True, repo_name = "com_google_googletest")

 bazel_dep(name = "libpfm", version = "4.11.0")
+local_path_override(
+    module_name = "libpfm",
+    path = "../libpfm",
+)

 # Register a toolchain for Python 3.9 to be able to build numpy. Python
 # versions >=3.10 are problematic.
~/google_benchmark$ bazel test //test/...
WARNING: For repository 'platforms', the root module requires module version [email protected], but got [email protected] in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'rules_cc', the root module requires module version [email protected], but got [email protected] in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
WARNING: For repository 'com_google_googletest', the root module requires module version [email protected], but got [email protected] in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
INFO: Analyzed 44 targets (1 packages loaded, 105 targets configured).
INFO: Found 1 target and 43 test targets...
INFO: Elapsed time: 21.765s, Critical Path: 19.76s
INFO: 285 processes: 5 action cache hit, 101 internal, 184 linux-sandbox.
INFO: Build completed successfully, 285 total actions
//test:args_product_test                                                 PASSED in 0.3s
//test:basic_test                                                        PASSED in 1.3s
//test:benchmark_gtest                                                   PASSED in 0.1s
//test:benchmark_min_time_flag_iters_test                                PASSED in 0.1s
//test:benchmark_min_time_flag_time_test                                 PASSED in 17.0s
//test:benchmark_name_gtest                                              PASSED in 0.0s
//test:benchmark_random_interleaving_gtest                               PASSED in 0.1s
//test:benchmark_setup_teardown_test                                     PASSED in 0.1s
//test:benchmark_test                                                    PASSED in 5.8s
//test:commandlineflags_gtest                                            PASSED in 0.0s
//test:complexity_test                                                   PASSED in 3.5s
//test:cxx03_test                                                        PASSED in 7.9s
//test:diagnostics_test                                                  PASSED in 0.1s
//test:display_aggregates_only_test                                      PASSED in 0.1s
//test:donotoptimize_test                                                PASSED in 0.1s
//test:filter_test                                                       PASSED in 0.2s
//test:fixture_test                                                      PASSED in 0.1s
//test:internal_threading_test                                           PASSED in 1.9s
//test:link_main_test                                                    PASSED in 0.9s
//test:map_test                                                          PASSED in 0.3s
//test:memory_manager_test                                               PASSED in 0.1s
//test:min_time_parse_gtest                                              PASSED in 0.6s
//test:multiple_ranges_test                                              PASSED in 0.5s
//test:options_test                                                      PASSED in 5.3s
//test:perf_counters_gtest                                               PASSED in 0.1s
//test:perf_counters_test                                                PASSED in 0.1s
//test:profiler_manager_gtest                                            PASSED in 0.2s
//test:profiler_manager_iterations_test                                  PASSED in 0.1s
//test:profiler_manager_test                                             PASSED in 0.1s
//test:register_benchmark_test                                           PASSED in 0.2s
//test:repetitions_test                                                  PASSED in 0.2s
//test:report_aggregates_only_test                                       PASSED in 0.2s
//test:reporter_output_test                                              PASSED in 0.9s
//test:skip_with_error_test                                              PASSED in 0.4s
//test:spec_arg_test                                                     PASSED in 0.1s
//test:spec_arg_verbosity_test                                           PASSED in 0.1s
//test:statistics_gtest                                                  PASSED in 0.1s
//test:string_util_gtest                                                 PASSED in 0.1s
//test:templated_fixture_test                                            PASSED in 0.1s
//test:time_unit_gtest                                                   PASSED in 0.1s
//test:user_counters_tabular_test                                        PASSED in 0.8s
//test:user_counters_test                                                PASSED in 0.6s
//test:user_counters_thousands_test                                      PASSED in 0.2s

Executed 43 out of 43 tests: 43 tests pass.

relates to bazelbuild/bazel#24871

@bazel-io
Copy link
Member

Hello @bazelbuild/bcr-maintainers, modules without existing maintainers (libpfm) have been updated in this PR.
Please review the changes. You can view a diff against the previous version in the "Generate module diff" check.

@UebelAndre UebelAndre marked this pull request as ready for review February 10, 2025 14:56
@meteorcloudy meteorcloudy added the presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval label Feb 10, 2025
meteorcloudy
meteorcloudy previously approved these changes Feb 10, 2025
Copy link
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

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

Thanks!

@UebelAndre
Copy link
Contributor Author

@meteorcloudy I do not understand this error
https://buildkite.com/bazel/bcr-presubmit/builds/10613#0194f094-b6fb-4b8a-a3ce-2554bec6fa96

BcrValidationResult.FAILED: Checked in MODULE.bazel file doesn't match the one in the extracted and patched sources.
Please fix the MODULE.bazel file or you can add the following patch to [email protected]:
    --- MODULE.bazel
    +++ MODULE.bazel
    @@ -0,0 +1,8 @@
    +module(
    +    name = "libpfm",
    +    version = "4.11.0.bcr.1",
    +    compatibility_level = 1,
    +)
    +
    +bazel_dep(name = "platforms", version = "0.0.11")
    +bazel_dep(name = "rules_cc", version = "0.0.17")

The patch file generating the MODULE.bazel file should be producing an identical MODULE.bazel to what's in this PR.

diff -u libpfm/MODULE.bazel bazel-central-registry/modules/libpfm/4.11.0.bcr.1/MODULE.bazel ; echo "$?"
# 0

@bazel-io bazel-io dismissed meteorcloudy’s stale review February 10, 2025 16:10

Require module maintainers' approval for newly pushed changes.

meteorcloudy
meteorcloudy previously approved these changes Feb 10, 2025
@bazel-io bazel-io dismissed meteorcloudy’s stale review February 10, 2025 16:12

Require module maintainers' approval for newly pushed changes.

@meteorcloudy meteorcloudy enabled auto-merge (squash) February 10, 2025 16:14
@meteorcloudy meteorcloudy merged commit 7f69fe3 into bazelbuild:main Feb 10, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
presubmit-auto-run Presubmit jobs will be triggered for new changes automatically without reviewer's approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants