From 7615691331c8c3738de0b8706ca8df55d08adfb0 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Wed, 11 Dec 2024 08:10:24 -0800 Subject: [PATCH] Enable bindgen tests for windows --- .bazelci/presubmit.yml | 26 ++++++++++++-------------- .bcr/extensions/bindgen/presubmit.yml | 3 +-- extensions/bindgen/private/bindgen.bzl | 7 +++++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 0f3508d10e..f136b72571 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -918,20 +918,18 @@ tasks: - "//..." test_targets: - "//..." - # # TODO: https://github.com/bazelbuild/rules_rust/issues/2009 - # # The bindgen rules are currently broken on windows - # extensions_bindgen_windows: - # platform: windows - # name: Extensions Bindgen - # working_directory: extensions/bindgen - # build_flags: *aspects_flags - # test_flags: *aspects_flags - # build_targets: - # - "--" - # - "//..." - # test_targets: - # - "--" - # - "//..." + extensions_bindgen_windows: + platform: windows + name: Extensions Bindgen + working_directory: extensions/bindgen + build_flags: *aspects_flags + test_flags: *aspects_flags + build_targets: + - "--" + - "//..." + test_targets: + - "--" + - "//..." extensions_mdbook_linux: platform: ubuntu2004 name: Extensions MdBook diff --git a/.bcr/extensions/bindgen/presubmit.yml b/.bcr/extensions/bindgen/presubmit.yml index 444128f3d8..55375bc09b 100644 --- a/.bcr/extensions/bindgen/presubmit.yml +++ b/.bcr/extensions/bindgen/presubmit.yml @@ -4,8 +4,7 @@ bcr_test_module: platform: - "macos_arm64" - "ubuntu2004" - # # TODO: https://github.com/bazelbuild/rules_rust/issues/2009 - # - "windows" + - "windows" bazel: ["7.x"] tasks: run_tests: diff --git a/extensions/bindgen/private/bindgen.bzl b/extensions/bindgen/private/bindgen.bzl index d047331a6b..68c24bcbe6 100644 --- a/extensions/bindgen/private/bindgen.bzl +++ b/extensions/bindgen/private/bindgen.bzl @@ -130,7 +130,7 @@ def _get_user_link_flags(cc_lib): return linker_flags def _generate_cc_link_build_info(ctx, cc_lib): - """Produce the eqivilant cargo_build_script providers for use in linking the library. + """Produce the equivalent cargo_build_script providers for use in linking the library. Args: ctx (ctx): The rule's context object @@ -391,7 +391,10 @@ rust_bindgen = rule( default = True, ), "wrap_static_fns": attr.bool( - doc = "Whether to create a separate .c file for static fns. Requires nightly toolchain, and a header that actually needs this feature (otherwise bindgen won't generate the file and Bazel complains).", + doc = ( + "Whether to create a separate .c file for static functions. Requires nightly toolchain, " + + "and a header that actually needs this feature (otherwise bindgen won't generate the file and Bazel complains)." + ), default = False, ), "_process_wrapper": attr.label(