fix(bazel): keep the CRLF lines of the stamped Windows version header and load bazel_features for the MSVC toolchain #4017
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.46) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 476 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.369
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4017"
general
weight: 0.35
ethanglaser
Description
Stamped builds (
--config=release-dpc) fill in the build date of the version headers withsedin arun_shellaction (expand_build_date, #3962). On Windows thatsedis the MSYS one, which reads in text mode and drops every CR, including the ones_copy_version_headerputs on the seven version#definelines to match Make. So the Make and Bazel Windows releases differ in line endings only:That is the only difference, and it fails the release compare step of
Nightly-test / oneDAL Windows Bazel teston main since #3962 (scheduled run at c3e296509) and on every pull request that runs Nightly-test, for example #3979.The stamping
sednow runs with-b, which keeps the CRs. GNUsedaccepts-bon every platform and changes nothing where there is no text mode, so Linux output is byte-identical (a stamped--config=release-dpcbuild of//cpp/daal:versionwrites the same file), and unstamped builds still useexpand_template. No OS check or parameter is needed.MSVC toolchain on rules_cc 0.2.28
WindowsBazel_MKL(AVX2)-MSVC-GitHub hostedfails on main since the rules_cc 0.2.28 bump (#4003):rules_cc 0.2.28 loads
@bazel_featuresin thewindows_cc_toolchain_config.bzlit generates forcl. Our cc toolchain extension writes that file into its own repository, which sees only the root module's dependencies, so the rootMODULE.bazelnow hasbazel_dep(name = "bazel_features", version = "1.50.0"), the version rules_cc 0.2.28 requires. The module graph andMODULE.bazel.lockdo not change. Only thecllane uses that file; the icx and clang-cl toolchains have their own config.Testing
--config=release-dpc) of the DAAL version header runssed -band writes the date as before.printf 'a\r\n#define D @ONEDAL_BUILD_DATE@\r\nb\n' | sed -b ...keeps both CRs.@bazel_features//:features.bzlresolves from the root module,//:releaseand//:release_allanalyse, and//examples/oneapi/cpp:kmeans_lloyd_dense_batch_host(the MSVC lane's test) passes.Nightly-test / oneDAL Windows Bazel test(release compare) andWindowsBazel_MKL(AVX2)-MSVC-GitHub hostedon this PR; both fail on main without these changes.---
<details>
<summary>Checklist:</summary>
Completeness and readability
Testing
Performance
</details>
🤖 Generated with Claude Code