Skip to content

Commit

Permalink
Added comment on why we need our own version of get_bazel_version
Browse files Browse the repository at this point in the history
  • Loading branch information
Karim Alweheshy committed Mar 3, 2024
1 parent 5bf97bf commit 7a76185
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rules/internal/bazel_version.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
"Bazel version parsing"

# There are utility functions for parsing versions numbers here:
# load("@bazel_skylib//lib:versions.bzl", "versions")
# But we don't want to use them, as skylib is not yet loaded when code
# in this file executes. There's no way to execute it later, because
# `native.bazel_version`'s availability is restricted:
# https://github.com/bazelbuild/bazel/issues/8305
def get_bazel_version(bazel_version = getattr(native, "bazel_version", "")):
"""
Parse the Bazel version into a `struct`.
Expand Down

0 comments on commit 7a76185

Please sign in to comment.