Remove testonly attribute that breaks builds with newer bazel versions.
In bazel versions beyond 0.3.2, the testonly
attribute will be more strongly enforced
(5f026f9611
)
and builds will fail with something like:
in cc_library rule //tensorflow/python:tf_session_helper: non-test target
'//tensorflow/python:tf_session_helper' depends on testonly target
'//tensorflow/python:construction_fails_op' and doesn't have testonly attribute
set.
Ideally, tf_session_helper wouldn't depend on :construction_fails_op
(and construction_fails_op wouldn't make its way into
//tensorflow/python:pywrap_tensorflow). Instead only the
py_test target //tensorflow/python:session_test would.
However, that results in errors like:
in deps attribute of py_test rule //tensorflow/python:session:test:
'//tensorflow/python:construction_fails_op' does not have mandatory
provider 'py'.
I believe the correct fix involves some reengineering of bazel
and/or the skylark rules we use. I'm punting on that for now:
(a) to expedite fixing #5143
(b) because this change is effectively a no-op since in bazel versions
<= 0.3.2 were ignoring testonly altogether
(https://github.com/bazelbuild/bazel/issues/1923)
Change: 137281711
This commit is contained in:
parent
a5116e0f89
commit
c8929e2e6e
@ -1931,7 +1931,6 @@ py_library(
|
||||
# Just used by tests.
|
||||
tf_cuda_library(
|
||||
name = "construction_fails_op",
|
||||
testonly = 1,
|
||||
srcs = ["client/test_construction_fails_op.cc"],
|
||||
deps = [
|
||||
"//tensorflow/core",
|
||||
|
Loading…
Reference in New Issue
Block a user