Bazel: Replace native {http,git}_archive with Skylark rules
Future Bazel versions will discontinue support for native http rules and replace them with Skylark equivalents: [1]. Prepare the Gerit build tool chain for that move. The replacements depend on this PR in rules_closure project: [2], that wasn't merged yet. For now we can apply "patch on import", thanks Skylark's http rules patch support. When [2] is merged, and new version of rules_clsoure is released, we can remove the patching procedure. One side effect of this change is that Skylark version of http_file lost the ability to save the downloaded artifact under its real name and is using a generic download file name. The rule closure tool chain stumbles on this, and rejects to accept polymer_closure artifact without ".js" suffix. To rectify add intermediate rule and renamed "download" file to one with js suffix "polymer_closure_renamed.js": [3]. [1] https://groups.google.com/d/topic/bazel-discuss/dO2MHQLwJF0/discussion [2] https://github.com/bazelbuild/rules_closure/pull/270 [3] http://paste.openstack.org/show/722557 Inspired-By: "Klaus Aehlig" <aehlig@google.com> Feature: Issue 9151 Change-Id: I44ca2ecfea67d2f4434a4743e7a6f8a3645e96a8
This commit is contained in:
committed by
David Pursehouse
parent
c90fc220c9
commit
6dc8c42960
@@ -18,9 +18,16 @@ package(
|
||||
|
||||
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
|
||||
|
||||
genrule(
|
||||
name = "polymer_closure_renamed",
|
||||
srcs = ["@polymer_closure//file"],
|
||||
outs = ["polymer_closure_renamed.js"],
|
||||
cmd = "cp $< $@",
|
||||
)
|
||||
|
||||
closure_js_library(
|
||||
name = "polymer_closure",
|
||||
srcs = ["@polymer_closure//file"],
|
||||
srcs = [":polymer_closure_renamed"],
|
||||
data = ["//lib:LICENSE-Apache2.0"],
|
||||
no_closure_library = True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user