From cf0157f731ec2770b7c7b27db46d589a06b159e0 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 15 Mar 2026 14:14:02 +0100 Subject: [PATCH 01/19] Add Windows CI support (#221) - Add windows-latest to Bazel test, failure test, and integration test matrices - Use --enable_platform_specific_config for platform-specific C++ flags - MSVC uses /std:c++17 instead of -std=c++17 - Add shell: bash to CI steps for cross-platform compatibility Co-Authored-By: Claude Opus 4.6 --- .bazelrc | 13 ++++++++++--- .github/workflows/ci.yaml | 28 ++++++++++++++++++---------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.bazelrc b/.bazelrc index 23f38f7..a08f347 100644 --- a/.bazelrc +++ b/.bazelrc @@ -3,15 +3,22 @@ # Use Bzlmod for dependency management common --enable_bzlmod +# Auto-select platform config (linux/macos/windows) +common --enable_platform_specific_config + # Python configuration build --incompatible_default_to_explicit_init_py # Test output test --test_output=errors -# C++ configuration -build --cxxopt=-std=c++17 -build --host_cxxopt=-std=c++17 +# C++ configuration (platform-specific) +build:linux --cxxopt=-std=c++17 +build:linux --host_cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 +build:windows --cxxopt=/std:c++17 +build:windows --host_cxxopt=/std:c++17 # Java configuration - use Java 17 for records support build --java_language_version=17 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4a5e998..6fa811f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,7 +39,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] bazel-version: ["7.x", "8.x", "9.x"] steps: - name: Checkout code @@ -57,11 +57,13 @@ jobs: bazel-${{ matrix.os }}- - name: Run Bazel tests + shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} run: bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors - name: Build all targets + shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} run: bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... @@ -87,8 +89,11 @@ jobs: run: bazel build --config=ci --config=typecheck --repository_cache="$HOME/.cache/bazel-repo" //... failure-tests: - name: Run Failure Tests - runs-on: ubuntu-latest + name: Failure Tests (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] steps: - name: Checkout code uses: actions/checkout@v4 @@ -99,19 +104,21 @@ jobs: path: | ~/.cache/bazel-repo-failure ~/.cache/bazelisk - key: bazel-failure-tests-ubuntu-latest-${{ hashFiles('MODULE.bazel.lock') }} + key: bazel-failure-tests-${{ matrix.os }}-${{ hashFiles('MODULE.bazel.lock') }} restore-keys: | - bazel-failure-tests-ubuntu-latest- + bazel-failure-tests-${{ matrix.os }}- - name: Run failure tests + shell: bash run: | ./fire/starlark/failure_test/run_failure_tests.sh integration-test: - name: Integration Test (Python ${{ matrix.python-version }}) - runs-on: ubuntu-latest + name: Integration Test (Python ${{ matrix.python-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} strategy: matrix: + os: [ubuntu-latest, windows-latest] python-version: ["3.10", "3.11", "3.12", "3.13"] steps: - name: Checkout code @@ -123,12 +130,13 @@ jobs: path: | ~/.cache/bazel-repo ~/.cache/bazelisk - key: bazel-integration-py${{ matrix.python-version }}-${{ hashFiles('integration_test/MODULE.bazel.lock') }} + key: bazel-integration-${{ matrix.os }}-py${{ matrix.python-version }}-${{ hashFiles('integration_test/MODULE.bazel.lock') }} restore-keys: | - bazel-integration-py${{ matrix.python-version }}- - bazel-integration- + bazel-integration-${{ matrix.os }}-py${{ matrix.python-version }}- + bazel-integration-${{ matrix.os }}- - name: Run integration test + shell: bash run: | cd integration_test ./run.sh --python-version ${{ matrix.python-version }} From 4c0a56e10251f1cc5b2d11e0ae4357cc986d1263 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Tue, 17 Mar 2026 21:35:05 +0100 Subject: [PATCH 02/19] Fix Windows CI: remove shell wrappers, skip Rust on Windows - Replace bash wrapper script in requirements.bzl with --output flag on the Python validation script (fixes CreateProcessW .sh error) - Add target_compatible_with to Rust targets to skip on Windows (rules_rust process_wrapper linking fails on Windows) Co-Authored-By: Claude Opus 4.6 --- examples/BUILD.bazel | 16 ++++++++++++++++ fire/starlark/requirements.bzl | 19 ++++--------------- fire/starlark/validate_cross_references.py | 10 ++++++++-- integration_test/BUILD.bazel | 4 ++++ integration_test/consumer/BUILD.bazel | 4 ++++ 5 files changed, 36 insertions(+), 17 deletions(-) diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 92bfe3f..545bfd3 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -109,6 +109,10 @@ generate_rust_parameters( rust_library( name = "vehicle_params_rs", srcs = [":vehicle_params_rs_src"], + target_compatible_with = select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), ) # Second Rust library @@ -120,6 +124,10 @@ generate_rust_parameters( rust_library( name = "vehicle_params_rs_alt", srcs = [":vehicle_params_rs_alt_src"], + target_compatible_with = select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), ) # C++ tests @@ -176,6 +184,10 @@ rust_test( name = "vehicle_params_rust_test", srcs = ["vehicle_params_test.rs"], crate_root = "vehicle_params_test.rs", + target_compatible_with = select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [":vehicle_params_rs"], ) @@ -183,6 +195,10 @@ rust_test( name = "vehicle_params_rust_alt_test", srcs = ["vehicle_params_alt_test.rs"], crate_root = "vehicle_params_alt_test.rs", + target_compatible_with = select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = [":vehicle_params_rs_alt"], ) diff --git a/fire/starlark/requirements.bzl b/fire/starlark/requirements.bzl index f9a3214..67303af 100644 --- a/fire/starlark/requirements.bzl +++ b/fire/starlark/requirements.bzl @@ -13,6 +13,7 @@ def _validate_requirements_impl(ctx): # Build arguments list args = ctx.actions.args() args.add(workspace_root) + args.add("--output", output.path) args.add("--allowed-deps") # Add allowed dependency paths (short_path format) @@ -27,27 +28,15 @@ def _validate_requirements_impl(ctx): for src in ctx.files.srcs: args.add(src.short_path) - # Create a wrapper script that runs the validator and touches the output - wrapper_script = ctx.actions.declare_file(ctx.label.name + "_wrapper.sh") - ctx.actions.write( - output = wrapper_script, - content = """#!/bin/bash -"$@" && touch {output} -""".format(output = output.path), - is_executable = True, - ) - # Get runfiles for the script script_runfiles = ctx.attr._script[DefaultInfo].default_runfiles.files.to_list() - # Run validation script - # Note: We need to disable sandbox or make all potential reference targets available + # Run validation script directly (no shell wrapper needed) ctx.actions.run( inputs = ctx.files.srcs + ctx.files.deps + script_runfiles, outputs = [output], - executable = wrapper_script, - arguments = [script.path, args], - tools = [script], + executable = script, + arguments = [args], mnemonic = "ValidateRequirements", progress_message = "Validating cross-references in %s" % ctx.label.name, use_default_shell_env = True, diff --git a/fire/starlark/validate_cross_references.py b/fire/starlark/validate_cross_references.py index c7980e4..81b4130 100755 --- a/fire/starlark/validate_cross_references.py +++ b/fire/starlark/validate_cross_references.py @@ -14,6 +14,7 @@ """ import os +import pathlib import re import sys @@ -517,6 +518,9 @@ def main(): parser.add_argument( "--allowed-deps", nargs="*", default=None, help="Allowed dependency file paths" ) + parser.add_argument( + "--output", default=None, help="Marker file to create on success" + ) parser.add_argument( "requirement_files", nargs="+", help="Requirement files to validate" ) @@ -539,8 +543,10 @@ def main(): for error in all_errors: print(f" ERROR: {error}") sys.exit(1) - else: - sys.exit(0) + + if args.output: + pathlib.Path(args.output).touch() + sys.exit(0) if __name__ == "__main__": diff --git a/integration_test/BUILD.bazel b/integration_test/BUILD.bazel index 80e3a6f..24700d9 100644 --- a/integration_test/BUILD.bazel +++ b/integration_test/BUILD.bazel @@ -40,6 +40,10 @@ generate_rust_parameters( rust_library( name = "test_params_rs", srcs = [":test_params_rs_src"], + target_compatible_with = select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), visibility = ["//visibility:public"], ) diff --git a/integration_test/consumer/BUILD.bazel b/integration_test/consumer/BUILD.bazel index 5f86708..dac65de 100644 --- a/integration_test/consumer/BUILD.bazel +++ b/integration_test/consumer/BUILD.bazel @@ -23,6 +23,10 @@ rust_test( name = "test_rust_test", srcs = ["test_rust.rs"], crate_root = "test_rust.rs", + target_compatible_with = select({ + "@platforms//os:windows": ["@platforms//:incompatible"], + "//conditions:default": [], + }), deps = ["//:test_params_rs"], ) From 06ded04001cd2d97faa5a5a5d69a52a5f561b227 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Tue, 17 Mar 2026 21:47:00 +0100 Subject: [PATCH 03/19] Add platforms bazel_dep for target_compatible_with select() Required for @platforms//os:windows repo mapping in Bzlmod. Co-Authored-By: Claude Opus 4.6 --- MODULE.bazel | 1 + MODULE.bazel.lock | 172 ++++++++++++++++++++++++- integration_test/MODULE.bazel.template | 1 + 3 files changed, 170 insertions(+), 4 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 8562f46..22ebb7e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -4,6 +4,7 @@ module( compatibility_level = 3, ) +bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "rules_python", version = "1.8.5") bazel_dep(name = "bazel_skylib", version = "1.9.0") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 5995d5d..e8e8af2 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -60,8 +60,9 @@ "https://bcr.bazel.build/modules/bazel_features/1.32.0/MODULE.bazel": "095d67022a58cb20f7e20e1aefecfa65257a222c18a938e2914fd257b5f1ccdc", "https://bcr.bazel.build/modules/bazel_features/1.33.0/MODULE.bazel": "8b8dc9d2a4c88609409c3191165bccec0e4cb044cd7a72ccbe826583303459f6", "https://bcr.bazel.build/modules/bazel_features/1.36.0/MODULE.bazel": "596cb62090b039caf1cad1d52a8bc35cf188ca9a4e279a828005e7ee49a1bec3", - "https://bcr.bazel.build/modules/bazel_features/1.36.0/source.json": "279625cafa5b63cc0a8ee8448d93bc5ac1431f6000c50414051173fd22a6df3c", "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", + "https://bcr.bazel.build/modules/bazel_features/1.42.1/MODULE.bazel": "275a59b5406ff18c01739860aa70ad7ccb3cfb474579411decca11c93b951080", + "https://bcr.bazel.build/modules/bazel_features/1.42.1/source.json": "fcd4396b2df85f64f2b3bb436ad870793ecf39180f1d796f913cc9276d355309", "https://bcr.bazel.build/modules/bazel_features/1.9.0/MODULE.bazel": "885151d58d90d8d9c811eb75e3288c11f850e1d6b481a8c9f766adee4712358b", "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", "https://bcr.bazel.build/modules/bazel_lib/3.0.0-beta.1/MODULE.bazel": "407729e232f611c3270005b016b437005daa7b1505826798ea584169a476e878", @@ -85,8 +86,8 @@ "https://bcr.bazel.build/modules/bazel_skylib/1.9.0/source.json": "7ad77c1e8c1b84222d9b3f3cae016a76639435744c19330b0b37c0a3c9da7dc0", "https://bcr.bazel.build/modules/buildifier_prebuilt/6.4.0/MODULE.bazel": "37389c6b5a40c59410b4226d3bb54b08637f393d66e2fa57925c6fcf68e64bf4", "https://bcr.bazel.build/modules/buildifier_prebuilt/6.4.0/source.json": "83eb01b197ed0b392f797860c9da5ed1bf95f4d0ded994d694a3d44731275916", - "https://bcr.bazel.build/modules/buildozer/8.2.1/MODULE.bazel": "61e9433c574c2bd9519cad7fa66b9c1d2b8e8d5f3ae5d6528a2c2d26e68d874d", - "https://bcr.bazel.build/modules/buildozer/8.2.1/source.json": "7c33f6a26ee0216f85544b4bca5e9044579e0219b6898dd653f5fb449cf2e484", + "https://bcr.bazel.build/modules/buildozer/8.5.1/MODULE.bazel": "a35d9561b3fc5b18797c330793e99e3b834a473d5fbd3d7d7634aafc9bdb6f8f", + "https://bcr.bazel.build/modules/buildozer/8.5.1/source.json": "e3386e6ff4529f2442800dee47ad28d3e6487f36a1f75ae39ae56c70f0cd2fbd", "https://bcr.bazel.build/modules/download_utils/1.0.1/MODULE.bazel": "f1d0afade59e37de978506d6bbf08d7fe5f94964e86944aaf58efcead827b41b", "https://bcr.bazel.build/modules/download_utils/1.0.1/source.json": "05ddc5a3b1f7d8f3e5e0fd1617479e1cf72d63d59ab2b1f0463557a14fc6be0a", "https://bcr.bazel.build/modules/gawk/5.3.2.bcr.1/MODULE.bazel": "cdf8cbe5ee750db04b78878c9633cc76e80dcf4416cbe982ac3a9222f80713c8", @@ -299,6 +300,70 @@ }, "selectedYankedVersions": {}, "moduleExtensions": { + "@@aspect_rules_js+//npm:extensions.bzl%pnpm": { + "general": { + "bzlTransitiveDigest": "24JpfYFjgYeaT0/kcKXYFGbair5/e+RUAbs/xo2si3g=", + "usagesDigest": "ZYGEy1FrDUNPBzAzD+ujlHkMEsVPMYOvpHm9RhUexUE=", + "recordedInputs": [ + "REPO_MAPPING:aspect_bazel_lib+,bazel_skylib bazel_skylib+", + "REPO_MAPPING:aspect_bazel_lib+,bazel_tools bazel_tools", + "REPO_MAPPING:aspect_rules_js+,aspect_bazel_lib aspect_bazel_lib+", + "REPO_MAPPING:aspect_rules_js+,bazel_features bazel_features+", + "REPO_MAPPING:aspect_rules_js+,bazel_skylib bazel_skylib+", + "REPO_MAPPING:aspect_rules_js+,bazel_tools bazel_tools", + "REPO_MAPPING:bazel_features+,bazel_tools bazel_tools" + ], + "generatedRepoSpecs": { + "pnpm": { + "repoRuleId": "@@aspect_rules_js+//npm/private:npm_import.bzl%npm_import_rule", + "attributes": { + "package": "pnpm", + "version": "8.6.7", + "root_package": "", + "link_workspace": "", + "link_packages": {}, + "integrity": "sha512-vRIWpD/L4phf9Bk2o/O2TDR8fFoJnpYrp2TKqTIZF/qZ2/rgL3qKXzHofHgbXsinwMoSEigz28sqk3pQ+yMEQQ==", + "url": "", + "commit": "", + "patch_args": [ + "-p0" + ], + "patches": [], + "custom_postinstall": "", + "npm_auth": "", + "npm_auth_basic": "", + "npm_auth_username": "", + "npm_auth_password": "", + "lifecycle_hooks": [], + "extra_build_content": "load(\"@aspect_rules_js//js:defs.bzl\", \"js_binary\")\njs_binary(name = \"pnpm\", data = glob([\"package/**\"]), entry_point = \"package/dist/pnpm.cjs\", visibility = [\"//visibility:public\"])", + "extract_full_archive": true + } + }, + "pnpm__links": { + "repoRuleId": "@@aspect_rules_js+//npm/private:npm_import.bzl%npm_import_links", + "attributes": { + "package": "pnpm", + "version": "8.6.7", + "dev": false, + "root_package": "", + "link_packages": {}, + "deps": {}, + "transitive_closure": {}, + "lifecycle_build_target": false, + "lifecycle_hooks_env": [], + "lifecycle_hooks_execution_requirements": [ + "no-sandbox" + ], + "lifecycle_hooks_use_default_shell_env": false, + "bins": {}, + "package_visibility": [ + "//visibility:public" + ] + } + } + } + } + }, "@@aspect_tools_telemetry+//:extension.bzl%telemetry": { "general": { "bzlTransitiveDigest": "gA7tPEdJXhskzPIEUxjX9IdDrM6+WjfbgXJ8Ez47umk=", @@ -525,7 +590,7 @@ }, "@@rules_multitool+//multitool:extension.bzl%multitool": { "general": { - "bzlTransitiveDigest": "Sms6CLqhBzaxq6M4aMKydCoi0q9j2AgS/kKpRK+8zYg=", + "bzlTransitiveDigest": "bUAIj7+iQveUL37FLVQ+wqtGkQMyahXU4dysFJ22+/g=", "usagesDigest": "p0Y7uKj5HQuQRaYjExZcuk4ZYYt/4r3NBEY5SKjujPU=", "recordedInputs": [ "REPO_MAPPING:bazel_features+,bazel_features_globals bazel_features++version_extension+bazel_features_globals", @@ -940,6 +1005,105 @@ } } }, + "@@rules_rust+//crate_universe/private:internal_extensions.bzl%cu_nr": { + "general": { + "bzlTransitiveDigest": "+GMGLO8fhObMT4QIEm4KHXZlSvypggLOZN+UGbwWea4=", + "usagesDigest": "tG3p3Nb5XxC7vWY/bcKdb//g0HoAxpxxH3F5/jBVlk4=", + "recordedInputs": [ + "REPO_MAPPING:bazel_features+,bazel_features_globals bazel_features++version_extension+bazel_features_globals", + "REPO_MAPPING:bazel_features+,bazel_features_version bazel_features++version_extension+bazel_features_version", + "REPO_MAPPING:rules_cc+,bazel_skylib bazel_skylib+", + "REPO_MAPPING:rules_cc+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_cc+,cc_compatibility_proxy rules_cc++compatibility_proxy+cc_compatibility_proxy", + "REPO_MAPPING:rules_cc+,platforms platforms", + "REPO_MAPPING:rules_cc+,rules_cc rules_cc+", + "REPO_MAPPING:rules_cc++compatibility_proxy+cc_compatibility_proxy,rules_cc rules_cc+", + "REPO_MAPPING:rules_rust+,bazel_features bazel_features+", + "REPO_MAPPING:rules_rust+,bazel_skylib bazel_skylib+", + "REPO_MAPPING:rules_rust+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_rust+,cui rules_rust++cu+cui", + "REPO_MAPPING:rules_rust+,rrc rules_rust++i2+rrc", + "REPO_MAPPING:rules_rust+,rules_cc rules_cc+", + "REPO_MAPPING:rules_rust+,rules_rust rules_rust+" + ], + "generatedRepoSpecs": { + "cargo_bazel_bootstrap": { + "repoRuleId": "@@rules_rust+//cargo/private:cargo_bootstrap.bzl%cargo_bootstrap_repository", + "attributes": { + "srcs": [ + "@@rules_rust+//crate_universe:src/api.rs", + "@@rules_rust+//crate_universe:src/api/lockfile.rs", + "@@rules_rust+//crate_universe:src/cli.rs", + "@@rules_rust+//crate_universe:src/cli/generate.rs", + "@@rules_rust+//crate_universe:src/cli/query.rs", + "@@rules_rust+//crate_universe:src/cli/render.rs", + "@@rules_rust+//crate_universe:src/cli/splice.rs", + "@@rules_rust+//crate_universe:src/cli/vendor.rs", + "@@rules_rust+//crate_universe:src/config.rs", + "@@rules_rust+//crate_universe:src/context.rs", + "@@rules_rust+//crate_universe:src/context/crate_context.rs", + "@@rules_rust+//crate_universe:src/context/platforms.rs", + "@@rules_rust+//crate_universe:src/lib.rs", + "@@rules_rust+//crate_universe:src/lockfile.rs", + "@@rules_rust+//crate_universe:src/main.rs", + "@@rules_rust+//crate_universe:src/metadata.rs", + "@@rules_rust+//crate_universe:src/metadata/cargo_bin.rs", + "@@rules_rust+//crate_universe:src/metadata/cargo_tree_resolver.rs", + "@@rules_rust+//crate_universe:src/metadata/cargo_tree_rustc_wrapper.bat", + "@@rules_rust+//crate_universe:src/metadata/cargo_tree_rustc_wrapper.sh", + "@@rules_rust+//crate_universe:src/metadata/dependency.rs", + "@@rules_rust+//crate_universe:src/metadata/metadata_annotation.rs", + "@@rules_rust+//crate_universe:src/rendering.rs", + "@@rules_rust+//crate_universe:src/rendering/template_engine.rs", + "@@rules_rust+//crate_universe:src/rendering/templates/module_bzl.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/header.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/aliases_map.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/deps_map.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/repo_git.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/repo_http.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/vendor_module.j2", + "@@rules_rust+//crate_universe:src/rendering/verbatim/alias_rules.bzl", + "@@rules_rust+//crate_universe:src/select.rs", + "@@rules_rust+//crate_universe:src/splicing.rs", + "@@rules_rust+//crate_universe:src/splicing/cargo_config.rs", + "@@rules_rust+//crate_universe:src/splicing/crate_index_lookup.rs", + "@@rules_rust+//crate_universe:src/splicing/splicer.rs", + "@@rules_rust+//crate_universe:src/test.rs", + "@@rules_rust+//crate_universe:src/utils.rs", + "@@rules_rust+//crate_universe:src/utils/starlark.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/glob.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/label.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select_dict.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select_list.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select_scalar.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select_set.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/serialize.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/target_compatible_with.rs", + "@@rules_rust+//crate_universe:src/utils/symlink.rs", + "@@rules_rust+//crate_universe:src/utils/target_triple.rs" + ], + "binary": "cargo-bazel", + "cargo_lockfile": "@@rules_rust+//crate_universe:Cargo.lock", + "cargo_toml": "@@rules_rust+//crate_universe:Cargo.toml", + "version": "1.93.1", + "timeout": 900, + "rust_toolchain_cargo_template": "@rust_host_tools//:bin/{tool}", + "rust_toolchain_rustc_template": "@rust_host_tools//:bin/{tool}", + "compressed_windows_toolchain_names": false + } + } + }, + "moduleExtensionMetadata": { + "explicitRootModuleDirectDeps": [ + "cargo_bazel_bootstrap" + ], + "explicitRootModuleDirectDevDeps": [], + "useAllRepos": "NO", + "reproducible": false + } + } + }, "@@tar.bzl+//tar:extensions.bzl%toolchains": { "general": { "bzlTransitiveDigest": "/2afh6fPjq/rcyE/jztQDK3ierehmFFngfvmqyRv72M=", diff --git a/integration_test/MODULE.bazel.template b/integration_test/MODULE.bazel.template index 33a7257..f9cf33b 100644 --- a/integration_test/MODULE.bazel.template +++ b/integration_test/MODULE.bazel.template @@ -10,6 +10,7 @@ module( version = "0.0.0", ) +bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "rules_cc", version = "0.2.17") bazel_dep(name = "rules_rust", version = "0.69.0") bazel_dep(name = "rules_shell", version = "0.6.1") From ecd07b6cdbd223abe6f27f17f00c8e7a8079eee0 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Wed, 18 Mar 2026 20:13:20 +0100 Subject: [PATCH 04/19] Fix Windows C++20, UTF-8 encoding, and fail-fast cascading - Bump Windows C++ standard to /std:c++20 (MSVC requires C++20 for designated initializers) - Add encoding="utf-8" to all open() calls in release_report.py and validate_release_readiness.py (Windows defaults to cp1252) - Disable fail-fast on test and integration-test matrices so a Windows failure doesn't cancel Linux/macOS jobs Co-Authored-By: Claude Opus 4.6 --- .bazelrc | 4 ++-- .github/workflows/ci.yaml | 2 ++ fire/starlark/release_report.py | 10 +++++----- fire/starlark/validate_release_readiness.py | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.bazelrc b/.bazelrc index a08f347..bc7c894 100644 --- a/.bazelrc +++ b/.bazelrc @@ -17,8 +17,8 @@ build:linux --cxxopt=-std=c++17 build:linux --host_cxxopt=-std=c++17 build:macos --cxxopt=-std=c++17 build:macos --host_cxxopt=-std=c++17 -build:windows --cxxopt=/std:c++17 -build:windows --host_cxxopt=/std:c++17 +build:windows --cxxopt=/std:c++20 +build:windows --host_cxxopt=/std:c++20 # Java configuration - use Java 17 for records support build --java_language_version=17 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6fa811f..7846d0f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,6 +38,7 @@ jobs: name: Bazel Tests (Bazel ${{ matrix.bazel-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] bazel-version: ["7.x", "8.x", "9.x"] @@ -117,6 +118,7 @@ jobs: name: Integration Test (Python ${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest] python-version: ["3.10", "3.11", "3.12", "3.13"] diff --git a/fire/starlark/release_report.py b/fire/starlark/release_report.py index 9371ebe..91b2139 100644 --- a/fire/starlark/release_report.py +++ b/fire/starlark/release_report.py @@ -16,7 +16,7 @@ def load_yaml_file(path: str) -> object: """Load YAML from disk and normalize empty files to an empty list.""" - with open(path, "r") as handle: + with open(path, "r", encoding="utf-8") as handle: data = yaml.safe_load(handle) return data if data is not None else [] @@ -25,7 +25,7 @@ def load_json_file(path: str) -> object: """Load JSON from disk.""" import json - with open(path, "r") as handle: + with open(path, "r", encoding="utf-8") as handle: return json.load(handle) @@ -325,7 +325,7 @@ def generate_release_report( for path in requirement_paths: if not path.endswith(".md"): continue - content = open(path, "r").read() + content = open(path, "r", encoding="utf-8").read() sections.extend(parse_requirement_sections(content, path)) for todo in extract_todos(content): todos.append((path, todo)) @@ -341,7 +341,7 @@ def generate_release_report( continue data = load_yaml_file(path) param_maps.append(build_param_version_map(data, path)) - content = open(path, "r").read() + content = open(path, "r", encoding="utf-8").read() for todo in extract_todos(content): todos.append((path, todo)) bare_todos.extend( @@ -555,7 +555,7 @@ def main() -> int: source_trace_paths=args.source_traces, product_name=args.product, ) - with open(args.out, "w") as handle: + with open(args.out, "w", encoding="utf-8") as handle: handle.write(report) handle.write("\n") diff --git a/fire/starlark/validate_release_readiness.py b/fire/starlark/validate_release_readiness.py index da6ba8b..aed254b 100644 --- a/fire/starlark/validate_release_readiness.py +++ b/fire/starlark/validate_release_readiness.py @@ -16,7 +16,7 @@ def validate_release_readiness(report_path: str) -> int: Returns: 0 if ready for release, 1 if not ready """ - with open(report_path, "r") as f: + with open(report_path, "r", encoding="utf-8") as f: content = f.read() # Check if the report indicates readiness From 7e87cbc88f25e12af3c143d4cc6197f1949ae523 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Wed, 18 Mar 2026 20:19:44 +0100 Subject: [PATCH 05/19] Exclude Rust targets on Windows via CI (replaces target_compatible_with) target_compatible_with doesn't prevent Rust toolchain resolution, so the process_wrapper still fails to link. Exclude Rust targets from Windows builds at the CI level instead. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yaml | 14 ++++++++++++-- MODULE.bazel | 1 - examples/BUILD.bazel | 16 ---------------- integration_test/BUILD.bazel | 4 ---- integration_test/MODULE.bazel.template | 1 - integration_test/consumer/BUILD.bazel | 4 ---- integration_test/run.sh | 8 +++++++- 7 files changed, 19 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7846d0f..29f87b1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -57,17 +57,27 @@ jobs: bazel-${{ matrix.os }}-${{ matrix.bazel-version }}- bazel-${{ matrix.os }}- + - name: Set Rust exclusions on Windows + id: rust-exclude + shell: bash + run: | + if [[ "$RUNNER_OS" == "Windows" ]]; then + echo "targets=-- -//examples:vehicle_params_rs -//examples:vehicle_params_rs_alt -//examples:vehicle_params_rs_src -//examples:vehicle_params_rs_alt_src -//examples:vehicle_params_rust_test -//examples:vehicle_params_rust_alt_test" >> "$GITHUB_OUTPUT" + else + echo "targets=" >> "$GITHUB_OUTPUT" + fi + - name: Run Bazel tests shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} - run: bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors + run: bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors ${{ steps.rust-exclude.outputs.targets }} - name: Build all targets shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} - run: bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... + run: bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... ${{ steps.rust-exclude.outputs.targets }} typecheck: name: Type Checking diff --git a/MODULE.bazel b/MODULE.bazel index 22ebb7e..8562f46 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -4,7 +4,6 @@ module( compatibility_level = 3, ) -bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "rules_python", version = "1.8.5") bazel_dep(name = "bazel_skylib", version = "1.9.0") diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 545bfd3..92bfe3f 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -109,10 +109,6 @@ generate_rust_parameters( rust_library( name = "vehicle_params_rs", srcs = [":vehicle_params_rs_src"], - target_compatible_with = select({ - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], - }), ) # Second Rust library @@ -124,10 +120,6 @@ generate_rust_parameters( rust_library( name = "vehicle_params_rs_alt", srcs = [":vehicle_params_rs_alt_src"], - target_compatible_with = select({ - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], - }), ) # C++ tests @@ -184,10 +176,6 @@ rust_test( name = "vehicle_params_rust_test", srcs = ["vehicle_params_test.rs"], crate_root = "vehicle_params_test.rs", - target_compatible_with = select({ - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], - }), deps = [":vehicle_params_rs"], ) @@ -195,10 +183,6 @@ rust_test( name = "vehicle_params_rust_alt_test", srcs = ["vehicle_params_alt_test.rs"], crate_root = "vehicle_params_alt_test.rs", - target_compatible_with = select({ - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], - }), deps = [":vehicle_params_rs_alt"], ) diff --git a/integration_test/BUILD.bazel b/integration_test/BUILD.bazel index 24700d9..80e3a6f 100644 --- a/integration_test/BUILD.bazel +++ b/integration_test/BUILD.bazel @@ -40,10 +40,6 @@ generate_rust_parameters( rust_library( name = "test_params_rs", srcs = [":test_params_rs_src"], - target_compatible_with = select({ - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], - }), visibility = ["//visibility:public"], ) diff --git a/integration_test/MODULE.bazel.template b/integration_test/MODULE.bazel.template index f9cf33b..33a7257 100644 --- a/integration_test/MODULE.bazel.template +++ b/integration_test/MODULE.bazel.template @@ -10,7 +10,6 @@ module( version = "0.0.0", ) -bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "rules_cc", version = "0.2.17") bazel_dep(name = "rules_rust", version = "0.69.0") bazel_dep(name = "rules_shell", version = "0.6.1") diff --git a/integration_test/consumer/BUILD.bazel b/integration_test/consumer/BUILD.bazel index dac65de..5f86708 100644 --- a/integration_test/consumer/BUILD.bazel +++ b/integration_test/consumer/BUILD.bazel @@ -23,10 +23,6 @@ rust_test( name = "test_rust_test", srcs = ["test_rust.rs"], crate_root = "test_rust.rs", - target_compatible_with = select({ - "@platforms//os:windows": ["@platforms//:incompatible"], - "//conditions:default": [], - }), deps = ["//:test_params_rs"], ) diff --git a/integration_test/run.sh b/integration_test/run.sh index d328a9b..f821421 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -29,6 +29,12 @@ done fail=0 +# Exclude Rust targets on Windows (rules_rust toolchain cannot build on Windows) +RUST_EXCLUDE="" +if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then + RUST_EXCLUDE="-- -//:test_params_rs -//:test_params_rs_src -//consumer:test_rust_test" +fi + echo "=========================================" echo "Fire Integration Test" echo "Python Version: $PYTHON_VERSION" @@ -41,7 +47,7 @@ sed "s/{{PYTHON_VERSION}}/$PYTHON_VERSION/g" MODULE.bazel.template > MODULE.baze echo "" echo "Running all Bazel tests..." -bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors +bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors $RUST_EXCLUDE echo "" echo "Building release report..." From 963069860d66f1c4d57acddc3371808e3118205f Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Wed, 18 Mar 2026 20:27:28 +0100 Subject: [PATCH 06/19] Use explicit target lists on Windows to avoid Rust toolchain resolution rules_rust eagerly builds its process_wrapper when any package references Rust rules, even if individual targets are excluded. Use explicit non-Rust target lists on Windows instead of //... Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yaml | 36 +++++++++++++++++++++++++----------- integration_test/run.sh | 16 ++++++++++++---- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 29f87b1..981eb91 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -57,27 +57,41 @@ jobs: bazel-${{ matrix.os }}-${{ matrix.bazel-version }}- bazel-${{ matrix.os }}- - - name: Set Rust exclusions on Windows - id: rust-exclude + - name: Run Bazel tests shell: bash + env: + USE_BAZEL_VERSION: ${{ matrix.bazel-version }} run: | if [[ "$RUNNER_OS" == "Windows" ]]; then - echo "targets=-- -//examples:vehicle_params_rs -//examples:vehicle_params_rs_alt -//examples:vehicle_params_rs_src -//examples:vehicle_params_rs_alt_src -//examples:vehicle_params_rust_test -//examples:vehicle_params_rust_alt_test" >> "$GITHUB_OUTPUT" + # Exclude Rust: rules_rust toolchain cannot build on Windows + bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" \ + //fire/starlark/... \ + //examples:vehicle_params_cc_test //examples:vehicle_params_cc_custom_ns_test \ + //examples:vehicle_params_py_test //examples:vehicle_params_py_alt_test \ + //examples:vehicle_params_java_test \ + //examples:vehicle_params_go_test //examples:vehicle_params_go_alt_test \ + //examples/brake_control:brake_controller_test \ + --test_output=errors else - echo "targets=" >> "$GITHUB_OUTPUT" + bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors fi - - name: Run Bazel tests - shell: bash - env: - USE_BAZEL_VERSION: ${{ matrix.bazel-version }} - run: bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors ${{ steps.rust-exclude.outputs.targets }} - - name: Build all targets shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} - run: bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... ${{ steps.rust-exclude.outputs.targets }} + run: | + if [[ "$RUNNER_OS" == "Windows" ]]; then + bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" \ + //fire/starlark/... //examples/brake_control/... \ + //examples:vehicle_params_cc //examples:vehicle_params_cc_custom_ns \ + //examples:vehicle_params_py //examples:vehicle_params_py_alt \ + //examples:vehicle_params_java \ + //examples:vehicle_params_go //examples:vehicle_params_go_alt \ + //examples:vehicle_requirements //examples:component_requirements + else + bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... + fi typecheck: name: Type Checking diff --git a/integration_test/run.sh b/integration_test/run.sh index f821421..fb1e821 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -29,10 +29,10 @@ done fail=0 -# Exclude Rust targets on Windows (rules_rust toolchain cannot build on Windows) -RUST_EXCLUDE="" +# Detect Windows (rules_rust toolchain cannot build on Windows) +IS_WINDOWS=false if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then - RUST_EXCLUDE="-- -//:test_params_rs -//:test_params_rs_src -//consumer:test_rust_test" + IS_WINDOWS=true fi echo "=========================================" @@ -47,7 +47,15 @@ sed "s/{{PYTHON_VERSION}}/$PYTHON_VERSION/g" MODULE.bazel.template > MODULE.baze echo "" echo "Running all Bazel tests..." -bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors $RUST_EXCLUDE +if [[ "$IS_WINDOWS" == true ]]; then + # Exclude Rust targets: rules_rust toolchain cannot build on Windows + bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" \ + //:test_speed_limit //:test_braking //:test_update_rate \ + //consumer:test_cpp_test \ + --test_output=errors +else + bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors +fi echo "" echo "Building release report..." From 70cf6b58a8b293d68aa7ecd37a03ffb2778e1bc3 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Wed, 18 Mar 2026 20:35:17 +0100 Subject: [PATCH 07/19] Fix Windows CI: use variables instead of backslash continuations Backslash line continuations in YAML pipe blocks break on Windows Git Bash, causing target paths to lose their leading //. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yaml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 981eb91..b191d76 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,18 +62,13 @@ jobs: env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} run: | + BAZEL_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo" if [[ "$RUNNER_OS" == "Windows" ]]; then # Exclude Rust: rules_rust toolchain cannot build on Windows - bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" \ - //fire/starlark/... \ - //examples:vehicle_params_cc_test //examples:vehicle_params_cc_custom_ns_test \ - //examples:vehicle_params_py_test //examples:vehicle_params_py_alt_test \ - //examples:vehicle_params_java_test \ - //examples:vehicle_params_go_test //examples:vehicle_params_go_alt_test \ - //examples/brake_control:brake_controller_test \ - --test_output=errors + TARGETS="//fire/starlark/... //examples:vehicle_params_cc_test //examples:vehicle_params_cc_custom_ns_test //examples:vehicle_params_py_test //examples:vehicle_params_py_alt_test //examples:vehicle_params_java_test //examples:vehicle_params_go_test //examples:vehicle_params_go_alt_test //examples/brake_control:brake_controller_test" + bazel test $BAZEL_OPTS $TARGETS --test_output=errors else - bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors + bazel test $BAZEL_OPTS //... --test_output=errors fi - name: Build all targets @@ -81,16 +76,12 @@ jobs: env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} run: | + BAZEL_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo" if [[ "$RUNNER_OS" == "Windows" ]]; then - bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" \ - //fire/starlark/... //examples/brake_control/... \ - //examples:vehicle_params_cc //examples:vehicle_params_cc_custom_ns \ - //examples:vehicle_params_py //examples:vehicle_params_py_alt \ - //examples:vehicle_params_java \ - //examples:vehicle_params_go //examples:vehicle_params_go_alt \ - //examples:vehicle_requirements //examples:component_requirements + TARGETS="//fire/starlark/... //examples/brake_control/... //examples:vehicle_params_cc //examples:vehicle_params_cc_custom_ns //examples:vehicle_params_py //examples:vehicle_params_py_alt //examples:vehicle_params_java //examples:vehicle_params_go //examples:vehicle_params_go_alt //examples:vehicle_requirements //examples:component_requirements" + bazel build $BAZEL_OPTS $TARGETS else - bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... + bazel build $BAZEL_OPTS //... fi typecheck: From 2b80cb4b429a5dc399dba665f7c0e42d326aad70 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 22 Mar 2026 12:47:39 +0100 Subject: [PATCH 08/19] Fix MSYS path conversion stripping // prefix from Bazel targets on Windows Git Bash on Windows (MSYS) converts Unix-style paths, which strips the // prefix from Bazel target patterns like //examples:foo, causing "invalid package name '/examples'" errors. Set MSYS_NO_PATHCONV=1 and MSYS2_ARG_CONV_EXCL="*" in all CI steps and shell scripts. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yaml | 10 ++++++++++ fire/starlark/failure_test/run_failure_tests.sh | 4 ++++ integration_test/run.sh | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b191d76..27e395a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -61,6 +61,8 @@ jobs: shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} + MSYS_NO_PATHCONV: 1 + MSYS2_ARG_CONV_EXCL: "*" run: | BAZEL_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo" if [[ "$RUNNER_OS" == "Windows" ]]; then @@ -75,6 +77,8 @@ jobs: shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} + MSYS_NO_PATHCONV: 1 + MSYS2_ARG_CONV_EXCL: "*" run: | BAZEL_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo" if [[ "$RUNNER_OS" == "Windows" ]]; then @@ -126,6 +130,9 @@ jobs: - name: Run failure tests shell: bash + env: + MSYS_NO_PATHCONV: 1 + MSYS2_ARG_CONV_EXCL: "*" run: | ./fire/starlark/failure_test/run_failure_tests.sh @@ -154,6 +161,9 @@ jobs: - name: Run integration test shell: bash + env: + MSYS_NO_PATHCONV: 1 + MSYS2_ARG_CONV_EXCL: "*" run: | cd integration_test ./run.sh --python-version ${{ matrix.python-version }} diff --git a/fire/starlark/failure_test/run_failure_tests.sh b/fire/starlark/failure_test/run_failure_tests.sh index b454cc3..e66f07d 100755 --- a/fire/starlark/failure_test/run_failure_tests.sh +++ b/fire/starlark/failure_test/run_failure_tests.sh @@ -6,6 +6,10 @@ set -euo pipefail +# Disable MSYS path conversion on Windows (prevents //target from becoming /target) +export MSYS_NO_PATHCONV=1 +export MSYS2_ARG_CONV_EXCL="*" + echo "=========================================" echo "Running Failure Tests" echo "=========================================" diff --git a/integration_test/run.sh b/integration_test/run.sh index fb1e821..b4d1d89 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -9,6 +9,10 @@ set -euo pipefail +# Disable MSYS path conversion on Windows (prevents //target from becoming /target) +export MSYS_NO_PATHCONV=1 +export MSYS2_ARG_CONV_EXCL="*" + cd "$(dirname "$0")" # Parse command line arguments From 133b989477dc1aefbebdec333f067d9a6202528a Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 22 Mar 2026 13:01:56 +0100 Subject: [PATCH 09/19] Fix MSYS path handling: use MSYS2_ARG_CONV_EXCL and cygpath for cache paths MSYS_NO_PATHCONV=1 broke repository_cache paths by preventing conversion of $HOME to Windows format. Instead, use MSYS2_ARG_CONV_EXCL="*" to stop Bazel target // conversion, and cygpath -w to explicitly convert cache paths to Windows format. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yaml | 10 ++++------ fire/starlark/failure_test/run_failure_tests.sh | 6 +++--- integration_test/run.sh | 17 ++++++++--------- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 27e395a..ebef446 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -61,10 +61,10 @@ jobs: shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} - MSYS_NO_PATHCONV: 1 MSYS2_ARG_CONV_EXCL: "*" run: | - BAZEL_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo" + REPO_CACHE=$(cygpath -w "$HOME/.cache/bazel-repo" 2>/dev/null || echo "$HOME/.cache/bazel-repo") + BAZEL_OPTS="--config=ci --repository_cache=$REPO_CACHE" if [[ "$RUNNER_OS" == "Windows" ]]; then # Exclude Rust: rules_rust toolchain cannot build on Windows TARGETS="//fire/starlark/... //examples:vehicle_params_cc_test //examples:vehicle_params_cc_custom_ns_test //examples:vehicle_params_py_test //examples:vehicle_params_py_alt_test //examples:vehicle_params_java_test //examples:vehicle_params_go_test //examples:vehicle_params_go_alt_test //examples/brake_control:brake_controller_test" @@ -77,10 +77,10 @@ jobs: shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} - MSYS_NO_PATHCONV: 1 MSYS2_ARG_CONV_EXCL: "*" run: | - BAZEL_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo" + REPO_CACHE=$(cygpath -w "$HOME/.cache/bazel-repo" 2>/dev/null || echo "$HOME/.cache/bazel-repo") + BAZEL_OPTS="--config=ci --repository_cache=$REPO_CACHE" if [[ "$RUNNER_OS" == "Windows" ]]; then TARGETS="//fire/starlark/... //examples/brake_control/... //examples:vehicle_params_cc //examples:vehicle_params_cc_custom_ns //examples:vehicle_params_py //examples:vehicle_params_py_alt //examples:vehicle_params_java //examples:vehicle_params_go //examples:vehicle_params_go_alt //examples:vehicle_requirements //examples:component_requirements" bazel build $BAZEL_OPTS $TARGETS @@ -131,7 +131,6 @@ jobs: - name: Run failure tests shell: bash env: - MSYS_NO_PATHCONV: 1 MSYS2_ARG_CONV_EXCL: "*" run: | ./fire/starlark/failure_test/run_failure_tests.sh @@ -162,7 +161,6 @@ jobs: - name: Run integration test shell: bash env: - MSYS_NO_PATHCONV: 1 MSYS2_ARG_CONV_EXCL: "*" run: | cd integration_test diff --git a/fire/starlark/failure_test/run_failure_tests.sh b/fire/starlark/failure_test/run_failure_tests.sh index e66f07d..0aedd4d 100755 --- a/fire/starlark/failure_test/run_failure_tests.sh +++ b/fire/starlark/failure_test/run_failure_tests.sh @@ -6,8 +6,7 @@ set -euo pipefail -# Disable MSYS path conversion on Windows (prevents //target from becoming /target) -export MSYS_NO_PATHCONV=1 +# Disable MSYS path conversion for Bazel targets (prevents //target from becoming /target) export MSYS2_ARG_CONV_EXCL="*" echo "=========================================" @@ -19,7 +18,8 @@ FAILURES=0 SUCCESSES=0 # Bazel options for CI with repository cache (separate cache for failure tests) -BAZEL_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo-failure" +REPO_CACHE=$(cygpath -w "$HOME/.cache/bazel-repo-failure" 2>/dev/null || echo "$HOME/.cache/bazel-repo-failure") +BAZEL_OPTS="--config=ci --repository_cache=$REPO_CACHE" # Query Bazel once for all targets with build output format (easy to parse!) # Output format: //package:target|tag1 tag2 tag3 diff --git a/integration_test/run.sh b/integration_test/run.sh index b4d1d89..6d3ef8c 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -9,8 +9,7 @@ set -euo pipefail -# Disable MSYS path conversion on Windows (prevents //target from becoming /target) -export MSYS_NO_PATHCONV=1 +# Disable MSYS path conversion for Bazel targets (prevents //target from becoming /target) export MSYS2_ARG_CONV_EXCL="*" cd "$(dirname "$0")" @@ -50,20 +49,20 @@ echo "Generating MODULE.bazel for Python $PYTHON_VERSION..." sed "s/{{PYTHON_VERSION}}/$PYTHON_VERSION/g" MODULE.bazel.template > MODULE.bazel echo "" +REPO_CACHE=$(cygpath -w "$HOME/.cache/bazel-repo" 2>/dev/null || echo "$HOME/.cache/bazel-repo") + echo "Running all Bazel tests..." if [[ "$IS_WINDOWS" == true ]]; then # Exclude Rust targets: rules_rust toolchain cannot build on Windows - bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" \ - //:test_speed_limit //:test_braking //:test_update_rate \ - //consumer:test_cpp_test \ - --test_output=errors + TARGETS="//:test_speed_limit //:test_braking //:test_update_rate //consumer:test_cpp_test" + bazel test --config=ci --repository_cache="$REPO_CACHE" $TARGETS --test_output=errors else - bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors + bazel test --config=ci --repository_cache="$REPO_CACHE" //... --test_output=errors fi echo "" echo "Building release report..." -bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //:integration_release_report +bazel build --config=ci --repository_cache="$REPO_CACHE" //:integration_release_report echo "" echo "Verifying release report..." @@ -79,7 +78,7 @@ fi echo "" echo "Running release readiness test..." -bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //:integration_release_readiness --test_output=all +bazel test --config=ci --repository_cache="$REPO_CACHE" //:integration_release_readiness --test_output=all echo "" echo "Integration tests completed successfully!" From f4ebac3b63a35e8053596677de15bfc7580dcc91 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 22 Mar 2026 13:15:52 +0100 Subject: [PATCH 10/19] Exclude Rust targets from Windows CI and skip release readiness sh_test - Replace //fire/starlark/... with explicit package list on Windows, skipping parameter_version (its BUILD loads rules_rust which triggers broken toolchain resolution) - Skip release_readiness_test on Windows in integration test (the macro generates a .sh test script that CreateProcessW cannot execute) Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yaml | 13 +++++++++---- integration_test/run.sh | 6 +++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ebef446..e9a786e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,8 +67,11 @@ jobs: BAZEL_OPTS="--config=ci --repository_cache=$REPO_CACHE" if [[ "$RUNNER_OS" == "Windows" ]]; then # Exclude Rust: rules_rust toolchain cannot build on Windows - TARGETS="//fire/starlark/... //examples:vehicle_params_cc_test //examples:vehicle_params_cc_custom_ns_test //examples:vehicle_params_py_test //examples:vehicle_params_py_alt_test //examples:vehicle_params_java_test //examples:vehicle_params_go_test //examples:vehicle_params_go_alt_test //examples/brake_control:brake_controller_test" - bazel test $BAZEL_OPTS $TARGETS --test_output=errors + # List fire/starlark sub-packages explicitly, skipping parameter_version + # (its BUILD loads rules_rust which triggers broken toolchain resolution on Windows) + STARLARK_TARGETS="//fire/starlark:all //fire/starlark/failure_test/bare_todo:all //fire/starlark/failure_test/dependency_failures:all //fire/starlark/failure_test/invalid_metadata:all //fire/starlark/failure_test/missing_fields:all //fire/starlark/failure_test/relative_paths:all //fire/starlark/failure_test/source_traceability:all //fire/starlark/failure_test/too_many_versions:all //fire/starlark/failure_test/version_mismatch:all" + EXAMPLE_TARGETS="//examples:vehicle_params_cc_test //examples:vehicle_params_cc_custom_ns_test //examples:vehicle_params_py_test //examples:vehicle_params_py_alt_test //examples:vehicle_params_java_test //examples:vehicle_params_go_test //examples:vehicle_params_go_alt_test //examples/brake_control:brake_controller_test" + bazel test $BAZEL_OPTS $STARLARK_TARGETS $EXAMPLE_TARGETS --test_output=errors else bazel test $BAZEL_OPTS //... --test_output=errors fi @@ -82,8 +85,10 @@ jobs: REPO_CACHE=$(cygpath -w "$HOME/.cache/bazel-repo" 2>/dev/null || echo "$HOME/.cache/bazel-repo") BAZEL_OPTS="--config=ci --repository_cache=$REPO_CACHE" if [[ "$RUNNER_OS" == "Windows" ]]; then - TARGETS="//fire/starlark/... //examples/brake_control/... //examples:vehicle_params_cc //examples:vehicle_params_cc_custom_ns //examples:vehicle_params_py //examples:vehicle_params_py_alt //examples:vehicle_params_java //examples:vehicle_params_go //examples:vehicle_params_go_alt //examples:vehicle_requirements //examples:component_requirements" - bazel build $BAZEL_OPTS $TARGETS + # Skip parameter_version package (loads rules_rust which breaks on Windows) + STARLARK_TARGETS="//fire/starlark:all //fire/starlark/failure_test/bare_todo:all //fire/starlark/failure_test/dependency_failures:all //fire/starlark/failure_test/invalid_metadata:all //fire/starlark/failure_test/missing_fields:all //fire/starlark/failure_test/relative_paths:all //fire/starlark/failure_test/source_traceability:all //fire/starlark/failure_test/too_many_versions:all //fire/starlark/failure_test/version_mismatch:all" + EXAMPLE_TARGETS="//examples/brake_control/... //examples:vehicle_params_cc //examples:vehicle_params_cc_custom_ns //examples:vehicle_params_py //examples:vehicle_params_py_alt //examples:vehicle_params_java //examples:vehicle_params_go //examples:vehicle_params_go_alt //examples:vehicle_requirements //examples:component_requirements" + bazel build $BAZEL_OPTS $STARLARK_TARGETS $EXAMPLE_TARGETS else bazel build $BAZEL_OPTS //... fi diff --git a/integration_test/run.sh b/integration_test/run.sh index 6d3ef8c..cf66271 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -78,7 +78,11 @@ fi echo "" echo "Running release readiness test..." -bazel test --config=ci --repository_cache="$REPO_CACHE" //:integration_release_readiness --test_output=all +if [[ "$IS_WINDOWS" == true ]]; then + echo "Skipping release readiness test on Windows (sh_test not supported)" +else + bazel test --config=ci --repository_cache="$REPO_CACHE" //:integration_release_readiness --test_output=all +fi echo "" echo "Integration tests completed successfully!" From 89d6535f0eae97ea5feb0b5ac08f10fad2c837a9 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 22 Mar 2026 13:59:39 +0100 Subject: [PATCH 11/19] trigger CI From 216375ce1cfa61dc688e1cf49b7175d992d507ca Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 22 Mar 2026 14:59:25 +0100 Subject: [PATCH 12/19] Fix cp1252 encoding error in validate_release_readiness_test on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add encoding="utf-8" to NamedTemporaryFile calls that write Unicode characters (✓, ⚠️) which cp1252 cannot encode. Co-Authored-By: Claude Opus 4.6 --- fire/starlark/validate_release_readiness_test.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fire/starlark/validate_release_readiness_test.py b/fire/starlark/validate_release_readiness_test.py index 3c33419..9843fbc 100644 --- a/fire/starlark/validate_release_readiness_test.py +++ b/fire/starlark/validate_release_readiness_test.py @@ -18,7 +18,9 @@ def test_validate_ready_for_release(): ✓ No issues found - all checks passed """ - with tempfile.NamedTemporaryFile(mode="w", suffix=".md", delete=False) as f: + with tempfile.NamedTemporaryFile( + mode="w", suffix=".md", delete=False, encoding="utf-8" + ) as f: f.write(content) f.flush() result = validate_release_readiness.validate_release_readiness(f.name) @@ -39,7 +41,9 @@ def test_validate_not_ready_for_release(): - ⚠️ Missing implementation traces: **2** ([details](#missing-implementation-traces)) - ⚠️ Open TODOs: **1** ([details](#todo-inventory)) """ - with tempfile.NamedTemporaryFile(mode="w", suffix=".md", delete=False) as f: + with tempfile.NamedTemporaryFile( + mode="w", suffix=".md", delete=False, encoding="utf-8" + ) as f: f.write(content) f.flush() result = validate_release_readiness.validate_release_readiness(f.name) @@ -53,7 +57,9 @@ def test_validate_malformed_report(): This is not a release report. """ - with tempfile.NamedTemporaryFile(mode="w", suffix=".md", delete=False) as f: + with tempfile.NamedTemporaryFile( + mode="w", suffix=".md", delete=False, encoding="utf-8" + ) as f: f.write(content) f.flush() result = validate_release_readiness.validate_release_readiness(f.name) From 31e0ea70299b161e5723bdd939da716256dda61f Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 22 Mar 2026 15:23:15 +0100 Subject: [PATCH 13/19] Use .bazelrc platform flags instead of hardcoded target lists for Windows Address PR review feedback: - Add build:windows --build_tag_filters=-requires-rust to .bazelrc so Rust targets are automatically excluded on Windows - Tag all Rust targets with "requires-rust" in BUILD files - Remove MSYS2_ARG_CONV_EXCL hacks and cygpath workarounds from CI - Remove hardcoded --config=ci from scripts; accept BAZEL_EXTRA_OPTS from environment so scripts work on dev machines too - Simplify CI yaml to use //... for all platforms Co-Authored-By: Claude Opus 4.6 --- .bazelrc | 4 +++ .github/workflows/ci.yaml | 30 +++---------------- examples/BUILD.bazel | 4 +++ .../parameter_version/BUILD.bazel | 3 ++ .../failure_test/run_failure_tests.sh | 8 ++--- integration_test/.bazelrc | 7 +++++ integration_test/BUILD.bazel | 1 + integration_test/consumer/BUILD.bazel | 1 + integration_test/run.sh | 26 +++++----------- 9 files changed, 34 insertions(+), 50 deletions(-) diff --git a/.bazelrc b/.bazelrc index bc7c894..8e11c50 100644 --- a/.bazelrc +++ b/.bazelrc @@ -20,6 +20,10 @@ build:macos --host_cxxopt=-std=c++17 build:windows --cxxopt=/std:c++20 build:windows --host_cxxopt=/std:c++20 +# Windows: exclude Rust targets (rules_rust toolchain cannot build on Windows) +build:windows --build_tag_filters=-requires-rust +test:windows --test_tag_filters=-requires-rust + # Java configuration - use Java 17 for records support build --java_language_version=17 build --tool_java_language_version=17 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e9a786e..cc12866 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -61,37 +61,15 @@ jobs: shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} - MSYS2_ARG_CONV_EXCL: "*" run: | - REPO_CACHE=$(cygpath -w "$HOME/.cache/bazel-repo" 2>/dev/null || echo "$HOME/.cache/bazel-repo") - BAZEL_OPTS="--config=ci --repository_cache=$REPO_CACHE" - if [[ "$RUNNER_OS" == "Windows" ]]; then - # Exclude Rust: rules_rust toolchain cannot build on Windows - # List fire/starlark sub-packages explicitly, skipping parameter_version - # (its BUILD loads rules_rust which triggers broken toolchain resolution on Windows) - STARLARK_TARGETS="//fire/starlark:all //fire/starlark/failure_test/bare_todo:all //fire/starlark/failure_test/dependency_failures:all //fire/starlark/failure_test/invalid_metadata:all //fire/starlark/failure_test/missing_fields:all //fire/starlark/failure_test/relative_paths:all //fire/starlark/failure_test/source_traceability:all //fire/starlark/failure_test/too_many_versions:all //fire/starlark/failure_test/version_mismatch:all" - EXAMPLE_TARGETS="//examples:vehicle_params_cc_test //examples:vehicle_params_cc_custom_ns_test //examples:vehicle_params_py_test //examples:vehicle_params_py_alt_test //examples:vehicle_params_java_test //examples:vehicle_params_go_test //examples:vehicle_params_go_alt_test //examples/brake_control:brake_controller_test" - bazel test $BAZEL_OPTS $STARLARK_TARGETS $EXAMPLE_TARGETS --test_output=errors - else - bazel test $BAZEL_OPTS //... --test_output=errors - fi + bazel test --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... --test_output=errors - name: Build all targets shell: bash env: USE_BAZEL_VERSION: ${{ matrix.bazel-version }} - MSYS2_ARG_CONV_EXCL: "*" run: | - REPO_CACHE=$(cygpath -w "$HOME/.cache/bazel-repo" 2>/dev/null || echo "$HOME/.cache/bazel-repo") - BAZEL_OPTS="--config=ci --repository_cache=$REPO_CACHE" - if [[ "$RUNNER_OS" == "Windows" ]]; then - # Skip parameter_version package (loads rules_rust which breaks on Windows) - STARLARK_TARGETS="//fire/starlark:all //fire/starlark/failure_test/bare_todo:all //fire/starlark/failure_test/dependency_failures:all //fire/starlark/failure_test/invalid_metadata:all //fire/starlark/failure_test/missing_fields:all //fire/starlark/failure_test/relative_paths:all //fire/starlark/failure_test/source_traceability:all //fire/starlark/failure_test/too_many_versions:all //fire/starlark/failure_test/version_mismatch:all" - EXAMPLE_TARGETS="//examples/brake_control/... //examples:vehicle_params_cc //examples:vehicle_params_cc_custom_ns //examples:vehicle_params_py //examples:vehicle_params_py_alt //examples:vehicle_params_java //examples:vehicle_params_go //examples:vehicle_params_go_alt //examples:vehicle_requirements //examples:component_requirements" - bazel build $BAZEL_OPTS $STARLARK_TARGETS $EXAMPLE_TARGETS - else - bazel build $BAZEL_OPTS //... - fi + bazel build --config=ci --repository_cache="$HOME/.cache/bazel-repo" //... typecheck: name: Type Checking @@ -136,7 +114,7 @@ jobs: - name: Run failure tests shell: bash env: - MSYS2_ARG_CONV_EXCL: "*" + BAZEL_EXTRA_OPTS: "--config=ci --repository_cache=$HOME/.cache/bazel-repo-failure" run: | ./fire/starlark/failure_test/run_failure_tests.sh @@ -166,7 +144,7 @@ jobs: - name: Run integration test shell: bash env: - MSYS2_ARG_CONV_EXCL: "*" + BAZEL_EXTRA_OPTS: "--config=ci --repository_cache=$HOME/.cache/bazel-repo" run: | cd integration_test ./run.sh --python-version ${{ matrix.python-version }} diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 92bfe3f..dbb54ba 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -109,6 +109,7 @@ generate_rust_parameters( rust_library( name = "vehicle_params_rs", srcs = [":vehicle_params_rs_src"], + tags = ["requires-rust"], ) # Second Rust library @@ -120,6 +121,7 @@ generate_rust_parameters( rust_library( name = "vehicle_params_rs_alt", srcs = [":vehicle_params_rs_alt_src"], + tags = ["requires-rust"], ) # C++ tests @@ -176,6 +178,7 @@ rust_test( name = "vehicle_params_rust_test", srcs = ["vehicle_params_test.rs"], crate_root = "vehicle_params_test.rs", + tags = ["requires-rust"], deps = [":vehicle_params_rs"], ) @@ -183,6 +186,7 @@ rust_test( name = "vehicle_params_rust_alt_test", srcs = ["vehicle_params_alt_test.rs"], crate_root = "vehicle_params_alt_test.rs", + tags = ["requires-rust"], deps = [":vehicle_params_rs_alt"], ) diff --git a/fire/starlark/failure_test/parameter_version/BUILD.bazel b/fire/starlark/failure_test/parameter_version/BUILD.bazel index a716a6f..69e9847 100644 --- a/fire/starlark/failure_test/parameter_version/BUILD.bazel +++ b/fire/starlark/failure_test/parameter_version/BUILD.bazel @@ -68,6 +68,7 @@ generate_rust_parameters( rust_library( name = "test_params_rs", srcs = [":test_params_rust_src"], + tags = ["requires-rust"], ) # Generate Java code (directory of per-param-version .java files) @@ -130,6 +131,7 @@ rust_binary( tags = [ "failure_test", "manual", + "requires-rust", "version_too_old", ], deps = [":test_params_rs"], @@ -172,6 +174,7 @@ rust_binary( tags = [ "failure_test", "manual", + "requires-rust", "version_upgraded", ], deps = [":test_params_rs"], diff --git a/fire/starlark/failure_test/run_failure_tests.sh b/fire/starlark/failure_test/run_failure_tests.sh index 0aedd4d..eb0e23d 100755 --- a/fire/starlark/failure_test/run_failure_tests.sh +++ b/fire/starlark/failure_test/run_failure_tests.sh @@ -6,9 +6,6 @@ set -euo pipefail -# Disable MSYS path conversion for Bazel targets (prevents //target from becoming /target) -export MSYS2_ARG_CONV_EXCL="*" - echo "=========================================" echo "Running Failure Tests" echo "=========================================" @@ -17,9 +14,8 @@ echo "" FAILURES=0 SUCCESSES=0 -# Bazel options for CI with repository cache (separate cache for failure tests) -REPO_CACHE=$(cygpath -w "$HOME/.cache/bazel-repo-failure" 2>/dev/null || echo "$HOME/.cache/bazel-repo-failure") -BAZEL_OPTS="--config=ci --repository_cache=$REPO_CACHE" +# Accept extra Bazel options from environment (e.g., --config=ci --repository_cache=...) +BAZEL_OPTS="${BAZEL_EXTRA_OPTS:-}" # Query Bazel once for all targets with build output format (easy to parse!) # Output format: //package:target|tag1 tag2 tag3 diff --git a/integration_test/.bazelrc b/integration_test/.bazelrc index 85f4bf0..77db818 100644 --- a/integration_test/.bazelrc +++ b/integration_test/.bazelrc @@ -3,6 +3,13 @@ # Use Bzlmod for dependency management common --enable_bzlmod +# Auto-select platform config (linux/macos/windows) +common --enable_platform_specific_config + +# Windows: exclude Rust targets (rules_rust toolchain cannot build on Windows) +build:windows --build_tag_filters=-requires-rust +test:windows --test_tag_filters=-requires-rust + # CI configuration - enables caching for GitHub Actions # Note: repository_cache path must be passed as a flag for proper $HOME expansion build:ci --announce_rc diff --git a/integration_test/BUILD.bazel b/integration_test/BUILD.bazel index 80e3a6f..006c3af 100644 --- a/integration_test/BUILD.bazel +++ b/integration_test/BUILD.bazel @@ -40,6 +40,7 @@ generate_rust_parameters( rust_library( name = "test_params_rs", srcs = [":test_params_rs_src"], + tags = ["requires-rust"], visibility = ["//visibility:public"], ) diff --git a/integration_test/consumer/BUILD.bazel b/integration_test/consumer/BUILD.bazel index 5f86708..824be26 100644 --- a/integration_test/consumer/BUILD.bazel +++ b/integration_test/consumer/BUILD.bazel @@ -23,6 +23,7 @@ rust_test( name = "test_rust_test", srcs = ["test_rust.rs"], crate_root = "test_rust.rs", + tags = ["requires-rust"], deps = ["//:test_params_rs"], ) diff --git a/integration_test/run.sh b/integration_test/run.sh index cf66271..951cbb9 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -9,9 +9,6 @@ set -euo pipefail -# Disable MSYS path conversion for Bazel targets (prevents //target from becoming /target) -export MSYS2_ARG_CONV_EXCL="*" - cd "$(dirname "$0")" # Parse command line arguments @@ -30,9 +27,10 @@ while [[ $# -gt 0 ]]; do esac done -fail=0 +# Accept extra Bazel options from environment (e.g., --config=ci --repository_cache=...) +BAZEL_OPTS="${BAZEL_EXTRA_OPTS:-}" -# Detect Windows (rules_rust toolchain cannot build on Windows) +# Detect Windows for release_readiness_test skip (generates .sh test script) IS_WINDOWS=false if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then IS_WINDOWS=true @@ -49,30 +47,22 @@ echo "Generating MODULE.bazel for Python $PYTHON_VERSION..." sed "s/{{PYTHON_VERSION}}/$PYTHON_VERSION/g" MODULE.bazel.template > MODULE.bazel echo "" -REPO_CACHE=$(cygpath -w "$HOME/.cache/bazel-repo" 2>/dev/null || echo "$HOME/.cache/bazel-repo") - echo "Running all Bazel tests..." -if [[ "$IS_WINDOWS" == true ]]; then - # Exclude Rust targets: rules_rust toolchain cannot build on Windows - TARGETS="//:test_speed_limit //:test_braking //:test_update_rate //consumer:test_cpp_test" - bazel test --config=ci --repository_cache="$REPO_CACHE" $TARGETS --test_output=errors -else - bazel test --config=ci --repository_cache="$REPO_CACHE" //... --test_output=errors -fi +bazel test $BAZEL_OPTS //... --test_output=errors echo "" echo "Building release report..." -bazel build --config=ci --repository_cache="$REPO_CACHE" //:integration_release_report +bazel build $BAZEL_OPTS //:integration_release_report echo "" echo "Verifying release report..." if [ -f bazel-bin/RELEASE_REPORT.md ]; then - echo "✓ Release report generated successfully" + echo "Release report generated successfully" echo "" echo "Report summary:" head -20 bazel-bin/RELEASE_REPORT.md else - echo "✗ Release report not found" + echo "Release report not found" exit 1 fi echo "" @@ -81,7 +71,7 @@ echo "Running release readiness test..." if [[ "$IS_WINDOWS" == true ]]; then echo "Skipping release readiness test on Windows (sh_test not supported)" else - bazel test --config=ci --repository_cache="$REPO_CACHE" //:integration_release_readiness --test_output=all + bazel test $BAZEL_OPTS //:integration_release_readiness --test_output=all fi echo "" From d175ef426dffb488471c445a3d64c8d125a550e2 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 22 Mar 2026 15:42:26 +0100 Subject: [PATCH 14/19] Fix BAZEL_EXTRA_OPTS: use shell export for $HOME expansion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub Actions env: context doesn't expand $HOME — it passes the literal string. Move to shell export so $HOME expands at runtime. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cc12866..f514001 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -113,9 +113,8 @@ jobs: - name: Run failure tests shell: bash - env: - BAZEL_EXTRA_OPTS: "--config=ci --repository_cache=$HOME/.cache/bazel-repo-failure" run: | + export BAZEL_EXTRA_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo-failure" ./fire/starlark/failure_test/run_failure_tests.sh integration-test: @@ -143,8 +142,7 @@ jobs: - name: Run integration test shell: bash - env: - BAZEL_EXTRA_OPTS: "--config=ci --repository_cache=$HOME/.cache/bazel-repo" run: | + export BAZEL_EXTRA_OPTS="--config=ci --repository_cache=$HOME/.cache/bazel-repo" cd integration_test ./run.sh --python-version ${{ matrix.python-version }} From 9085d8465fc4186c6a06f747cfc1c46d9243334a Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Fri, 27 Mar 2026 07:11:51 +0100 Subject: [PATCH 15/19] Tag release_readiness_test with requires-shell for Windows exclusion - Add requires-shell tag to release_readiness_test (generates .sh test script that Windows cannot execute via CreateProcessW) - Add -requires-shell to build/test tag filters in .bazelrc for Windows - Remove manual IS_WINDOWS check from integration run.sh (handled by .bazelrc tag filters now) - Add fail-fast: false to failure-tests matrix Co-Authored-By: Claude Opus 4.6 --- .bazelrc | 7 ++++--- .github/workflows/ci.yaml | 1 + integration_test/.bazelrc | 7 ++++--- integration_test/BUILD.bazel | 1 + integration_test/run.sh | 12 +----------- 5 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.bazelrc b/.bazelrc index 8e11c50..fde94ee 100644 --- a/.bazelrc +++ b/.bazelrc @@ -20,9 +20,10 @@ build:macos --host_cxxopt=-std=c++17 build:windows --cxxopt=/std:c++20 build:windows --host_cxxopt=/std:c++20 -# Windows: exclude Rust targets (rules_rust toolchain cannot build on Windows) -build:windows --build_tag_filters=-requires-rust -test:windows --test_tag_filters=-requires-rust +# Windows: exclude Rust targets and shell-based tests +# (rules_rust toolchain cannot build, sh_test scripts cannot execute on Windows) +build:windows --build_tag_filters=-requires-rust,-requires-shell +test:windows --test_tag_filters=-requires-rust,-requires-shell # Java configuration - use Java 17 for records support build --java_language_version=17 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f514001..9080ee5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -95,6 +95,7 @@ jobs: name: Failure Tests (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [ubuntu-latest, windows-latest] steps: diff --git a/integration_test/.bazelrc b/integration_test/.bazelrc index 77db818..f5004b1 100644 --- a/integration_test/.bazelrc +++ b/integration_test/.bazelrc @@ -6,9 +6,10 @@ common --enable_bzlmod # Auto-select platform config (linux/macos/windows) common --enable_platform_specific_config -# Windows: exclude Rust targets (rules_rust toolchain cannot build on Windows) -build:windows --build_tag_filters=-requires-rust -test:windows --test_tag_filters=-requires-rust +# Windows: exclude Rust targets and shell-based tests +# (rules_rust toolchain cannot build, sh_test scripts cannot execute on Windows) +build:windows --build_tag_filters=-requires-rust,-requires-shell +test:windows --test_tag_filters=-requires-rust,-requires-shell # CI configuration - enables caching for GitHub Actions # Note: repository_cache path must be passed as a flag for proper $HOME expansion diff --git a/integration_test/BUILD.bazel b/integration_test/BUILD.bazel index 006c3af..1b72580 100644 --- a/integration_test/BUILD.bazel +++ b/integration_test/BUILD.bazel @@ -102,4 +102,5 @@ release_report( release_readiness_test( name = "integration_release_readiness", report = ":integration_release_report", + tags = ["requires-shell"], ) diff --git a/integration_test/run.sh b/integration_test/run.sh index 951cbb9..2b1755f 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -30,12 +30,6 @@ done # Accept extra Bazel options from environment (e.g., --config=ci --repository_cache=...) BAZEL_OPTS="${BAZEL_EXTRA_OPTS:-}" -# Detect Windows for release_readiness_test skip (generates .sh test script) -IS_WINDOWS=false -if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then - IS_WINDOWS=true -fi - echo "=========================================" echo "Fire Integration Test" echo "Python Version: $PYTHON_VERSION" @@ -68,11 +62,7 @@ fi echo "" echo "Running release readiness test..." -if [[ "$IS_WINDOWS" == true ]]; then - echo "Skipping release readiness test on Windows (sh_test not supported)" -else - bazel test $BAZEL_OPTS //:integration_release_readiness --test_output=all -fi +bazel test $BAZEL_OPTS //:integration_release_readiness --test_output=all echo "" echo "Integration tests completed successfully!" From abdee1e6ada79b0e1156d3e763e28fb1a3680faf Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sat, 28 Mar 2026 07:13:17 +0100 Subject: [PATCH 16/19] Handle exit code 4 from bazel test when tag filters skip all targets On Windows, --test_tag_filters=-requires-shell causes bazel test with an explicit target to return exit code 4 (no test targets found). Treat this as a skip rather than a failure. Co-Authored-By: Claude Opus 4.6 --- integration_test/run.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/integration_test/run.sh b/integration_test/run.sh index 2b1755f..b6c109e 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -62,7 +62,16 @@ fi echo "" echo "Running release readiness test..." +set +e bazel test $BAZEL_OPTS //:integration_release_readiness --test_output=all +rc=$? +set -e +if [ $rc -eq 4 ]; then + # Exit code 4 means no test targets matched (e.g., filtered out on Windows) + echo "Release readiness test skipped (filtered by platform tag)" +elif [ $rc -ne 0 ]; then + exit $rc +fi echo "" echo "Integration tests completed successfully!" From 2ce5af72c9c645c936082ad6702ef8a587b0531f Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 29 Mar 2026 18:05:11 +0200 Subject: [PATCH 17/19] Remove fail-fast: false from CI tests --- .github/workflows/ci.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9080ee5..a91eb64 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,6 @@ jobs: name: Bazel Tests (Bazel ${{ matrix.bazel-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: - fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] bazel-version: ["7.x", "8.x", "9.x"] @@ -95,7 +94,6 @@ jobs: name: Failure Tests (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: - fail-fast: false matrix: os: [ubuntu-latest, windows-latest] steps: @@ -122,7 +120,6 @@ jobs: name: Integration Test (Python ${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: - fail-fast: false matrix: os: [ubuntu-latest, windows-latest] python-version: ["3.10", "3.11", "3.12", "3.13"] From 12dee7bd1f5fd9c02e7dff8a0fb405ec58d64008 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 29 Mar 2026 18:05:45 +0200 Subject: [PATCH 18/19] Add Module.bazel.lock for integration test --- integration_test/MODULE.bazel.lock | 145 ++++++++++++++++++++++++++--- 1 file changed, 133 insertions(+), 12 deletions(-) diff --git a/integration_test/MODULE.bazel.lock b/integration_test/MODULE.bazel.lock index ac26f8e..e0ba528 100644 --- a/integration_test/MODULE.bazel.lock +++ b/integration_test/MODULE.bazel.lock @@ -36,8 +36,9 @@ "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87", "https://bcr.bazel.build/modules/bazel_features/1.32.0/MODULE.bazel": "095d67022a58cb20f7e20e1aefecfa65257a222c18a938e2914fd257b5f1ccdc", "https://bcr.bazel.build/modules/bazel_features/1.33.0/MODULE.bazel": "8b8dc9d2a4c88609409c3191165bccec0e4cb044cd7a72ccbe826583303459f6", - "https://bcr.bazel.build/modules/bazel_features/1.33.0/source.json": "13617db3930328c2cd2807a0f13d52ca870ac05f96db9668655113265147b2a6", "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", + "https://bcr.bazel.build/modules/bazel_features/1.42.1/MODULE.bazel": "275a59b5406ff18c01739860aa70ad7ccb3cfb474579411decca11c93b951080", + "https://bcr.bazel.build/modules/bazel_features/1.42.1/source.json": "fcd4396b2df85f64f2b3bb436ad870793ecf39180f1d796f913cc9276d355309", "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", "https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8", "https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e", @@ -54,8 +55,8 @@ "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67", "https://bcr.bazel.build/modules/bazel_skylib/1.9.0/MODULE.bazel": "72997b29dfd95c3fa0d0c48322d05590418edef451f8db8db5509c57875fb4b7", "https://bcr.bazel.build/modules/bazel_skylib/1.9.0/source.json": "7ad77c1e8c1b84222d9b3f3cae016a76639435744c19330b0b37c0a3c9da7dc0", - "https://bcr.bazel.build/modules/buildozer/8.2.1/MODULE.bazel": "61e9433c574c2bd9519cad7fa66b9c1d2b8e8d5f3ae5d6528a2c2d26e68d874d", - "https://bcr.bazel.build/modules/buildozer/8.2.1/source.json": "7c33f6a26ee0216f85544b4bca5e9044579e0219b6898dd653f5fb449cf2e484", + "https://bcr.bazel.build/modules/buildozer/8.5.1/MODULE.bazel": "a35d9561b3fc5b18797c330793e99e3b834a473d5fbd3d7d7634aafc9bdb6f8f", + "https://bcr.bazel.build/modules/buildozer/8.5.1/source.json": "e3386e6ff4529f2442800dee47ad28d3e6487f36a1f75ae39ae56c70f0cd2fbd", "https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb", "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4", "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6", @@ -115,9 +116,8 @@ "https://bcr.bazel.build/modules/rules_cc/0.1.5/MODULE.bazel": "88dfc9361e8b5ae1008ac38f7cdfd45ad738e4fa676a3ad67d19204f045a1fd8", "https://bcr.bazel.build/modules/rules_cc/0.2.0/MODULE.bazel": "b5c17f90458caae90d2ccd114c81970062946f49f355610ed89bebf954f5783c", "https://bcr.bazel.build/modules/rules_cc/0.2.13/MODULE.bazel": "eecdd666eda6be16a8d9dc15e44b5c75133405e820f620a234acc4b1fdc5aa37", - "https://bcr.bazel.build/modules/rules_cc/0.2.14/MODULE.bazel": "353c99ed148887ee89c54a17d4100ae7e7e436593d104b668476019023b58df8", - "https://bcr.bazel.build/modules/rules_cc/0.2.16/MODULE.bazel": "9242fa89f950c6ef7702801ab53922e99c69b02310c39fb6e62b2bd30df2a1d4", - "https://bcr.bazel.build/modules/rules_cc/0.2.16/source.json": "d03d5cde49376d87e14ec14b666c56075e5e3926930327fd5d0484a1ff2ac1cc", + "https://bcr.bazel.build/modules/rules_cc/0.2.17/MODULE.bazel": "1849602c86cb60da8613d2de887f9566a6d354a6df6d7009f9d04a14402f9a84", + "https://bcr.bazel.build/modules/rules_cc/0.2.17/source.json": "3832f45d145354049137c0090df04629d9c2b5493dc5c2bf46f1834040133a07", "https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc", "https://bcr.bazel.build/modules/rules_cc/0.2.8/MODULE.bazel": "f1df20f0bf22c28192a794f29b501ee2018fa37a3862a1a2132ae2940a23a642", "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6", @@ -166,10 +166,10 @@ "https://bcr.bazel.build/modules/rules_python/1.4.1/MODULE.bazel": "8991ad45bdc25018301d6b7e1d3626afc3c8af8aaf4bc04f23d0b99c938b73a6", "https://bcr.bazel.build/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8", "https://bcr.bazel.build/modules/rules_python/1.7.0/MODULE.bazel": "d01f995ecd137abf30238ad9ce97f8fc3ac57289c8b24bd0bf53324d937a14f8", - "https://bcr.bazel.build/modules/rules_python/1.8.3/MODULE.bazel": "f343e159b59701334be3914416b9f1b72845801ba47920fcb288af4ce8c5cce3", - "https://bcr.bazel.build/modules/rules_python/1.8.3/source.json": "e5439f308e3c6f79f318a0f87108db46fc575be89370c3dfb3f7e0eaa571a3f8", - "https://bcr.bazel.build/modules/rules_rust/0.68.1/MODULE.bazel": "8d3332ef4079673385eb81f8bd68b012decc04ac00c9d5a01a40eff90301732c", - "https://bcr.bazel.build/modules/rules_rust/0.68.1/source.json": "3378e746f81b62457fdfd37391244fa8ff075ba85c05931ee4f3a20ac1efe963", + "https://bcr.bazel.build/modules/rules_python/1.8.5/MODULE.bazel": "28b2d79ed8368d7d45b34bacc220e3c0b99cbcd9392641961b849e4c3f55dd30", + "https://bcr.bazel.build/modules/rules_python/1.8.5/source.json": "e261b03c8804f2582c9536013f987e1ea105a2b38c238aa2ac8f98fc34c8b18a", + "https://bcr.bazel.build/modules/rules_rust/0.69.0/MODULE.bazel": "4326fec48f2fef0d514de46346f7f77e200c82936dd08b91c9ef039fbdad5c10", + "https://bcr.bazel.build/modules/rules_rust/0.69.0/source.json": "0d094307d690cc18b3ab003998697be8070a206f65592c5c8476999796f11c4b", "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c", "https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b", "https://bcr.bazel.build/modules/rules_shell/0.6.1/MODULE.bazel": "72e76b0eea4e81611ef5452aa82b3da34caca0c8b7b5c0c9584338aa93bae26b", @@ -195,6 +195,28 @@ }, "selectedYankedVersions": {}, "moduleExtensions": { + "@@pybind11_bazel+//:internal_configure.bzl%internal_configure_extension": { + "general": { + "bzlTransitiveDigest": "06cynZ1bCvvy8zHPrrDlXq+Z68xmjctHpfFxi+zEpJY=", + "usagesDigest": "D1r3lfzMuUBFxgG8V6o0bQTLMk3GkaGOaPzw53wrwyw=", + "recordedInputs": [ + "REPO_MAPPING:pybind11_bazel+,bazel_tools bazel_tools", + "FILE:@@pybind11_bazel+//MODULE.bazel e6f4c20442eaa7c90d7190d8dc539d0ab422f95c65a57cc59562170c58ae3d34" + ], + "generatedRepoSpecs": { + "pybind11": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "build_file": "@@pybind11_bazel+//:pybind11-BUILD.bazel", + "strip_prefix": "pybind11-2.12.0", + "urls": [ + "https://github.com/pybind/pybind11/archive/v2.12.0.zip" + ] + } + } + } + } + }, "@@rules_kotlin+//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": { "general": { "bzlTransitiveDigest": "ABI1D/sbS1ovwaW/kHDoj8nnXjQ0oKU9fzmzEG4iT8o=", @@ -255,7 +277,7 @@ "@@rules_python+//python/extensions:config.bzl%config": { "general": { "bzlTransitiveDigest": "wUM/eFwo5Zy7rn36nZ9ZxN9tXhmcWMVGXIExerGg6gM=", - "usagesDigest": "HZ99ezJBkgjKcxXQ3OBxGgesUIMF6eg7E0TUNOait2I=", + "usagesDigest": "lDbpRfhoWmZCHSaNxwZv/8fF2y0wu2th0G0f/uqX7VM=", "recordedInputs": [ "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", "REPO_MAPPING:rules_python+,pypi__build rules_python++config+pypi__build", @@ -423,7 +445,7 @@ "@@rules_python+//python/uv:uv.bzl%uv": { "general": { "bzlTransitiveDigest": "ijW9KS7qsIY+yBVvJ+Nr1mzwQox09j13DnE3iIwaeTM=", - "usagesDigest": "XRYYokHTb3p1WwpZj2sncZ1bh8zJfO4YrKJ2PkapnO8=", + "usagesDigest": "c4BCoL7WnccEomzDYulDuOys9pd6N93KaNI4mTVbqi0=", "recordedInputs": [ "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", "REPO_MAPPING:rules_python+,platforms platforms" @@ -449,6 +471,105 @@ } } } + }, + "@@rules_rust+//crate_universe/private:internal_extensions.bzl%cu_nr": { + "general": { + "bzlTransitiveDigest": "+GMGLO8fhObMT4QIEm4KHXZlSvypggLOZN+UGbwWea4=", + "usagesDigest": "tG3p3Nb5XxC7vWY/bcKdb//g0HoAxpxxH3F5/jBVlk4=", + "recordedInputs": [ + "REPO_MAPPING:bazel_features+,bazel_features_globals bazel_features++version_extension+bazel_features_globals", + "REPO_MAPPING:bazel_features+,bazel_features_version bazel_features++version_extension+bazel_features_version", + "REPO_MAPPING:rules_cc+,bazel_skylib bazel_skylib+", + "REPO_MAPPING:rules_cc+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_cc+,cc_compatibility_proxy rules_cc++compatibility_proxy+cc_compatibility_proxy", + "REPO_MAPPING:rules_cc+,platforms platforms", + "REPO_MAPPING:rules_cc+,rules_cc rules_cc+", + "REPO_MAPPING:rules_cc++compatibility_proxy+cc_compatibility_proxy,rules_cc rules_cc+", + "REPO_MAPPING:rules_rust+,bazel_features bazel_features+", + "REPO_MAPPING:rules_rust+,bazel_skylib bazel_skylib+", + "REPO_MAPPING:rules_rust+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_rust+,cui rules_rust++cu+cui", + "REPO_MAPPING:rules_rust+,rrc rules_rust++i2+rrc", + "REPO_MAPPING:rules_rust+,rules_cc rules_cc+", + "REPO_MAPPING:rules_rust+,rules_rust rules_rust+" + ], + "generatedRepoSpecs": { + "cargo_bazel_bootstrap": { + "repoRuleId": "@@rules_rust+//cargo/private:cargo_bootstrap.bzl%cargo_bootstrap_repository", + "attributes": { + "srcs": [ + "@@rules_rust+//crate_universe:src/api.rs", + "@@rules_rust+//crate_universe:src/api/lockfile.rs", + "@@rules_rust+//crate_universe:src/cli.rs", + "@@rules_rust+//crate_universe:src/cli/generate.rs", + "@@rules_rust+//crate_universe:src/cli/query.rs", + "@@rules_rust+//crate_universe:src/cli/render.rs", + "@@rules_rust+//crate_universe:src/cli/splice.rs", + "@@rules_rust+//crate_universe:src/cli/vendor.rs", + "@@rules_rust+//crate_universe:src/config.rs", + "@@rules_rust+//crate_universe:src/context.rs", + "@@rules_rust+//crate_universe:src/context/crate_context.rs", + "@@rules_rust+//crate_universe:src/context/platforms.rs", + "@@rules_rust+//crate_universe:src/lib.rs", + "@@rules_rust+//crate_universe:src/lockfile.rs", + "@@rules_rust+//crate_universe:src/main.rs", + "@@rules_rust+//crate_universe:src/metadata.rs", + "@@rules_rust+//crate_universe:src/metadata/cargo_bin.rs", + "@@rules_rust+//crate_universe:src/metadata/cargo_tree_resolver.rs", + "@@rules_rust+//crate_universe:src/metadata/cargo_tree_rustc_wrapper.bat", + "@@rules_rust+//crate_universe:src/metadata/cargo_tree_rustc_wrapper.sh", + "@@rules_rust+//crate_universe:src/metadata/dependency.rs", + "@@rules_rust+//crate_universe:src/metadata/metadata_annotation.rs", + "@@rules_rust+//crate_universe:src/rendering.rs", + "@@rules_rust+//crate_universe:src/rendering/template_engine.rs", + "@@rules_rust+//crate_universe:src/rendering/templates/module_bzl.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/header.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/aliases_map.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/deps_map.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/repo_git.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/repo_http.j2", + "@@rules_rust+//crate_universe:src/rendering/templates/vendor_module.j2", + "@@rules_rust+//crate_universe:src/rendering/verbatim/alias_rules.bzl", + "@@rules_rust+//crate_universe:src/select.rs", + "@@rules_rust+//crate_universe:src/splicing.rs", + "@@rules_rust+//crate_universe:src/splicing/cargo_config.rs", + "@@rules_rust+//crate_universe:src/splicing/crate_index_lookup.rs", + "@@rules_rust+//crate_universe:src/splicing/splicer.rs", + "@@rules_rust+//crate_universe:src/test.rs", + "@@rules_rust+//crate_universe:src/utils.rs", + "@@rules_rust+//crate_universe:src/utils/starlark.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/glob.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/label.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select_dict.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select_list.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select_scalar.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/select_set.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/serialize.rs", + "@@rules_rust+//crate_universe:src/utils/starlark/target_compatible_with.rs", + "@@rules_rust+//crate_universe:src/utils/symlink.rs", + "@@rules_rust+//crate_universe:src/utils/target_triple.rs" + ], + "binary": "cargo-bazel", + "cargo_lockfile": "@@rules_rust+//crate_universe:Cargo.lock", + "cargo_toml": "@@rules_rust+//crate_universe:Cargo.toml", + "version": "1.93.1", + "timeout": 900, + "rust_toolchain_cargo_template": "@rust_host_tools//:bin/{tool}", + "rust_toolchain_rustc_template": "@rust_host_tools//:bin/{tool}", + "compressed_windows_toolchain_names": false + } + } + }, + "moduleExtensionMetadata": { + "explicitRootModuleDirectDeps": [ + "cargo_bazel_bootstrap" + ], + "explicitRootModuleDirectDevDeps": [], + "useAllRepos": "NO", + "reproducible": false + } + } } }, "facts": {} From 62d9b6784c18df43cf49fd228ab3b83db37f6911 Mon Sep 17 00:00:00 2001 From: Jochen Issing Date: Sun, 29 Mar 2026 18:19:36 +0200 Subject: [PATCH 19/19] Document Windows support limitations in README Add section covering Rust exclusion tags, shell-based test rules, required .bazelrc platform config, MSVC C++20 requirement, and UTF-8 file encoding. Co-Authored-By: Claude Opus 4.6 --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/README.md b/README.md index 8b5162c..c49a26d 100644 --- a/README.md +++ b/README.md @@ -290,3 +290,63 @@ cat bazel-bin/path/to/RELEASE_REPORT.md Use `release_readiness_test` as a CI gate — it fails the build when the report status is `NOT READY FOR RELEASE`. + +## Windows Support + +FIRE supports Windows with the following limitations: + +### Rust code generation + +The `rules_rust` toolchain cannot build on Windows due to an upstream linker +issue with the process_wrapper. All Rust targets must be tagged with +`requires-rust` so they are automatically excluded on Windows via `.bazelrc`: + +```starlark +rust_library( + name = "my_params_rs", + srcs = [":my_params_rs_src"], + tags = ["requires-rust"], +) +``` + +### Shell-based test rules + +`release_readiness_test` generates a shell script as its test executable, which +Windows cannot run via `CreateProcessW`. Tag these targets with `requires-shell` +to exclude them on Windows: + +```starlark +release_readiness_test( + name = "release_readiness", + report = ":release_report", + tags = ["requires-shell"], +) +``` + +### Platform configuration + +Windows exclusions are handled automatically via `.bazelrc` platform config. +Projects consuming FIRE should include these lines in their `.bazelrc`: + +```text +common --enable_platform_specific_config + +build:windows --build_tag_filters=-requires-rust,-requires-shell +test:windows --test_tag_filters=-requires-rust,-requires-shell +``` + +### C++ standard + +Windows (MSVC) requires C++20 for designated initializer support. Configure +in `.bazelrc`: + +```text +build:windows --cxxopt=/std:c++20 +build:windows --host_cxxopt=/std:c++20 +``` + +### File encoding + +Python scripts that read or write files containing Unicode characters (e.g., +`✓`, `⚠️`) must specify `encoding="utf-8"` explicitly, as Windows defaults to +`cp1252`.