Skip to content

Commit

Permalink
Deprecate closure_js_deps. (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjin authored Jun 11, 2021
1 parent 6c344a0 commit 04a1b4d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions closure/compiler/closure_js_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ load(
"unfurl",
)

_ERROR_CLOSURE_JS_DEPS_IS_DEPRECATED = """
closure_js_deps() and deps.js files are deprecated. Please remove your closure_js_deps rules and, if needed, use the google-closure-deps npm module with bazelbuild/rules_nodejs to generate deps.js files.
""".strip()

def _impl(ctx):
deps = unfurl(ctx.attr.deps, provider = "closure_js_library")
js = collect_js(deps)
Expand All @@ -31,6 +35,8 @@ def _impl(ctx):
closure_rel = "/".join([".." for _ in range(len(closure_root.split("/")))])
outputs = [ctx.outputs.out]

print(_ERROR_CLOSURE_JS_DEPS_IS_DEPRECATED)

# XXX: Other files in same directory will get schlepped in w/o sandboxing.
ctx.actions.run(
inputs = list(js.srcs.to_list()),
Expand Down

0 comments on commit 04a1b4d

Please sign in to comment.