diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2016-02-17 22:30:01 +0100 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-02-17 22:30:49 +0100 |
commit | cf521ddece8e8878f6d6dec538c09da3f0c6bca7 (patch) | |
tree | ead3caabc258c804d822ad7d268971e12b6b9d0c /tools | |
parent | 3f7057789df337db4da3006b14e14c9c245c3a00 (diff) |
Revert "Merge pull request #910 from Dominator008/closure"
This reverts commit 3f7057789df337db4da3006b14e14c9c245c3a00, reversing
changes made to cbbbf2e461396d3817a00c4bd4d26b9b43b68ce3.
Accidental merge, merged pull request have to go through googlesource first
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build_rules/closure/closure_js_binary.bzl | 35 | ||||
-rw-r--r-- | tools/build_rules/closure/closure_repositories.bzl | 14 |
2 files changed, 8 insertions, 41 deletions
diff --git a/tools/build_rules/closure/closure_js_binary.bzl b/tools/build_rules/closure/closure_js_binary.bzl index 447dd09cee..89af6721d4 100644 --- a/tools/build_rules/closure/closure_js_binary.bzl +++ b/tools/build_rules/closure/closure_js_binary.bzl @@ -27,8 +27,6 @@ Example: closure_js_binary( name = "hello", compilation_level = "simple", - language_in = "ecmascript6", - language_out = "ecmascript3", externs = ["//third_party/javascript/google_cast/cast.js"], deps = [ "@closure_library//:closure_library", @@ -48,21 +46,6 @@ _COMPILATION_LEVELS = { "advanced": ["--compilation_level=ADVANCED"] } -_SUPPORTED_LANGUAGES = { - "es3": ["ES3"], - "ecmascript3": ["ECMASCRIPT3"], - "es5": ["ES5"], - "ecmascript5": ["ECMASCRIPT5"], - "es5_strict": ["ES5_STRICT"], - "ecmascript5_strict": ["ECMASCRIPT5_STRICT"], - "es6": ["ES6"], - "ecmascript6": ["ECMASCRIPT6"], - "es6_strict": ["ES6_STRICT"], - "ecmascript6_strict": ["ECMASCRIPT6_STRICT"], - "es6_typed": ["ES6_TYPED"], - "ecmascript6_typed": ["ECMASCRIPT6_TYPED"], -} - def _impl(ctx): externs = set(order="compile") srcs = set(order="compile") @@ -74,7 +57,7 @@ def _impl(ctx): "--closure_entry_point=%s" % ctx.attr.main, "--js_output_file=%s" % ctx.outputs.out.path, "--language_in=ECMASCRIPT5_STRICT", - "--dependency_mode=LOOSE", + "--manage_closure_dependencies", "--warning_level=VERBOSE", ] + (["--js=%s" % src.path for src in srcs] + ["--externs=%s" % extern.path for extern in externs]) @@ -86,20 +69,6 @@ def _impl(ctx): fail("Invalid compilation_level '%s', expected one of %s" % (ctx.attr.compilation_level, _COMPILATION_LEVELS.keys())) - # Set the language in. - if ctx.attr.language_in in _SUPPORTED_LANGUAGES: - args += "--language_in=" + _SUPPORTED_LANGUAGES[ctx.attr.language_in] - else: - fail("Invalid language_in '%s', expected one of %s" % - (ctx.attr.language_in, _SUPPORTED_LANGUAGES.keys())) - - # Set the language out. - if ctx.attr.language_out in _SUPPORTED_LANGUAGES: - args += "--language_out=" + _SUPPORTED_LANGUAGES[ctx.attr.language_out] - else: - fail("Invalid language_out '%s', expected one of %s" % - (ctx.attr.language_out, _SUPPORTED_LANGUAGES.keys())) - ctx.action( inputs=list(srcs) + list(externs), outputs=[ctx.outputs.out], @@ -116,8 +85,6 @@ closure_js_binary = rule( providers=["transitive_js_externs", "transitive_js_srcs"]), "main": attr.string(default="%{name}"), "compilation_level": attr.string(default="advanced"), - "language_in": attr.string(default="ecmascript6"), - "language_out": attr.string(default="ecmascript3"), "_closure_compiler": attr.label( default=Label("//external:closure_compiler_"), executable=True), diff --git a/tools/build_rules/closure/closure_repositories.bzl b/tools/build_rules/closure/closure_repositories.bzl index 56c12996dd..29ab5f1a53 100644 --- a/tools/build_rules/closure/closure_repositories.bzl +++ b/tools/build_rules/closure/closure_repositories.bzl @@ -79,21 +79,21 @@ def closure_repositories(): native.new_http_archive( name = "closure_compiler", build_file_content = CLOSURE_COMPILER_BUILD_FILE, - sha256 = "215ba5df026e5d92bda6634463a9c634d38a1aa4b6dab336da5c52e884cbde95", - url = "https://dl.google.com/closure-compiler/compiler-latest.zip", + sha256 = "e4e0cb49ad21ec26dd47693bdbd48f67aefe2d94fe8d9239312d2bcc74986538", + url = "http://dl.google.com/closure-compiler/compiler-20150729.zip", ) - native.new_http_archive( + native.new_git_repository( name = "closure_library", build_file_content = CLOSURE_LIBRARY_BUILD_FILE, - sha256 = "8f610300e4930190137505a574a54d12346426f2a7b4f179026e41674e452a86", - url = "https://github.com/google/closure-library/archive/20160208.zip", + commit = "748b32441093c1474db2e0b3d074250e0bc47778", + remote = "https://github.com/google/closure-library.git", ) native.http_jar( name = "closure_stylesheets", - sha256 = "5308cb46f7677b9995237ade57770d27592aff69359d29be571220a2bf10e724", - url = "https://github.com/google/closure-stylesheets/releases/download/v1.1.0/closure-stylesheets.jar", + sha256 = "8b2ae8ec3733171ec0c2e6536566df0b3c6da3e59b4784993bc9e73125d29c82", + url = "https://closure-stylesheets.googlecode.com/files/closure-stylesheets-20111230.jar", ) native.new_http_archive( |