|
|
|
@ -21,6 +21,11 @@ |
|
|
|
|
# is chosen to match the format of a "build.yaml" file, which used |
|
|
|
|
# to be build the source of truth for gRPC build before bazel became |
|
|
|
|
# the primary build system. |
|
|
|
|
# A good basic overview of the "build.yaml" format is available here: |
|
|
|
|
# https://github.com/grpc/grpc/blob/master/templates/README.md. Note that |
|
|
|
|
# while useful as an overview, the doc does not act as formal spec |
|
|
|
|
# (formal spec does not exist in fact) and the doc can be incomplete, |
|
|
|
|
# inaccurate or slightly out of date. |
|
|
|
|
|
|
|
|
|
import subprocess |
|
|
|
|
import yaml |
|
|
|
@ -340,8 +345,12 @@ def _generate_build_metadata(build_extra_metadata, bazel_rules): |
|
|
|
|
# not necessarily expose all the targets that are present in bazel build. |
|
|
|
|
# These "intermediate dependencies" might get flattened. |
|
|
|
|
# TODO(jtattermusch): This is done to avoid introducing too many intermediate |
|
|
|
|
# libraries into the build.yaml-based builds (which might in turn cause issues |
|
|
|
|
# building language-specific artifacts). The need for elision (and expansion) |
|
|
|
|
# libraries into the build.yaml-based builds (which might in cause issues |
|
|
|
|
# building language-specific artifacts) and also because the libraries |
|
|
|
|
# in build.yaml-based build are generally considered units of distributions |
|
|
|
|
# (= public libraries that are visible to the user and are installable), |
|
|
|
|
# while in bazel builds it is customary to define larger number of smaller |
|
|
|
|
# "sublibraries". The need for elision (and expansion) |
|
|
|
|
# of intermediate libraries can be re-evaluated in the future. |
|
|
|
|
_expand_intermediate_deps(lib_dict, lib_names, bazel_rules) |
|
|
|
|
|
|
|
|
@ -1047,9 +1056,8 @@ all_targets_dict = _generate_build_metadata(all_extra_metadata, bazel_rules) |
|
|
|
|
# at the same time. |
|
|
|
|
build_yaml_like = _convert_to_build_yaml_like(all_targets_dict) |
|
|
|
|
|
|
|
|
|
_detect_and_print_issues( |
|
|
|
|
build_yaml_like |
|
|
|
|
) # detect and report some suspicious situations we've seen before |
|
|
|
|
# detect and report some suspicious situations we've seen before |
|
|
|
|
_detect_and_print_issues(build_yaml_like) |
|
|
|
|
|
|
|
|
|
# Step 6: Store the build_autogenerated.yaml in a deterministic (=sorted) |
|
|
|
|
# and cleaned-up form. |
|
|
|
|