Skip to content

Commit 73fe70f

Browse files
committed
Fix runfiles.
1 parent c01128e commit 73fe70f

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

closure/compiler/closure_js_library.bzl

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ def _closure_js_library_impl(
108108
convention = "CLOSURE",
109109
no_closure_library = False,
110110
internal_expect_failure = False,
111-
ts_lib=None,
112111

113112
# These file definitions for our outputs are deprecated,
114113
# and will be replaced with |actions.declare_file()| soon.
@@ -150,15 +149,6 @@ def _closure_js_library_impl(
150149
"%s.i.js" % label.name,
151150
)
152151

153-
# Wrapper around a ts_library. It's like creating a closure_js_library with
154-
# the runtime_deps of the ts_library, and the srcs are the tsickle outputs from
155-
# the ts_library.
156-
if ts_lib:
157-
srcs = srcs + ts_lib.typescript.transitive_es6_sources.to_list()
158-
# Note that we need to modify deps before calling unfurl below for exports to work.
159-
deps = deps + ts_lib.typescript.runtime_deps.to_list()
160-
suppress = suppress + ["checkTypes", "reportUnknownTypes", "analyzerChecks", "JSC_EXTRA_REQUIRE_WARNING"]
161-
162152
# Create a list of direct children of this rule. If any direct dependencies
163153
# have the exports attribute, those labels become direct dependencies here.
164154
deps = unfurl(deps, provider = "closure_js_library")
@@ -393,14 +383,26 @@ def _closure_js_library(ctx):
393383
print("closure_js_library 'externs' is deprecated; just use 'srcs'")
394384
srcs = ctx.files.externs + srcs
395385

386+
deps = ctx.attr.deps
387+
suppress = ctx.attr.suppress
388+
389+
# Wrapper around a ts_library. It's like creating a closure_js_library with
390+
# the runtime_deps of the ts_library, and the srcs are the tsickle outputs from
391+
# the ts_library.
392+
if ctx.attr.ts_lib:
393+
srcs = srcs + ctx.attr.ts_lib.typescript.transitive_es6_sources.to_list()
394+
# Note that we need to modify deps before calling unfurl below for exports to work.
395+
deps = deps + ctx.attr.ts_lib.typescript.runtime_deps.to_list()
396+
suppress = suppress + ["checkTypes", "strictCheckTypes", "reportUnknownTypes", "analyzerChecks", "JSC_EXTRA_REQUIRE_WARNING"]
397+
396398
library = _closure_js_library_impl(
397399
ctx.actions,
398400
ctx.label,
399401
ctx.workspace_name,
400402
srcs,
401-
ctx.attr.deps,
403+
deps,
402404
ctx.attr.testonly,
403-
ctx.attr.suppress,
405+
suppress,
404406
ctx.attr.lenient,
405407
ctx.files._closure_library_base,
406408
ctx.executable._ClosureWorker,
@@ -410,7 +412,6 @@ def _closure_js_library(ctx):
410412
ctx.attr.convention,
411413
ctx.attr.no_closure_library,
412414
ctx.attr.internal_expect_failure,
413-
ctx.attr.ts_lib,
414415

415416
# Deprecated output files.
416417
ctx.outputs.info,
@@ -429,7 +430,7 @@ def _closure_js_library(ctx):
429430
transitive_files = (depset([] if ctx.attr.no_closure_library else ctx.files._closure_library_base) |
430431
collect_runfiles(
431432
unfurl(
432-
ctx.attr.deps,
433+
deps+ctx.attr.exports,
433434
provider = "closure_js_library",
434435
),
435436
) |

closure/repositories.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ def com_google_protobuf_js():
696696
],
697697
sha256 = "2244b0308846bb22b4ff0bcc675e99290ff9f1115553ae9671eba1030af31bc0",
698698
strip_prefix = "protobuf-3.6.1.2/js",
699-
patches = ["//closure:patch_protobuf.patch"],
699+
patches = ["@io_bazel_rules_closure//closure:patch_protobuf.patch"],
700700
patch_args = ["-p1"],
701701
build_file = str(Label("//closure/protobuf:protobuf_js.BUILD")),
702702
)
@@ -800,7 +800,7 @@ def fonts_noto_mono_deb():
800800
)
801801

802802
def io_angular_clutz():
803-
native.new_http_archive(
803+
http_archive(
804804
name = "io_angular_clutz",
805805
build_file = str(Label("//third_party/clutz:clutz.BUILD")),
806806
sha256 = "7a5c785dbcc3ae0daa1fcf4507de6a23bbecdb2bf80460651e4c2b88c1ad7582",

0 commit comments

Comments
 (0)