diff --git a/WORKSPACE b/WORKSPACE index 280dae214b2..1286ef9ac03 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -2,22 +2,22 @@ workspace(name = "org_tensorflow") # Initialize the TensorFlow repository and all dependencies. # -# The cascade of load() statements and workspace() calls works around the +# The cascade of load() statements and tf_workspace?() calls works around the # restriction that load() statements need to be at the top of .bzl files. # E.g. we can not retrieve a new repository with http_archive and then load() # a macro from that repository in the same file. -load("@//tensorflow:workspace3.bzl", "workspace") +load("@//tensorflow:workspace3.bzl", "tf_workspace3") -workspace() +tf_workspace3() -load("@//tensorflow:workspace2.bzl", "workspace") +load("@//tensorflow:workspace2.bzl", "tf_workspace2") -workspace() +tf_workspace2() -load("@//tensorflow:workspace1.bzl", "workspace") +load("@//tensorflow:workspace1.bzl", "tf_workspace1") -workspace() +tf_workspace1() -load("@//tensorflow:workspace0.bzl", "workspace") +load("@//tensorflow:workspace0.bzl", "tf_workspace0") -workspace() +tf_workspace0() diff --git a/tensorflow/workspace0.bzl b/tensorflow/workspace0.bzl index a6f3b0502f0..1c744241ee2 100644 --- a/tensorflow/workspace0.bzl +++ b/tensorflow/workspace0.bzl @@ -76,3 +76,7 @@ def workspace(): grpc_extra_deps() config_googleapis() + +# Alias so it can be loaded without assigning to a different symbol to prevent +# shadowing previous loads and trigger a buildifier warning. +tf_workspace0 = workspace diff --git a/tensorflow/workspace1.bzl b/tensorflow/workspace1.bzl index 76609b83079..f40b21dd2c5 100644 --- a/tensorflow/workspace1.bzl +++ b/tensorflow/workspace1.bzl @@ -14,3 +14,7 @@ def workspace(): android_configure(name = "local_config_android") grpc_deps() + +# Alias so it can be loaded without assigning to a different symbol to prevent +# shadowing previous loads and trigger a buildifier warning. +tf_workspace1 = workspace diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl index 9b628866543..0161662cee4 100644 --- a/tensorflow/workspace2.bzl +++ b/tensorflow/workspace2.bzl @@ -11,3 +11,7 @@ def workspace(): # Load tf_repositories() before loading dependencies for other repository so # that dependencies like com_google_protobuf won't be overridden. tf_repositories() + +# Alias so it can be loaded without assigning to a different symbol to prevent +# shadowing previous loads and trigger a buildifier warning. +tf_workspace2 = workspace diff --git a/tensorflow/workspace3.bzl b/tensorflow/workspace3.bzl index 03364c8001e..8ae8799ca1d 100644 --- a/tensorflow/workspace3.bzl +++ b/tensorflow/workspace3.bzl @@ -12,3 +12,7 @@ def workspace(): "https://github.com/bazelbuild/rules_closure/archive/308b05b2419edb5c8ee0471b67a40403df940149.tar.gz", # 2019-06-13 ], ) + +# Alias so it can be loaded without assigning to a different symbol to prevent +# shadowing previous loads and trigger a buildifier warning. +tf_workspace3 = workspace