Skip to content

Commit e70a5f4

Browse files
chsiggtensorflower-gardener
authored andcommitted
Prevent buildifier warning in WORKSPACE file.
PiperOrigin-RevId: 354993799 Change-Id: If1ed5db7cb3f9ba82b179ed9070b027088ca0493
1 parent 808fc11 commit e70a5f4

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

WORKSPACE

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ workspace(name = "org_tensorflow")
22

33
# Initialize the TensorFlow repository and all dependencies.
44
#
5-
# The cascade of load() statements and workspace() calls works around the
5+
# The cascade of load() statements and tf_workspace?() calls works around the
66
# restriction that load() statements need to be at the top of .bzl files.
77
# E.g. we can not retrieve a new repository with http_archive and then load()
88
# a macro from that repository in the same file.
9-
load("@//tensorflow:workspace3.bzl", "workspace")
9+
load("@//tensorflow:workspace3.bzl", "tf_workspace3")
1010

11-
workspace()
11+
tf_workspace3()
1212

13-
load("@//tensorflow:workspace2.bzl", "workspace")
13+
load("@//tensorflow:workspace2.bzl", "tf_workspace2")
1414

15-
workspace()
15+
tf_workspace2()
1616

17-
load("@//tensorflow:workspace1.bzl", "workspace")
17+
load("@//tensorflow:workspace1.bzl", "tf_workspace1")
1818

19-
workspace()
19+
tf_workspace1()
2020

21-
load("@//tensorflow:workspace0.bzl", "workspace")
21+
load("@//tensorflow:workspace0.bzl", "tf_workspace0")
2222

23-
workspace()
23+
tf_workspace0()

tensorflow/workspace0.bzl

+4
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,7 @@ def workspace():
7676

7777
grpc_extra_deps()
7878
config_googleapis()
79+
80+
# Alias so it can be loaded without assigning to a different symbol to prevent
81+
# shadowing previous loads and trigger a buildifier warning.
82+
tf_workspace0 = workspace

tensorflow/workspace1.bzl

+4
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ def workspace():
1414
android_configure(name = "local_config_android")
1515

1616
grpc_deps()
17+
18+
# Alias so it can be loaded without assigning to a different symbol to prevent
19+
# shadowing previous loads and trigger a buildifier warning.
20+
tf_workspace1 = workspace

tensorflow/workspace2.bzl

+4
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ def workspace():
1111
# Load tf_repositories() before loading dependencies for other repository so
1212
# that dependencies like com_google_protobuf won't be overridden.
1313
tf_repositories()
14+
15+
# Alias so it can be loaded without assigning to a different symbol to prevent
16+
# shadowing previous loads and trigger a buildifier warning.
17+
tf_workspace2 = workspace

tensorflow/workspace3.bzl

+4
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ def workspace():
1212
"https://github.com/bazelbuild/rules_closure/archive/308b05b2419edb5c8ee0471b67a40403df940149.tar.gz", # 2019-06-13
1313
],
1414
)
15+
16+
# Alias so it can be loaded without assigning to a different symbol to prevent
17+
# shadowing previous loads and trigger a buildifier warning.
18+
tf_workspace3 = workspace

0 commit comments

Comments
 (0)