Skip to content

Commit 00dd24f

Browse files
authored
Bump bazel_lib from 3.0.1 to 3.1.1 (#45220)
### What does this PR do? This upgrade includes a Windows compatibility fix for batch file line endings (bazel-contrib/bazel-lib#1222), which resolves a cmd parsing bug where GOTO/CALL to labels fails when batch files use non CRLF-only line endings and a label crosses a 512-byte boundary: ```diff > bazel test //deps/openssl3:module_consistency_test [...] ==================== Test output for //deps/openssl3:module_consistency_test: -The system cannot find the batch label specified - compare_files +compare_files +FAIL: files "C:\[...]\bazel-out\[...]\deps\openssl3\openssl3.MODULE.bazel.new" and "C:\[workspace]\deps\openssl3\openssl3.MODULE.bazel" differ. + + +@@//deps/openssl3:openssl3.MODULE.bazel is out of date. To update this file, run: + + bazel run //deps/openssl3:module_consistency +To see differences run: + + diff "C:\[...]\bazel-out\[...]\deps\openssl3\openssl3.MODULE.bazel.new" "C:\[workspace]\deps\openssl3\openssl3.MODULE.bazel" + ================================================================================ ``` Because this now surfaces we'd been generating `*.MODULE.bazel` with OS-specific newlines, the present change fixes it by always issuing UNIX-style newlines: ``` > bazel test //deps/openssl3:module_consistency_test [...] //deps/openssl3:module_consistency_test PASSED in 0.4s ``` ### Motivation Keep up to date and better support colleagues working on Windows. ### Describe how you validated your changes Locally for the time being because we still have very limited test coverage due to #44455 being disputed. ### Additional Notes `bazel_lib` 3.1.0/3.1.1 comes with further improvements, like: - bazel-contrib/bazel-lib#1217 - bazel-contrib/bazel-lib#1220 - bazel-contrib/bazel-lib#1232 Co-authored-by: regis.desgroppes <[email protected]>
1 parent 8b86f35 commit 00dd24f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ bazel_dep(name = "supply_chain_tools", version = "0.0.1")
2727
bazel_dep(name = "platforms", version = "1.0.0")
2828
bazel_dep(name = "bazel_features", version = "1.34.0")
2929
bazel_dep(name = "bazel_skylib", version = "1.8.2")
30-
bazel_dep(name = "bazel_lib", version = "3.0.1")
30+
bazel_dep(name = "bazel_lib", version = "3.1.1")
3131
bazel_dep(name = "rules_go", version = "0.59.0") # for https://github.com/bazel-contrib/rules_go/pull/4493
3232
bazel_dep(name = "rules_pkg", version = "1.1.0")
3333
bazel_dep(name = "rules_shell", version = "0.6.1")

MODULE.bazel.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel/tools/generate_module_bazel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def main():
8686
if args.output:
8787
output_path = Path(args.output)
8888
output_path.parent.mkdir(parents=True, exist_ok=True)
89-
output_path.write_text(content)
89+
output_path.write_text(content, newline="\n")
9090
print(f"Generated {args.output}", file=sys.stderr)
9191
else:
9292
sys.stdout.write(content)

0 commit comments

Comments
 (0)