From 62d357494e4efd9ed1cf960e132f94cb67ffd32f Mon Sep 17 00:00:00 2001 From: Ivo List Date: Wed, 17 Jan 2024 19:52:00 +0100 Subject: [PATCH 1/5] Running buildifier on all bzl files --- tensorboard/defs/defs.bzl | 45 +- tensorboard/defs/hacks.bzl | 121 +-- tensorboard/defs/web.bzl | 465 ++++----- tensorboard/defs/zipper.bzl | 77 +- third_party/fonts.bzl | 1796 +++++++++++++++++------------------ 5 files changed, 1269 insertions(+), 1235 deletions(-) diff --git a/tensorboard/defs/defs.bzl b/tensorboard/defs/defs.bzl index 725a912514..77428870ea 100644 --- a/tensorboard/defs/defs.bzl +++ b/tensorboard/defs/defs.bzl @@ -22,7 +22,6 @@ load("@npm//@bazel/concatjs:index.bzl", "karma_web_test_suite", "ts_library") load("@npm//@bazel/esbuild:index.bzl", "esbuild") load("@npm//@bazel/typescript:index.bzl", "ts_config") - def tensorboard_webcomponent_library(**kwargs): """Rules referencing this will be deleted from the codebase soon.""" pass @@ -72,8 +71,8 @@ def tf_js_binary( # the global level and tends to overwrite `window` functions. "iife" is # just a thin wrapper around "esm" (it adds 11 bytes) and doesn't # suffer from the same overwriting problem. - format="iife", - minify= False if dev_mode_only else True, + format = "iife", + minify = False if dev_mode_only else True, args = { # Must specify that 'mjs' extensions are preferred, since that is # the extension that is used for es2015/esm code generated by @@ -91,7 +90,6 @@ def tf_js_binary( **kwargs ) - def tf_ng_prod_js_binary( name, compile, @@ -114,7 +112,7 @@ def tf_ng_prod_js_binary( https://esbuild.github.io/api/ for more details. """ - app_bundle_name = '%s_app_bundle' % name + app_bundle_name = "%s_app_bundle" % name app_bundle( name = app_bundle_name, **kwargs @@ -124,8 +122,8 @@ def tf_ng_prod_js_binary( # through a terser pass to be the output of this rule. copy_file( name = name, - src = '%s.min.js' % app_bundle_name, - out = '%s.js' % name, + src = "%s.min.js" % app_bundle_name, + out = "%s.js" % name, ) def tf_ts_config(**kwargs): @@ -148,22 +146,24 @@ def tf_ts_library(srcs = [], strict_checks = True, **kwargs): kwargs.setdefault("deps", []).extend(["@npm//tslib", "//tensorboard/defs:strict_types"]) new_srcs = [] + # Find test.ts and testbed.ts files and rename to test.spec.ts to be # compatible with spec_bundle() tooling. for s in srcs: - if s.endswith("_test.ts") or s.endswith("-test.ts") or s.endswith("_testbed.ts"): - # Make a copy of the file with name .spec.ts and switch to that as - # the src file. - new_src = s[0:s.rindex('.ts')] + ".spec.ts" - copy_file( - name = new_src + '_spec_copy', - src = s, - out = new_src, - allow_symlink = True) - new_srcs.append(new_src) - else: - # Not a test file. Nothing to do here. - new_srcs.append(s) + if s.endswith("_test.ts") or s.endswith("-test.ts") or s.endswith("_testbed.ts"): + # Make a copy of the file with name .spec.ts and switch to that as + # the src file. + new_src = s[0:s.rindex(".ts")] + ".spec.ts" + copy_file( + name = new_src + "_spec_copy", + src = s, + out = new_src, + allow_symlink = True, + ) + new_srcs.append(new_src) + else: + # Not a test file. Nothing to do here. + new_srcs.append(s) ts_library( srcs = new_srcs, @@ -176,7 +176,8 @@ def tf_ts_library(srcs = [], strict_checks = True, **kwargs): prodmode_target = "es2020", devmode_target = "es2020", devmode_module = "esnext", - **kwargs) + **kwargs + ) def tf_ng_web_test_suite(name, deps = [], **kwargs): """TensorBoard wrapper for the rule for a Karma web test suite. @@ -231,7 +232,7 @@ def tf_ng_web_test_suite(name, deps = [], **kwargs): # karma_web_test_suite() will rebundle it along with the test framework # in a CommonJS bundle. deps = [ - "%s_bundle" % name, + "%s_bundle" % name, ], ) diff --git a/tensorboard/defs/hacks.bzl b/tensorboard/defs/hacks.bzl index 22ecbb2a87..da469aec65 100644 --- a/tensorboard/defs/hacks.bzl +++ b/tensorboard/defs/hacks.bzl @@ -16,65 +16,66 @@ # TODO(@jart): Merge this file into defs.bzl once that file is sync unified. def tensorboard_typescript_bundle( - name, - out, - namespace_srcs, - namespace_symbol_aliases={}, - namespace_symbol_aliases_public={}, -): - """Rolls TypeScript ES6 modules into one vanilla source file without imports. + name, + out, + namespace_srcs, + namespace_symbol_aliases = {}, + namespace_symbol_aliases_public = {}): + """Rolls TypeScript ES6 modules into one vanilla source file without imports. - This is a genrule wrapper that concatenates TypeScripts sources inside - namespace blocks while removing ^import lines. Because the sources themselves - are not parsed, the structure of the modules must be passed to this macro as - a Skylark data structure. + This is a genrule wrapper that concatenates TypeScripts sources inside + namespace blocks while removing ^import lines. Because the sources themselves + are not parsed, the structure of the modules must be passed to this macro as + a Skylark data structure. - Args: - name: Name of this build rule target. - out: Path of outputted TypeScript source file. - namespace_srcs: Multimap of namespace strings to build file targets. The - ordering of the dictionary and nested lists does not matter when - generating a typings file, but *does* matter when generating a source - file. - namespace_symbol_aliases: Map of namespace strings where each value is a - map of symbol names to fully qualified symbol names. - namespace_symbol_aliases_public: Same as namespace_symbol_aliases but the - symbol will be visible to other namespaces. - """ - cmd = ["(", "echo // GENERATED BY TENSORBOARD_TYPESCRIPT_BUNDLE"] - inputs_depsets = [] - for namespace, srcs in namespace_srcs.items(): - cmd.append("echo") - if out[-5:] == ".d.ts": - cmd.append("echo 'declare namespace %s {'" % namespace) - elif out[-3:] == ".ts": - cmd.append("echo 'module %s {'" % namespace) - else: - fail("'out' must end with .ts or .d.ts: " + out) - for symbol, canon in namespace_symbol_aliases.get(namespace, {}).items(): - cmd.append("echo 'import %s = %s;'" % (symbol, canon)) - for symbol, canon in namespace_symbol_aliases_public.get(namespace, - {}).items(): - cmd.append("echo 'export import %s = %s;'" % (symbol, canon)) - inputs_depsets.append(depset(srcs)) - for src in srcs: - cmd.append("for f in $(locations %s); do" % src) - cmd.append(" echo") - cmd.append(" echo /////////////////////////////////////////////////////") - cmd.append(" echo // " + namespace) - cmd.append(" echo // $$f") - cmd.append(" echo /////////////////////////////////////////////////////") - cmd.append(" echo") - cmd.append(" sed 's!^import !// import !' $$f \\") - cmd.append(" | sed 's!^export declare !export !' \\") - cmd.append(" | sed '/^export .* from /d' \\") - cmd.append(" | sed '/^export {.*};$$/d'") - cmd.append("done") - cmd.append("echo '}'") - cmd.append(") >$@") - native.genrule( - name = name, - srcs = depset(transitive=inputs_depsets).to_list(), - outs = [out], - cmd = "\n".join(cmd), - ) + Args: + name: Name of this build rule target. + out: Path of outputted TypeScript source file. + namespace_srcs: Multimap of namespace strings to build file targets. The + ordering of the dictionary and nested lists does not matter when + generating a typings file, but *does* matter when generating a source + file. + namespace_symbol_aliases: Map of namespace strings where each value is a + map of symbol names to fully qualified symbol names. + namespace_symbol_aliases_public: Same as namespace_symbol_aliases but the + symbol will be visible to other namespaces. + """ + cmd = ["(", "echo // GENERATED BY TENSORBOARD_TYPESCRIPT_BUNDLE"] + inputs_depsets = [] + for namespace, srcs in namespace_srcs.items(): + cmd.append("echo") + if out[-5:] == ".d.ts": + cmd.append("echo 'declare namespace %s {'" % namespace) + elif out[-3:] == ".ts": + cmd.append("echo 'module %s {'" % namespace) + else: + fail("'out' must end with .ts or .d.ts: " + out) + for symbol, canon in namespace_symbol_aliases.get(namespace, {}).items(): + cmd.append("echo 'import %s = %s;'" % (symbol, canon)) + for symbol, canon in namespace_symbol_aliases_public.get( + namespace, + {}, + ).items(): + cmd.append("echo 'export import %s = %s;'" % (symbol, canon)) + inputs_depsets.append(depset(srcs)) + for src in srcs: + cmd.append("for f in $(locations %s); do" % src) + cmd.append(" echo") + cmd.append(" echo /////////////////////////////////////////////////////") + cmd.append(" echo // " + namespace) + cmd.append(" echo // $$f") + cmd.append(" echo /////////////////////////////////////////////////////") + cmd.append(" echo") + cmd.append(" sed 's!^import !// import !' $$f \\") + cmd.append(" | sed 's!^export declare !export !' \\") + cmd.append(" | sed '/^export .* from /d' \\") + cmd.append(" | sed '/^export {.*};$$/d'") + cmd.append("done") + cmd.append("echo '}'") + cmd.append(") >$@") + native.genrule( + name = name, + srcs = depset(transitive = inputs_depsets).to_list(), + outs = [out], + cmd = "\n".join(cmd), + ) diff --git a/tensorboard/defs/web.bzl b/tensorboard/defs/web.bzl index 04579085e3..6e26219dce 100644 --- a/tensorboard/defs/web.bzl +++ b/tensorboard/defs/web.bzl @@ -14,259 +14,286 @@ """Same as web_library but supports TypeScript.""" -load("@io_bazel_rules_closure//closure:defs.bzl", - "closure_js_aspect") - -load("@io_bazel_rules_closure//closure/private:defs.bzl", - "CLOSURE_LIBRARY_BASE_ATTR", - "CLOSURE_WORKER_ATTR", - "collect_js", - "collect_runfiles", - "difference", - "long_path", - "unfurl") +load( + "@io_bazel_rules_closure//closure:defs.bzl", + "closure_js_aspect", +) +load( + "@io_bazel_rules_closure//closure/private:defs.bzl", + "CLOSURE_LIBRARY_BASE_ATTR", + "CLOSURE_WORKER_ATTR", + "collect_js", + "collect_runfiles", + "difference", + "long_path", + "unfurl", +) load("//tensorboard/defs/internal:html.bzl", _tb_combine_html = "tb_combine_html") def _tf_web_library(ctx): - if not ctx.attr.srcs: - if ctx.attr.deps: - fail("deps can not be set when srcs is not") - if not ctx.attr.exports: - fail("exports must be set if srcs is not") - if ctx.attr.path: - if not ctx.attr.path.startswith("/"): - fail("webpath must start with /") - if ctx.attr.path != "/" and ctx.attr.path.endswith("/"): - fail("webpath must not end with / unless it is /") - if "//" in ctx.attr.path: - fail("webpath must not have //") - elif ctx.attr.srcs: - fail("path must be set when srcs is set") - if "*" in ctx.attr.suppress and len(ctx.attr.suppress) != 1: - fail("when \"*\" is suppressed no other items should be present") + if not ctx.attr.srcs: + if ctx.attr.deps: + fail("deps can not be set when srcs is not") + if not ctx.attr.exports: + fail("exports must be set if srcs is not") + if ctx.attr.path: + if not ctx.attr.path.startswith("/"): + fail("webpath must start with /") + if ctx.attr.path != "/" and ctx.attr.path.endswith("/"): + fail("webpath must not end with / unless it is /") + if "//" in ctx.attr.path: + fail("webpath must not have //") + elif ctx.attr.srcs: + fail("path must be set when srcs is set") + if "*" in ctx.attr.suppress and len(ctx.attr.suppress) != 1: + fail("when \"*\" is suppressed no other items should be present") - # process what came before - deps = unfurl(ctx.attr.deps, provider="webfiles") - webpaths = depset() - for dep in deps: - webpaths = depset(transitive=[webpaths, dep.webfiles.webpaths]) + # process what came before + deps = unfurl(ctx.attr.deps, provider = "webfiles") + webpaths = depset() + for dep in deps: + webpaths = depset(transitive = [webpaths, dep.webfiles.webpaths]) - # process what comes now - manifest_srcs = [] - new_webpaths = [] - web_srcs = [] - path = ctx.attr.path - strip = _get_strip(ctx) - for src in ctx.files.srcs: - suffix = _get_path_relative_to_package(src) - if strip: - if not suffix.startswith(strip): - fail("Relative src path not start with '%s': %s" % (strip, suffix)) - suffix = suffix[len(strip):] - webpath = "%s/%s" % ("" if path == "/" else path, suffix) - _add_webpath(ctx, src, webpath, webpaths, new_webpaths, manifest_srcs) - if suffix.endswith(".d.ts"): - # Polymer v1 fork still specifies d.ts in tf_web_library. - pass - elif suffix.endswith(".ts"): - fail( - "tf_web_library no longer can build TypeScript. Please use " + - "tf_ts_library instead." - ) - else: - web_srcs.append(src) + # process what comes now + manifest_srcs = [] + new_webpaths = [] + web_srcs = [] + path = ctx.attr.path + strip = _get_strip(ctx) + for src in ctx.files.srcs: + suffix = _get_path_relative_to_package(src) + if strip: + if not suffix.startswith(strip): + fail("Relative src path not start with '%s': %s" % (strip, suffix)) + suffix = suffix[len(strip):] + webpath = "%s/%s" % ("" if path == "/" else path, suffix) + _add_webpath(ctx, src, webpath, webpaths, new_webpaths, manifest_srcs) + if suffix.endswith(".d.ts"): + # Polymer v1 fork still specifies d.ts in tf_web_library. + pass + elif suffix.endswith(".ts"): + fail( + "tf_web_library no longer can build TypeScript. Please use " + + "tf_ts_library instead.", + ) + else: + web_srcs.append(src) - # perform strict dependency checking - manifest = _make_manifest(ctx, manifest_srcs) - webpaths = depset(new_webpaths, transitive=[webpaths]) - dummy, manifests = _run_webfiles_validator(ctx, web_srcs, deps, manifest) - web_srcs.append(dummy) + # perform strict dependency checking + manifest = _make_manifest(ctx, manifest_srcs) + webpaths = depset(new_webpaths, transitive = [webpaths]) + dummy, manifests = _run_webfiles_validator(ctx, web_srcs, deps, manifest) + web_srcs.append(dummy) - # define development web server that only applies to this transitive closure - if ctx.attr.srcs: - devserver_manifests = manifests - export_deps = [] - else: - # If a rule exists purely to export other build rules, then it's - # appropriate for the exported sources to be included in the - # development web server. - export_deps = unfurl(ctx.attr.exports) - devserver_manifests = depset( - order = "postorder", - transitive = ( - [manifests] + [dep.webfiles.manifests for dep in export_deps] + # define development web server that only applies to this transitive closure + if ctx.attr.srcs: + devserver_manifests = manifests + export_deps = [] + else: + # If a rule exists purely to export other build rules, then it's + # appropriate for the exported sources to be included in the + # development web server. + export_deps = unfurl(ctx.attr.exports) + devserver_manifests = depset( + order = "postorder", + transitive = ( + [manifests] + [dep.webfiles.manifests for dep in export_deps] + ), + ) + params = struct( + label = str(ctx.label), + bind = "localhost:6006", + manifest = [long_path(ctx, man) for man in devserver_manifests.to_list()], + external_asset = [ + struct(webpath = k, path = v) + for k, v in ctx.attr.external_assets.items() + ], + ) + params_file = _new_file(ctx, "-params.pbtxt") + ctx.actions.write(output = params_file, content = params.to_proto()) + ctx.actions.write( + is_executable = True, + output = ctx.outputs.executable, + content = "#!/bin/sh\nexec %s %s" % ( + ctx.executable._WebfilesServer.short_path, + long_path(ctx, params_file), ), ) - params = struct( - label=str(ctx.label), - bind="localhost:6006", - manifest=[long_path(ctx, man) for man in devserver_manifests.to_list()], - external_asset=[struct(webpath=k, path=v) - for k, v in ctx.attr.external_assets.items()]) - params_file = _new_file(ctx, "-params.pbtxt") - ctx.actions.write(output=params_file, content=proto.encode_text(params)) - ctx.actions.write( - is_executable=True, - output=ctx.outputs.executable, - content="#!/bin/sh\nexec %s %s" % ( - ctx.executable._WebfilesServer.short_path, - long_path(ctx, params_file))) - # Export data to parent rules. This uses the legacy, string-based - # provider mechanism for compatibility with the base `web_library` - # rule from rules_closure: because `tf_web_library`s may depend on - # either other `tf_web_library`s or base `web_library`s, the - # interfaces ~must be the same. - # - # buildozer: disable=rule-impl-return - return struct( - files=depset(web_srcs + [dummy]), - exports=unfurl(ctx.attr.exports), - webfiles=struct( - manifest=manifest, - manifests=manifests, - webpaths=webpaths, - dummy=dummy, - ), - closure_js_library=collect_js( - unfurl(ctx.attr.deps, provider="closure_js_library"), - ctx.files._closure_library_base), - runfiles=ctx.runfiles( - files=(ctx.files.srcs + - ctx.files.data + - ctx.files._closure_library_base + [ - manifest, - params_file, - ctx.outputs.executable, - dummy]), - transitive_files=depset(transitive=[ - collect_runfiles([ctx.attr._WebfilesServer]), - collect_runfiles(deps), - collect_runfiles(export_deps), - collect_runfiles(ctx.attr.data), - ]))) + # Export data to parent rules. This uses the legacy, string-based + # provider mechanism for compatibility with the base `web_library` + # rule from rules_closure: because `tf_web_library`s may depend on + # either other `tf_web_library`s or base `web_library`s, the + # interfaces ~must be the same. + # + # buildozer: disable=rule-impl-return + return struct( + files = depset(web_srcs + [dummy]), + exports = unfurl(ctx.attr.exports), + webfiles = struct( + manifest = manifest, + manifests = manifests, + webpaths = webpaths, + dummy = dummy, + ), + closure_js_library = collect_js( + unfurl(ctx.attr.deps, provider = "closure_js_library"), + ctx.files._closure_library_base, + ), + runfiles = ctx.runfiles( + files = (ctx.files.srcs + + ctx.files.data + + ctx.files._closure_library_base + [ + manifest, + params_file, + ctx.outputs.executable, + dummy, + ]), + transitive_files = depset(transitive = [ + collect_runfiles([ctx.attr._WebfilesServer]), + collect_runfiles(deps), + collect_runfiles(export_deps), + collect_runfiles(ctx.attr.data), + ]), + ), + ) def _make_manifest(ctx, src_list): - manifest = _new_file(ctx, "-webfiles.pbtxt") - ctx.actions.write( - output=manifest, - content=proto.encode_text(struct( - label=str(ctx.label), - src=src_list))) - return manifest + manifest = _new_file(ctx, "-webfiles.pbtxt") + ctx.actions.write( + output = manifest, + content = proto.encode_text(struct( + label = str(ctx.label), + src = src_list, + )), + ) + return manifest def _run_webfiles_validator(ctx, srcs, deps, manifest): - dummy = _new_file(ctx, "-webfiles.ignoreme") - manifests = depset(order="postorder") - for dep in deps: - manifests = depset(transitive=[manifests, dep.webfiles.manifests]) - if srcs: - args = ["WebfilesValidator", - "--dummy", dummy.path, - "--target", manifest.path] - if hasattr(ctx, "attr") and hasattr(ctx.attr, "suppress"): - for category in ctx.attr.suppress: - args.append("--suppress") - args.append(category) - inputs = [] # list of depsets - inputs.append(depset([manifest] + srcs)) - direct_manifests = depset() + dummy = _new_file(ctx, "-webfiles.ignoreme") + manifests = depset(order = "postorder") for dep in deps: - inputs.append(depset([dep.webfiles.dummy])) - inputs.append(dep.files) - direct_manifests = depset( - [dep.webfiles.manifest], - transitive=[direct_manifests], - ) - inputs.append(depset([dep.webfiles.manifest])) - args.append("--direct_dep") - args.append(dep.webfiles.manifest.path) - for man in difference(manifests, direct_manifests): - inputs.append(depset([man])) - args.append("--transitive_dep") - args.append(man.path) - argfile = _new_file(ctx, "-webfiles-checker-args.txt") - ctx.actions.write(output=argfile, content="\n".join(args)) - inputs.append(depset([argfile])) - ctx.actions.run( - inputs=depset(transitive=inputs), - outputs=[dummy], - executable=(getattr(ctx.executable, "_ClosureWorker", None) or - getattr(ctx.executable, "_ClosureWorkerAspect", None)), - arguments=["@@" + argfile.path], - mnemonic="Closure", - execution_requirements={"supports-workers": "1"}, - progress_message="Checking webfiles %s" % ctx.label) - else: - ctx.actions.write(output=dummy, content="BOO!") - manifests = depset([manifest], transitive=[manifests]) - return dummy, manifests + manifests = depset(transitive = [manifests, dep.webfiles.manifests]) + if srcs: + args = [ + "WebfilesValidator", + "--dummy", + dummy.path, + "--target", + manifest.path, + ] + if hasattr(ctx, "attr") and hasattr(ctx.attr, "suppress"): + for category in ctx.attr.suppress: + args.append("--suppress") + args.append(category) + inputs = [] # list of depsets + inputs.append(depset([manifest] + srcs)) + direct_manifests = depset() + for dep in deps: + inputs.append(depset([dep.webfiles.dummy])) + inputs.append(dep.files) + direct_manifests = depset( + [dep.webfiles.manifest], + transitive = [direct_manifests], + ) + inputs.append(depset([dep.webfiles.manifest])) + args.append("--direct_dep") + args.append(dep.webfiles.manifest.path) + for man in difference(manifests, direct_manifests): + inputs.append(depset([man])) + args.append("--transitive_dep") + args.append(man.path) + argfile = _new_file(ctx, "-webfiles-checker-args.txt") + ctx.actions.write(output = argfile, content = "\n".join(args)) + inputs.append(depset([argfile])) + ctx.actions.run( + inputs = depset(transitive = inputs), + outputs = [dummy], + executable = (getattr(ctx.executable, "_ClosureWorker", None) or + getattr(ctx.executable, "_ClosureWorkerAspect", None)), + arguments = ["@@" + argfile.path], + mnemonic = "Closure", + execution_requirements = {"supports-workers": "1"}, + progress_message = "Checking webfiles %s" % ctx.label, + ) + else: + ctx.actions.write(output = dummy, content = "BOO!") + manifests = depset([manifest], transitive = [manifests]) + return dummy, manifests def _new_file(ctx, suffix): - return ctx.actions.declare_file("%s%s" % (ctx.label.name, suffix)) + return ctx.actions.declare_file("%s%s" % (ctx.label.name, suffix)) def _add_webpath(ctx, src, webpath, webpaths, new_webpaths, manifest_srcs): - if webpath in new_webpaths: - _fail(ctx, "multiple srcs within %s define the webpath %s " % ( - ctx.label, webpath)) - if webpath in webpaths.to_list(): - _fail(ctx, "webpath %s was defined by %s when already defined by deps" % ( - webpath, ctx.label)) - new_webpaths.append(webpath) - manifest_srcs.append(struct( - path=src.path, - longpath=long_path(ctx, src), - webpath=webpath)) + if webpath in new_webpaths: + _fail(ctx, "multiple srcs within %s define the webpath %s " % ( + ctx.label, + webpath, + )) + if webpath in webpaths.to_list(): + _fail(ctx, "webpath %s was defined by %s when already defined by deps" % ( + webpath, + ctx.label, + )) + new_webpaths.append(webpath) + manifest_srcs.append(struct( + path = src.path, + longpath = long_path(ctx, src), + webpath = webpath, + )) def _fail(ctx, message): - if ctx.attr.suppress == ["*"]: - print(message) - else: - fail(message) + if ctx.attr.suppress == ["*"]: + print(message) + else: + fail(message) def _get_path_relative_to_package(artifact): - """Returns file path relative to the package that declared it.""" - path = artifact.path - for prefix in (artifact.root.path, - artifact.owner.workspace_root if artifact.owner else '', - artifact.owner.package if artifact.owner else ''): - if prefix: - prefix = prefix + "/" - if not path.startswith(prefix): - fail("Path %s doesn't start with %s" % (path, prefix)) - path = path[len(prefix):] - return path + """Returns file path relative to the package that declared it.""" + path = artifact.path + for prefix in ( + artifact.root.path, + artifact.owner.workspace_root if artifact.owner else "", + artifact.owner.package if artifact.owner else "", + ): + if prefix: + prefix = prefix + "/" + if not path.startswith(prefix): + fail("Path %s doesn't start with %s" % (path, prefix)) + path = path[len(prefix):] + return path def _get_strip(ctx): - strip = ctx.attr.strip_prefix - if strip: - if strip.startswith("/"): - _fail(ctx, "strip_prefix should not end with /") - strip = strip[1:] - if strip.endswith("/"): - _fail(ctx, "strip_prefix should not end with /") - else: - strip += "/" - return strip + strip = ctx.attr.strip_prefix + if strip: + if strip.startswith("/"): + _fail(ctx, "strip_prefix should not end with /") + strip = strip[1:] + if strip.endswith("/"): + _fail(ctx, "strip_prefix should not end with /") + else: + strip += "/" + return strip tf_web_library = rule( - implementation=_tf_web_library, - executable=True, - attrs={ + implementation = _tf_web_library, + executable = True, + attrs = { "path": attr.string(), - "srcs": attr.label_list(allow_files=True), + "srcs": attr.label_list(allow_files = True), "deps": attr.label_list( - aspects=[closure_js_aspect] + aspects = [closure_js_aspect], ), "exports": attr.label_list(), - "data": attr.label_list(allow_files=True), + "data": attr.label_list(allow_files = True), "suppress": attr.string_list(), "strip_prefix": attr.string(), - "external_assets": attr.string_dict(default={"/_/runfiles": "."}), + "external_assets": attr.string_dict(default = {"/_/runfiles": "."}), "_WebfilesServer": attr.label( - default=Label("@io_bazel_rules_closure//java/io/bazel/rules/closure/webfiles/server:WebfilesServer"), - executable=True, - cfg="exec"), + default = Label("@io_bazel_rules_closure//java/io/bazel/rules/closure/webfiles/server:WebfilesServer"), + executable = True, + cfg = "exec", + ), "_ClosureWorker": CLOSURE_WORKER_ATTR, "_closure_library_base": CLOSURE_LIBRARY_BASE_ATTR, }, diff --git a/tensorboard/defs/zipper.bzl b/tensorboard/defs/zipper.bzl index a73763b037..20f17ca2e6 100644 --- a/tensorboard/defs/zipper.bzl +++ b/tensorboard/defs/zipper.bzl @@ -17,44 +17,49 @@ load("@io_bazel_rules_closure//closure/private:defs.bzl", "unfurl") def _tensorboard_zip_file(ctx): - deps = unfurl(ctx.attr.deps, provider="webfiles") - manifests = depset(order="postorder") - files = depset() - webpaths = depset() - for dep in deps: - manifests = depset(transitive=[manifests, dep.webfiles.manifests]) - webpaths = depset(transitive=[webpaths, dep.webfiles.webpaths]) - files = depset(transitive=[files, dep.data_runfiles.files]) - ctx.actions.run( - mnemonic="Zipper", - inputs=depset(transitive=[manifests, files]).to_list(), - outputs=[ctx.outputs.zip], - executable=ctx.executable._Zipper, - arguments=([ctx.outputs.zip.path] + - [m.path for m in manifests.to_list()]), - progress_message="Zipping %d files" % len(webpaths.to_list())) - transitive_runfiles = depset() - for dep in deps: - transitive_runfiles = depset(transitive=[ - transitive_runfiles, - dep.data_runfiles.files, - ]) - return struct( - files=depset([ctx.outputs.zip]), - runfiles=ctx.runfiles( - files=ctx.files.data + [ctx.outputs.zip], - transitive_files=transitive_runfiles)) + deps = unfurl(ctx.attr.deps, provider = "webfiles") + manifests = depset(order = "postorder") + files = depset() + webpaths = depset() + for dep in deps: + manifests = depset(transitive = [manifests, dep.webfiles.manifests]) + webpaths = depset(transitive = [webpaths, dep.webfiles.webpaths]) + files = depset(transitive = [files, dep.data_runfiles.files]) + ctx.actions.run( + mnemonic = "Zipper", + inputs = depset(transitive = [manifests, files]).to_list(), + outputs = [ctx.outputs.zip], + executable = ctx.executable._Zipper, + arguments = ([ctx.outputs.zip.path] + + [m.path for m in manifests.to_list()]), + progress_message = "Zipping %d files" % len(webpaths.to_list()), + ) + transitive_runfiles = depset() + for dep in deps: + transitive_runfiles = depset(transitive = [ + transitive_runfiles, + dep.data_runfiles.files, + ]) + return struct( + files = depset([ctx.outputs.zip]), + runfiles = ctx.runfiles( + files = ctx.files.data + [ctx.outputs.zip], + transitive_files = transitive_runfiles, + ), + ) tensorboard_zip_file = rule( - implementation=_tensorboard_zip_file, - attrs={ - "data": attr.label_list(allow_files=True), - "deps": attr.label_list(providers=["webfiles"], mandatory=True), + implementation = _tensorboard_zip_file, + attrs = { + "data": attr.label_list(allow_files = True), + "deps": attr.label_list(providers = ["webfiles"], mandatory = True), "_Zipper": attr.label( - default=Label("//tensorboard/java/org/tensorflow/tensorboard/vulcanize:Zipper"), - executable=True, - cfg="exec"), + default = Label("//tensorboard/java/org/tensorflow/tensorboard/vulcanize:Zipper"), + executable = True, + cfg = "exec", + ), }, - outputs={ + outputs = { "zip": "%{name}.zip", - }) + }, +) diff --git a/third_party/fonts.bzl b/third_party/fonts.bzl index 7136dd184e..8635f18622 100644 --- a/third_party/fonts.bzl +++ b/third_party/fonts.bzl @@ -15,902 +15,902 @@ load("@io_bazel_rules_closure//closure:defs.bzl", "filegroup_external") def tensorboard_fonts_workspace(): - """Downloads TensorBoard fonts.""" + """Downloads TensorBoard fonts.""" - # bazel run //tensorboard/tools:import_google_fonts -- --url='https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic;https://fonts.googleapis.com/css?family=Roboto+Mono:400,700' - filegroup_external( - name = "com_google_fonts_roboto", - licenses = ["notice"], # Apache 2.0 - sha256_urls = { - "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4": [ - "http://mirror.tensorflow.org/raw.githubusercontent.com/google/roboto/ba03b84b90b50afd99f9688059447bc545e5c0e1/LICENSE", - "https://raw.githubusercontent.com/google/roboto/ba03b84b90b50afd99f9688059447bc545e5c0e1/LICENSE", - ], - # Roboto (cyrillic) - "41720926981ffb6dc229f06fc0bbf0f43e45ba032d126726ebee481c2a6559e2": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/uYECMKoHcO9x1wdmbyHIm3-_kf6ByYO6CLYdB4HQE-Y.woff2", - "https://fonts.gstatic.com/s/roboto/v18/uYECMKoHcO9x1wdmbyHIm3-_kf6ByYO6CLYdB4HQE-Y.woff2", - ], - # Roboto (cyrillic-ext) - "90a0ad0b48861588a6e33a5905b17e1219ea87ab6f07ccc41e7c2cddf38967a8": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/sTdaA6j0Psb920Vjv-mrzH-_kf6ByYO6CLYdB4HQE-Y.woff2", - "https://fonts.gstatic.com/s/roboto/v18/sTdaA6j0Psb920Vjv-mrzH-_kf6ByYO6CLYdB4HQE-Y.woff2", - ], - # Roboto (greek) - "949e287846b0940817e4ea0f65accc4481a46b8733dc12aa0265293a4645c661": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/_VYFx-s824kXq_Ul2BHqYH-_kf6ByYO6CLYdB4HQE-Y.woff2", - "https://fonts.gstatic.com/s/roboto/v18/_VYFx-s824kXq_Ul2BHqYH-_kf6ByYO6CLYdB4HQE-Y.woff2", - ], - # Roboto (greek-ext) - "e5b2e29a16d8ef4c5a123b40786af72da589c4aad634eab40d90eef8bb4418aa": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/tnj4SB6DNbdaQnsM8CFqBX-_kf6ByYO6CLYdB4HQE-Y.woff2", - "https://fonts.gstatic.com/s/roboto/v18/tnj4SB6DNbdaQnsM8CFqBX-_kf6ByYO6CLYdB4HQE-Y.woff2", - ], - # Roboto (latin) - "4352380f92ce7f9a4a4a23306b992bed10055dbfffe90987cc72083e583fc280": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/oMMgfZMQthOryQo9n22dcuvvDin1pK8aKteLpeZ5c0A.woff2", - "https://fonts.gstatic.com/s/roboto/v18/oMMgfZMQthOryQo9n22dcuvvDin1pK8aKteLpeZ5c0A.woff2", - ], - # Roboto (latin-ext) - "80fa23b4804621ce7f16b5c56d524dd90ea09d792622eeac9adf0ee6317b9e3a": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/Ks_cVxiCiwUWVsFWFA3Bjn-_kf6ByYO6CLYdB4HQE-Y.woff2", - "https://fonts.gstatic.com/s/roboto/v18/Ks_cVxiCiwUWVsFWFA3Bjn-_kf6ByYO6CLYdB4HQE-Y.woff2", - ], - # Roboto (vietnamese) - "a0a893b2ff1c82d49ac0c09ace71cf8178c0830f6a988103c779b6fc12c0da78": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/NJ4vxlgWwWbEsv18dAhqnn-_kf6ByYO6CLYdB4HQE-Y.woff2", - "https://fonts.gstatic.com/s/roboto/v18/NJ4vxlgWwWbEsv18dAhqnn-_kf6ByYO6CLYdB4HQE-Y.woff2", - ], - # Roboto Bold (cyrillic) - "6082aa2f5aab855120cd58f560f58975579097c484d23cc7854977a529f91bc4": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/isZ-wbCXNKAbnjo6_TwHToX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/isZ-wbCXNKAbnjo6_TwHToX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Bold (cyrillic-ext) - "616eb767627d16bef2b9be2218bb5f1bbbb97cfbd06c4e5241c8b532b56467aa": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/77FXFjRbGzN4aCrSFhlh3oX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/77FXFjRbGzN4aCrSFhlh3oX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Bold (greek) - "28959a3f1fea0c7f7feca26f92465f5263f2e8fdec17030e0e7a9e6a8cb321af": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/jSN2CGVDbcVyCnfJfjSdfIX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/jSN2CGVDbcVyCnfJfjSdfIX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Bold (greek-ext) - "e94a5635cb68464d332cd374fd57b95913fc5b549f1967fbb73829b2084efd98": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/UX6i4JxQDm3fVTc1CPuwqoX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/UX6i4JxQDm3fVTc1CPuwqoX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Bold (latin) - "1be216dbc059d96e288b0c1f399a1a80ee8c65e4c1272dbc4574bd6d23cf45d9": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/d-6IYplOFocCacKzxwXSOJBw1xU1rKptJj_0jans920.woff2", - "https://fonts.gstatic.com/s/roboto/v18/d-6IYplOFocCacKzxwXSOJBw1xU1rKptJj_0jans920.woff2", - ], - # Roboto Bold (latin-ext) - "6c8be972381d4da037f47c33ef1e31b88f0130ded1432730d4d792331f983839": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/97uahxiqZRoncBaCEI3aW4X0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/97uahxiqZRoncBaCEI3aW4X0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Bold (vietnamese) - "5f162f1ca2441cae368e97ed42b56332d7b68b1ffbbf9f7e4b648420667acee5": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/PwZc-YbIL414wB9rB1IAPYX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/PwZc-YbIL414wB9rB1IAPYX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Bold Italic (cyrillic) - "bb4e478b0fe2ae7fbd6369c94d126060ffa697df189d7f3653f23f521f906cd8": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC14sYYdJg5dU2qzJEVSuta0.woff2", - "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC14sYYdJg5dU2qzJEVSuta0.woff2", - ], - # Roboto Bold Italic (cyrillic-ext) - "9fc911647b05ecdbadfe6693d6ff306a0a34829999b2055ad2e474e3ad0b778d": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC_ZraR2Tg8w2lzm7kLNL0-w.woff2", - "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC_ZraR2Tg8w2lzm7kLNL0-w.woff2", - ], - # Roboto Bold Italic (greek) - "62509e2b63168ae83848cb3f76d2c47177de8618ac918af119cc7ae90c71213b": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcCwt_Rm691LTebKfY2ZkKSmI.woff2", - "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcCwt_Rm691LTebKfY2ZkKSmI.woff2", - ], - # Roboto Bold Italic (greek-ext) - "07a2e7b4a480176f0f0bc9f7ca757d8467bf41f86e3b1eed374be06ff1b51b56": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC1BW26QxpSj-_ZKm_xT4hWw.woff2", - "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC1BW26QxpSj-_ZKm_xT4hWw.woff2", - ], - # Roboto Bold Italic (latin) - "556e09ad66d48078d2ea341eff36e93dafdb56fed15e9d92e052a7cb3910e2e9": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC4gp9Q8gbYrhqGlRav_IXfk.woff2", - "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC4gp9Q8gbYrhqGlRav_IXfk.woff2", - ], - # Roboto Bold Italic (latin-ext) - "5f6115b8655a4e9e0bb6440956b2d7b7d52e90193c6be53731fcf97d1fc45ec3": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC6E8kM4xWR1_1bYURRojRGc.woff2", - "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC6E8kM4xWR1_1bYURRojRGc.woff2", - ], - # Roboto Bold Italic (vietnamese) - "b75ce2f4333ea21c1d0aeb0061edcf81b7fffe022a732dae52834a8b62615c5f": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC9DiNsR5a-9Oe_Ivpu8XWlY.woff2", - "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC9DiNsR5a-9Oe_Ivpu8XWlY.woff2", - ], - # Roboto Italic (cyrillic) - "38602b65e115ae1b267627d5533c2607f446aba939b9ca9143cc4373bd285b83": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OpXUqTo0UgQQhGj_SFdLWBkAz4rYn47Zy2rvigWQf6w.woff2", - "https://fonts.gstatic.com/s/roboto/v18/OpXUqTo0UgQQhGj_SFdLWBkAz4rYn47Zy2rvigWQf6w.woff2", - ], - # Roboto Italic (cyrillic-ext) - "d04ce842e235d3e6abfcd37d6598138007f56e391a035167d78edf9088d3035a": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/WxrXJa0C3KdtC7lMafG4dRkAz4rYn47Zy2rvigWQf6w.woff2", - "https://fonts.gstatic.com/s/roboto/v18/WxrXJa0C3KdtC7lMafG4dRkAz4rYn47Zy2rvigWQf6w.woff2", - ], - # Roboto Italic (greek) - "aa9a8db3e6de8124291c3f2fd0bbd0aca8c796f365204d78414536067115be07": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/cDKhRaXnQTOVbaoxwdOr9xkAz4rYn47Zy2rvigWQf6w.woff2", - "https://fonts.gstatic.com/s/roboto/v18/cDKhRaXnQTOVbaoxwdOr9xkAz4rYn47Zy2rvigWQf6w.woff2", - ], - # Roboto Italic (greek-ext) - "785896def5be5b35967d63f5589ce67fc8d3b452153a37323a4d9b886d828c60": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/1hZf02POANh32k2VkgEoUBkAz4rYn47Zy2rvigWQf6w.woff2", - "https://fonts.gstatic.com/s/roboto/v18/1hZf02POANh32k2VkgEoUBkAz4rYn47Zy2rvigWQf6w.woff2", - ], - # Roboto Italic (latin) - "64565561ddb338a11ffce5b84aa53fa6e8fd203c34208e61eb5602cd08bf527f": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/vPcynSL0qHq_6dX7lKVByXYhjbSpvc47ee6xR_80Hnw.woff2", - "https://fonts.gstatic.com/s/roboto/v18/vPcynSL0qHq_6dX7lKVByXYhjbSpvc47ee6xR_80Hnw.woff2", - ], - # Roboto Italic (latin-ext) - "d5b2d7e9efe90feef0c4507d90b2b4e464c6929efd05ad4294d3d5057db57b97": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/vSzulfKSK0LLjjfeaxcREhkAz4rYn47Zy2rvigWQf6w.woff2", - "https://fonts.gstatic.com/s/roboto/v18/vSzulfKSK0LLjjfeaxcREhkAz4rYn47Zy2rvigWQf6w.woff2", - ], - # Roboto Italic (vietnamese) - "5d875731e35140f94bc4cb23944d104688d3c6d372833ddae8d22d3aa802beb4": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/K23cxWVTrIFD6DJsEVi07RkAz4rYn47Zy2rvigWQf6w.woff2", - "https://fonts.gstatic.com/s/roboto/v18/K23cxWVTrIFD6DJsEVi07RkAz4rYn47Zy2rvigWQf6w.woff2", - ], - # Roboto Light (cyrillic) - "cb94537350a4c593515c0b9066a22f0d74284173b88521c50b894a3179402e46": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/Fl4y0QdOxyyTHEGMXX8kcYX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/Fl4y0QdOxyyTHEGMXX8kcYX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Light (cyrillic-ext) - "66a095c96771a94d2772c7e19a32c6585d4bed3a989faa9e595bb270a2621608": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/0eC6fl06luXEYWpBSJvXCIX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/0eC6fl06luXEYWpBSJvXCIX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Light (greek) - "f0e3a88ae70245bcac12d2640792e50a165ce618d3b5979b735913e582d204f7": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/I3S1wsgSg9YCurV6PUkTOYX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/I3S1wsgSg9YCurV6PUkTOYX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Light (greek-ext) - "40a162d49fd25da223ea81454616f469270020fc186fe2f109534fb1f72e1bcb": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/-L14Jk06m6pUHB-5mXQQnYX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/-L14Jk06m6pUHB-5mXQQnYX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Light (latin) - "f7c386915e39d8a925fe10d15744a9da95ac8f90423e12728e7fc3c5e34f4559": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/Hgo13k-tfSpn0qi1SFdUfZBw1xU1rKptJj_0jans920.woff2", - "https://fonts.gstatic.com/s/roboto/v18/Hgo13k-tfSpn0qi1SFdUfZBw1xU1rKptJj_0jans920.woff2", - ], - # Roboto Light (latin-ext) - "bbeeb150a0f72cbd898ba36ed908bb95ef2386d41158c943aa3af4e0c8430639": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/Pru33qjShpZSmG3z6VYwnYX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/Pru33qjShpZSmG3z6VYwnYX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Light (vietnamese) - "5a4e99d1db8c9fd38f6b1c92582c2351cf27075f5ccef89404a8d673fa8e7b26": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/NYDWBdD4gIq26G5XYbHsFIX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/NYDWBdD4gIq26G5XYbHsFIX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Light Italic (cyrillic) - "4160dc56c5afc7320243a73cdf025d1c64ea19e035b98bad9c170e37c98ee5e2": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at14sYYdJg5dU2qzJEVSuta0.woff2", - "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at14sYYdJg5dU2qzJEVSuta0.woff2", - ], - # Roboto Light Italic (cyrillic-ext) - "d95d953cff5e309f22a680e48981070d2cbebf75daba25b078834bf0c4f143e4": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at_ZraR2Tg8w2lzm7kLNL0-w.woff2", - "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at_ZraR2Tg8w2lzm7kLNL0-w.woff2", - ], - # Roboto Light Italic (greek) - "8d649207dfd9e6f53614ee7ee8e0865789e38b39244ab1546ee5117ab6f6ed2f": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0atwt_Rm691LTebKfY2ZkKSmI.woff2", - "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0atwt_Rm691LTebKfY2ZkKSmI.woff2", - ], - # Roboto Light Italic (greek-ext) - "a1153c52da99d21ed2f036e5849c3b2a5d7d3d5913d63ceac983d388288420b4": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at1BW26QxpSj-_ZKm_xT4hWw.woff2", - "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at1BW26QxpSj-_ZKm_xT4hWw.woff2", - ], - # Roboto Light Italic (latin) - "c4fc2fd6457f67718ccff3434f39a84a83be98defa8e23ac1942580ea53a925e": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at4gp9Q8gbYrhqGlRav_IXfk.woff2", - "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at4gp9Q8gbYrhqGlRav_IXfk.woff2", - ], - # Roboto Light Italic (latin-ext) - "fd5b96eb1adc32b3fd7823f6a9e3c14122a060d5665091c33d9243f2541b016c": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at6E8kM4xWR1_1bYURRojRGc.woff2", - "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at6E8kM4xWR1_1bYURRojRGc.woff2", - ], - # Roboto Light Italic (vietnamese) - "ced9470e7e60d5edeccf4d3a0ab2f57ef653ec9de3097e6950bc06c64157aa5a": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at9DiNsR5a-9Oe_Ivpu8XWlY.woff2", - "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at9DiNsR5a-9Oe_Ivpu8XWlY.woff2", - ], - # Roboto Medium (cyrillic) - "74f08a5b16db96fd23eeca2c2e6c354d08a95b3360aa2bb6ea0890517bb10469": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/oHi30kwQWvpCWqAhzHcCSIX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/oHi30kwQWvpCWqAhzHcCSIX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Medium (cyrillic-ext) - "2aa57d00d0cac3b30aef28a19e9cfea12b45daf9562b4fa623750c8145c0767b": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/ZLqKeelYbATG60EpZBSDy4X0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/ZLqKeelYbATG60EpZBSDy4X0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Medium (greek) - "b95a36dd1483f97002a0c8aba87106f7fefbd67f22bc25a2bf21352bb4f316ef": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/mx9Uck6uB63VIKFYnEMXrYX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/mx9Uck6uB63VIKFYnEMXrYX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Medium (greek-ext) - "399cdbc9a94414d94fb15b0386888c6bc8ce4d6140cc3a9a571406a76cf47bb5": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/rGvHdJnr2l75qb0YND9NyIX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/rGvHdJnr2l75qb0YND9NyIX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Medium (latin) - "b79781efede37903be212fcdf63955e41c8649e678b6b83adf824459d240a188": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/RxZJdnzeo3R5zSexge8UUZBw1xU1rKptJj_0jans920.woff2", - "https://fonts.gstatic.com/s/roboto/v18/RxZJdnzeo3R5zSexge8UUZBw1xU1rKptJj_0jans920.woff2", - ], - # Roboto Medium (latin-ext) - "ba99e38768dd8358450dc363431400b1642c7cd7e5b47830e30aa8ec80fb4790": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/oOeFwZNlrTefzLYmlVV1UIX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/oOeFwZNlrTefzLYmlVV1UIX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Medium (vietnamese) - "e785fcb2332a43e5f489c0e7457001a93800b459bdf5173cffbb880f350077eb": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/mbmhprMH69Zi6eEPBYVFhYX0hVgzZQUfRDuZrPvH3D8.woff2", - "https://fonts.gstatic.com/s/roboto/v18/mbmhprMH69Zi6eEPBYVFhYX0hVgzZQUfRDuZrPvH3D8.woff2", - ], - # Roboto Medium Italic (cyrillic) - "e9f24fd84cfbdad488d4f05d97ca2e009af8248044def329f0c78c04e12c32cb": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0V4sYYdJg5dU2qzJEVSuta0.woff2", - "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0V4sYYdJg5dU2qzJEVSuta0.woff2", - ], - # Roboto Medium Italic (cyrillic-ext) - "ecfda0e4317641a395971d71435ad1a3dce0499bccc9bcdcaaebffb714588a4e": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0fZraR2Tg8w2lzm7kLNL0-w.woff2", - "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0fZraR2Tg8w2lzm7kLNL0-w.woff2", - ], - # Roboto Medium Italic (greek) - "510c1001aa3c1ae574eba6eaa5a404414dd0f5d5cd8c213fe0fac404c1fbbd7c": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0Qt_Rm691LTebKfY2ZkKSmI.woff2", - "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0Qt_Rm691LTebKfY2ZkKSmI.woff2", - ], - # Roboto Medium Italic (greek-ext) - "e5343e5d46125f688c2f266369983a1f92dbefa8d16f131b09768cdd4a5cebd4": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0VBW26QxpSj-_ZKm_xT4hWw.woff2", - "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0VBW26QxpSj-_ZKm_xT4hWw.woff2", - ], - # Roboto Medium Italic (latin) - "76d779c16f21b55a95fb182bf7552447ee340d15556e53a99dd789383f6d8c32": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0Ygp9Q8gbYrhqGlRav_IXfk.woff2", - "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0Ygp9Q8gbYrhqGlRav_IXfk.woff2", - ], - # Roboto Medium Italic (latin-ext) - "a69b0c33d809b7aac3e9648bfc995bc38cd5e426efeb006dc3b31523f4867f73": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0aE8kM4xWR1_1bYURRojRGc.woff2", - "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0aE8kM4xWR1_1bYURRojRGc.woff2", - ], - # Roboto Medium Italic (vietnamese) - "2c94704be76a8ec87995f3427911e50987cfcaa13c5749c770419559fe836509": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0dDiNsR5a-9Oe_Ivpu8XWlY.woff2", - "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0dDiNsR5a-9Oe_Ivpu8XWlY.woff2", - ], - # Roboto Mono (cyrillic) - "2c9fae8205ea404d8400b9731423d5f8261788efcb26b651ad1031c70c895824": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY14sYYdJg5dU2qzJEVSuta0.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY14sYYdJg5dU2qzJEVSuta0.woff2", - ], - # Roboto Mono (cyrillic-ext) - "671d1df350d3ccfd9a5ebbc9e92810a274d6215a648099f0f6e3e256b2bdae02": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY_ZraR2Tg8w2lzm7kLNL0-w.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY_ZraR2Tg8w2lzm7kLNL0-w.woff2", - ], - # Roboto Mono (greek) - "eb84188b287e62e965be53c788b6562554cefcc0a3520f792ba91bb60d40e607": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpYwt_Rm691LTebKfY2ZkKSmI.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpYwt_Rm691LTebKfY2ZkKSmI.woff2", - ], - # Roboto Mono (greek-ext) - "978a5db5af1654146da5ec93980c273df7010a2d045f1360ac3b9d85bd890299": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY1BW26QxpSj-_ZKm_xT4hWw.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY1BW26QxpSj-_ZKm_xT4hWw.woff2", - ], - # Roboto Mono (latin) - "ecc28128233f90171df8f8915d60cdc59ff70b9194e1d93061816d3e3cd1f320": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY4gp9Q8gbYrhqGlRav_IXfk.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY4gp9Q8gbYrhqGlRav_IXfk.woff2", - ], - # Roboto Mono (latin-ext) - "9a7b6e1f38e9a47867ad5c2f403ff4f4477a03bbec300d4e345bf67d5d0da262": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY6E8kM4xWR1_1bYURRojRGc.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY6E8kM4xWR1_1bYURRojRGc.woff2", - ], - # Roboto Mono (vietnamese) - "b568a2d630d5924e40b73489cc4a8720fb9fb0249b8117d6d45cfc95d249c1da": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY9DiNsR5a-9Oe_Ivpu8XWlY.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY9DiNsR5a-9Oe_Ivpu8XWlY.woff2", - ], - # Roboto Mono Bold (cyrillic) - "656e4cb0b042d18f6b889948f3c9a1f87b70340bd20a38a0d738b0e32a7f00ee": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz1x-M1I1w5OMiqnVF8xBLhU.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz1x-M1I1w5OMiqnVF8xBLhU.woff2", - ], - # Roboto Mono Bold (cyrillic-ext) - "0d5221a5f914d57a674049b718a37b8f09a0e79647af8b187273f35ab0d8376c": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59FzwXaAXup5mZlfK6xRLrhsco.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59FzwXaAXup5mZlfK6xRLrhsco.woff2", - ], - # Roboto Mono Bold (greek) - "41553f58ea074adde7eaaefe9b220b49021128f6b68b8be384072c4db430603f": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fzwn6Wqxo-xwxilDXPU8chVU.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fzwn6Wqxo-xwxilDXPU8chVU.woff2", - ], - # Roboto Mono Bold (greek-ext) - "27798d63b7fadca6c6a2d17ea7673855d44baf75e8172fa9749888898ce04125": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz1T7aJLK6nKpn36IMwTcMMc.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz1T7aJLK6nKpn36IMwTcMMc.woff2", - ], - # Roboto Mono Bold (latin) - "8b827f046df0acf54d80954ae05f0b5e87fdf09bc4c1bf02e8edb0d928e259b7": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz_79_ZuUxCigM2DespTnFaw.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz_79_ZuUxCigM2DespTnFaw.woff2", - ], - # Roboto Mono Bold (latin-ext) - "b38383e889863e1c25c2334087e6b00835cef283f8448c8b2a2d5d51489d202b": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz4gd9OEPUCN3AdYW0e8tat4.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz4gd9OEPUCN3AdYW0e8tat4.woff2", - ], - # Roboto Mono Bold (vietnamese) - "03b9c55ee9bf53c57c9b9dcb739bc92ada5b97fc81deb5a57e4e8347c4eee8bb": [ - "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz8bIQSYZnWLaWC9QNCpTK_U.woff2", - "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz8bIQSYZnWLaWC9QNCpTK_U.woff2", - ], - }, - generated_rule_name = "files", - extra_build_file_content = "\n".join([ - 'load("@io_bazel_rules_closure//closure:defs.bzl", "web_library")', - '', - 'licenses(["notice"]) # Apache 2.0', - '', - 'exports_files(["LICENSE"]) # Apache 2.0', - '', - 'web_library(', - ' name = "com_google_fonts_roboto",', - ' path = "/font-roboto",', - ' srcs = [', - ' "roboto.html",', - ' ":files",', - ' ],', - ')', - '', - 'genrule(', - ' name = "html",', - ' outs = ["roboto.html"],', - ' cmd = "\\n".join([', - ' "cat <<\'EOF\' >$@",', - " '',", - " '',", - " '',", - " '',", - ' "EOF",', - ' ]),', - ')', - ]), - ) + # bazel run //tensorboard/tools:import_google_fonts -- --url='https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic;https://fonts.googleapis.com/css?family=Roboto+Mono:400,700' + filegroup_external( + name = "com_google_fonts_roboto", + licenses = ["notice"], # Apache 2.0 + sha256_urls = { + "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4": [ + "http://mirror.tensorflow.org/raw.githubusercontent.com/google/roboto/ba03b84b90b50afd99f9688059447bc545e5c0e1/LICENSE", + "https://raw.githubusercontent.com/google/roboto/ba03b84b90b50afd99f9688059447bc545e5c0e1/LICENSE", + ], + # Roboto (cyrillic) + "41720926981ffb6dc229f06fc0bbf0f43e45ba032d126726ebee481c2a6559e2": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/uYECMKoHcO9x1wdmbyHIm3-_kf6ByYO6CLYdB4HQE-Y.woff2", + "https://fonts.gstatic.com/s/roboto/v18/uYECMKoHcO9x1wdmbyHIm3-_kf6ByYO6CLYdB4HQE-Y.woff2", + ], + # Roboto (cyrillic-ext) + "90a0ad0b48861588a6e33a5905b17e1219ea87ab6f07ccc41e7c2cddf38967a8": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/sTdaA6j0Psb920Vjv-mrzH-_kf6ByYO6CLYdB4HQE-Y.woff2", + "https://fonts.gstatic.com/s/roboto/v18/sTdaA6j0Psb920Vjv-mrzH-_kf6ByYO6CLYdB4HQE-Y.woff2", + ], + # Roboto (greek) + "949e287846b0940817e4ea0f65accc4481a46b8733dc12aa0265293a4645c661": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/_VYFx-s824kXq_Ul2BHqYH-_kf6ByYO6CLYdB4HQE-Y.woff2", + "https://fonts.gstatic.com/s/roboto/v18/_VYFx-s824kXq_Ul2BHqYH-_kf6ByYO6CLYdB4HQE-Y.woff2", + ], + # Roboto (greek-ext) + "e5b2e29a16d8ef4c5a123b40786af72da589c4aad634eab40d90eef8bb4418aa": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/tnj4SB6DNbdaQnsM8CFqBX-_kf6ByYO6CLYdB4HQE-Y.woff2", + "https://fonts.gstatic.com/s/roboto/v18/tnj4SB6DNbdaQnsM8CFqBX-_kf6ByYO6CLYdB4HQE-Y.woff2", + ], + # Roboto (latin) + "4352380f92ce7f9a4a4a23306b992bed10055dbfffe90987cc72083e583fc280": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/oMMgfZMQthOryQo9n22dcuvvDin1pK8aKteLpeZ5c0A.woff2", + "https://fonts.gstatic.com/s/roboto/v18/oMMgfZMQthOryQo9n22dcuvvDin1pK8aKteLpeZ5c0A.woff2", + ], + # Roboto (latin-ext) + "80fa23b4804621ce7f16b5c56d524dd90ea09d792622eeac9adf0ee6317b9e3a": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/Ks_cVxiCiwUWVsFWFA3Bjn-_kf6ByYO6CLYdB4HQE-Y.woff2", + "https://fonts.gstatic.com/s/roboto/v18/Ks_cVxiCiwUWVsFWFA3Bjn-_kf6ByYO6CLYdB4HQE-Y.woff2", + ], + # Roboto (vietnamese) + "a0a893b2ff1c82d49ac0c09ace71cf8178c0830f6a988103c779b6fc12c0da78": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/NJ4vxlgWwWbEsv18dAhqnn-_kf6ByYO6CLYdB4HQE-Y.woff2", + "https://fonts.gstatic.com/s/roboto/v18/NJ4vxlgWwWbEsv18dAhqnn-_kf6ByYO6CLYdB4HQE-Y.woff2", + ], + # Roboto Bold (cyrillic) + "6082aa2f5aab855120cd58f560f58975579097c484d23cc7854977a529f91bc4": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/isZ-wbCXNKAbnjo6_TwHToX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/isZ-wbCXNKAbnjo6_TwHToX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Bold (cyrillic-ext) + "616eb767627d16bef2b9be2218bb5f1bbbb97cfbd06c4e5241c8b532b56467aa": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/77FXFjRbGzN4aCrSFhlh3oX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/77FXFjRbGzN4aCrSFhlh3oX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Bold (greek) + "28959a3f1fea0c7f7feca26f92465f5263f2e8fdec17030e0e7a9e6a8cb321af": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/jSN2CGVDbcVyCnfJfjSdfIX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/jSN2CGVDbcVyCnfJfjSdfIX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Bold (greek-ext) + "e94a5635cb68464d332cd374fd57b95913fc5b549f1967fbb73829b2084efd98": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/UX6i4JxQDm3fVTc1CPuwqoX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/UX6i4JxQDm3fVTc1CPuwqoX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Bold (latin) + "1be216dbc059d96e288b0c1f399a1a80ee8c65e4c1272dbc4574bd6d23cf45d9": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/d-6IYplOFocCacKzxwXSOJBw1xU1rKptJj_0jans920.woff2", + "https://fonts.gstatic.com/s/roboto/v18/d-6IYplOFocCacKzxwXSOJBw1xU1rKptJj_0jans920.woff2", + ], + # Roboto Bold (latin-ext) + "6c8be972381d4da037f47c33ef1e31b88f0130ded1432730d4d792331f983839": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/97uahxiqZRoncBaCEI3aW4X0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/97uahxiqZRoncBaCEI3aW4X0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Bold (vietnamese) + "5f162f1ca2441cae368e97ed42b56332d7b68b1ffbbf9f7e4b648420667acee5": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/PwZc-YbIL414wB9rB1IAPYX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/PwZc-YbIL414wB9rB1IAPYX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Bold Italic (cyrillic) + "bb4e478b0fe2ae7fbd6369c94d126060ffa697df189d7f3653f23f521f906cd8": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC14sYYdJg5dU2qzJEVSuta0.woff2", + "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC14sYYdJg5dU2qzJEVSuta0.woff2", + ], + # Roboto Bold Italic (cyrillic-ext) + "9fc911647b05ecdbadfe6693d6ff306a0a34829999b2055ad2e474e3ad0b778d": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC_ZraR2Tg8w2lzm7kLNL0-w.woff2", + "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC_ZraR2Tg8w2lzm7kLNL0-w.woff2", + ], + # Roboto Bold Italic (greek) + "62509e2b63168ae83848cb3f76d2c47177de8618ac918af119cc7ae90c71213b": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcCwt_Rm691LTebKfY2ZkKSmI.woff2", + "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcCwt_Rm691LTebKfY2ZkKSmI.woff2", + ], + # Roboto Bold Italic (greek-ext) + "07a2e7b4a480176f0f0bc9f7ca757d8467bf41f86e3b1eed374be06ff1b51b56": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC1BW26QxpSj-_ZKm_xT4hWw.woff2", + "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC1BW26QxpSj-_ZKm_xT4hWw.woff2", + ], + # Roboto Bold Italic (latin) + "556e09ad66d48078d2ea341eff36e93dafdb56fed15e9d92e052a7cb3910e2e9": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC4gp9Q8gbYrhqGlRav_IXfk.woff2", + "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC4gp9Q8gbYrhqGlRav_IXfk.woff2", + ], + # Roboto Bold Italic (latin-ext) + "5f6115b8655a4e9e0bb6440956b2d7b7d52e90193c6be53731fcf97d1fc45ec3": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC6E8kM4xWR1_1bYURRojRGc.woff2", + "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC6E8kM4xWR1_1bYURRojRGc.woff2", + ], + # Roboto Bold Italic (vietnamese) + "b75ce2f4333ea21c1d0aeb0061edcf81b7fffe022a732dae52834a8b62615c5f": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC9DiNsR5a-9Oe_Ivpu8XWlY.woff2", + "https://fonts.gstatic.com/s/roboto/v18/t6Nd4cfPRhZP44Q5QAjcC9DiNsR5a-9Oe_Ivpu8XWlY.woff2", + ], + # Roboto Italic (cyrillic) + "38602b65e115ae1b267627d5533c2607f446aba939b9ca9143cc4373bd285b83": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OpXUqTo0UgQQhGj_SFdLWBkAz4rYn47Zy2rvigWQf6w.woff2", + "https://fonts.gstatic.com/s/roboto/v18/OpXUqTo0UgQQhGj_SFdLWBkAz4rYn47Zy2rvigWQf6w.woff2", + ], + # Roboto Italic (cyrillic-ext) + "d04ce842e235d3e6abfcd37d6598138007f56e391a035167d78edf9088d3035a": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/WxrXJa0C3KdtC7lMafG4dRkAz4rYn47Zy2rvigWQf6w.woff2", + "https://fonts.gstatic.com/s/roboto/v18/WxrXJa0C3KdtC7lMafG4dRkAz4rYn47Zy2rvigWQf6w.woff2", + ], + # Roboto Italic (greek) + "aa9a8db3e6de8124291c3f2fd0bbd0aca8c796f365204d78414536067115be07": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/cDKhRaXnQTOVbaoxwdOr9xkAz4rYn47Zy2rvigWQf6w.woff2", + "https://fonts.gstatic.com/s/roboto/v18/cDKhRaXnQTOVbaoxwdOr9xkAz4rYn47Zy2rvigWQf6w.woff2", + ], + # Roboto Italic (greek-ext) + "785896def5be5b35967d63f5589ce67fc8d3b452153a37323a4d9b886d828c60": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/1hZf02POANh32k2VkgEoUBkAz4rYn47Zy2rvigWQf6w.woff2", + "https://fonts.gstatic.com/s/roboto/v18/1hZf02POANh32k2VkgEoUBkAz4rYn47Zy2rvigWQf6w.woff2", + ], + # Roboto Italic (latin) + "64565561ddb338a11ffce5b84aa53fa6e8fd203c34208e61eb5602cd08bf527f": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/vPcynSL0qHq_6dX7lKVByXYhjbSpvc47ee6xR_80Hnw.woff2", + "https://fonts.gstatic.com/s/roboto/v18/vPcynSL0qHq_6dX7lKVByXYhjbSpvc47ee6xR_80Hnw.woff2", + ], + # Roboto Italic (latin-ext) + "d5b2d7e9efe90feef0c4507d90b2b4e464c6929efd05ad4294d3d5057db57b97": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/vSzulfKSK0LLjjfeaxcREhkAz4rYn47Zy2rvigWQf6w.woff2", + "https://fonts.gstatic.com/s/roboto/v18/vSzulfKSK0LLjjfeaxcREhkAz4rYn47Zy2rvigWQf6w.woff2", + ], + # Roboto Italic (vietnamese) + "5d875731e35140f94bc4cb23944d104688d3c6d372833ddae8d22d3aa802beb4": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/K23cxWVTrIFD6DJsEVi07RkAz4rYn47Zy2rvigWQf6w.woff2", + "https://fonts.gstatic.com/s/roboto/v18/K23cxWVTrIFD6DJsEVi07RkAz4rYn47Zy2rvigWQf6w.woff2", + ], + # Roboto Light (cyrillic) + "cb94537350a4c593515c0b9066a22f0d74284173b88521c50b894a3179402e46": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/Fl4y0QdOxyyTHEGMXX8kcYX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/Fl4y0QdOxyyTHEGMXX8kcYX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Light (cyrillic-ext) + "66a095c96771a94d2772c7e19a32c6585d4bed3a989faa9e595bb270a2621608": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/0eC6fl06luXEYWpBSJvXCIX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/0eC6fl06luXEYWpBSJvXCIX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Light (greek) + "f0e3a88ae70245bcac12d2640792e50a165ce618d3b5979b735913e582d204f7": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/I3S1wsgSg9YCurV6PUkTOYX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/I3S1wsgSg9YCurV6PUkTOYX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Light (greek-ext) + "40a162d49fd25da223ea81454616f469270020fc186fe2f109534fb1f72e1bcb": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/-L14Jk06m6pUHB-5mXQQnYX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/-L14Jk06m6pUHB-5mXQQnYX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Light (latin) + "f7c386915e39d8a925fe10d15744a9da95ac8f90423e12728e7fc3c5e34f4559": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/Hgo13k-tfSpn0qi1SFdUfZBw1xU1rKptJj_0jans920.woff2", + "https://fonts.gstatic.com/s/roboto/v18/Hgo13k-tfSpn0qi1SFdUfZBw1xU1rKptJj_0jans920.woff2", + ], + # Roboto Light (latin-ext) + "bbeeb150a0f72cbd898ba36ed908bb95ef2386d41158c943aa3af4e0c8430639": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/Pru33qjShpZSmG3z6VYwnYX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/Pru33qjShpZSmG3z6VYwnYX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Light (vietnamese) + "5a4e99d1db8c9fd38f6b1c92582c2351cf27075f5ccef89404a8d673fa8e7b26": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/NYDWBdD4gIq26G5XYbHsFIX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/NYDWBdD4gIq26G5XYbHsFIX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Light Italic (cyrillic) + "4160dc56c5afc7320243a73cdf025d1c64ea19e035b98bad9c170e37c98ee5e2": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at14sYYdJg5dU2qzJEVSuta0.woff2", + "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at14sYYdJg5dU2qzJEVSuta0.woff2", + ], + # Roboto Light Italic (cyrillic-ext) + "d95d953cff5e309f22a680e48981070d2cbebf75daba25b078834bf0c4f143e4": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at_ZraR2Tg8w2lzm7kLNL0-w.woff2", + "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at_ZraR2Tg8w2lzm7kLNL0-w.woff2", + ], + # Roboto Light Italic (greek) + "8d649207dfd9e6f53614ee7ee8e0865789e38b39244ab1546ee5117ab6f6ed2f": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0atwt_Rm691LTebKfY2ZkKSmI.woff2", + "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0atwt_Rm691LTebKfY2ZkKSmI.woff2", + ], + # Roboto Light Italic (greek-ext) + "a1153c52da99d21ed2f036e5849c3b2a5d7d3d5913d63ceac983d388288420b4": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at1BW26QxpSj-_ZKm_xT4hWw.woff2", + "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at1BW26QxpSj-_ZKm_xT4hWw.woff2", + ], + # Roboto Light Italic (latin) + "c4fc2fd6457f67718ccff3434f39a84a83be98defa8e23ac1942580ea53a925e": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at4gp9Q8gbYrhqGlRav_IXfk.woff2", + "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at4gp9Q8gbYrhqGlRav_IXfk.woff2", + ], + # Roboto Light Italic (latin-ext) + "fd5b96eb1adc32b3fd7823f6a9e3c14122a060d5665091c33d9243f2541b016c": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at6E8kM4xWR1_1bYURRojRGc.woff2", + "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at6E8kM4xWR1_1bYURRojRGc.woff2", + ], + # Roboto Light Italic (vietnamese) + "ced9470e7e60d5edeccf4d3a0ab2f57ef653ec9de3097e6950bc06c64157aa5a": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at9DiNsR5a-9Oe_Ivpu8XWlY.woff2", + "https://fonts.gstatic.com/s/roboto/v18/7m8l7TlFO-S3VkhHuR0at9DiNsR5a-9Oe_Ivpu8XWlY.woff2", + ], + # Roboto Medium (cyrillic) + "74f08a5b16db96fd23eeca2c2e6c354d08a95b3360aa2bb6ea0890517bb10469": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/oHi30kwQWvpCWqAhzHcCSIX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/oHi30kwQWvpCWqAhzHcCSIX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Medium (cyrillic-ext) + "2aa57d00d0cac3b30aef28a19e9cfea12b45daf9562b4fa623750c8145c0767b": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/ZLqKeelYbATG60EpZBSDy4X0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/ZLqKeelYbATG60EpZBSDy4X0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Medium (greek) + "b95a36dd1483f97002a0c8aba87106f7fefbd67f22bc25a2bf21352bb4f316ef": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/mx9Uck6uB63VIKFYnEMXrYX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/mx9Uck6uB63VIKFYnEMXrYX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Medium (greek-ext) + "399cdbc9a94414d94fb15b0386888c6bc8ce4d6140cc3a9a571406a76cf47bb5": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/rGvHdJnr2l75qb0YND9NyIX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/rGvHdJnr2l75qb0YND9NyIX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Medium (latin) + "b79781efede37903be212fcdf63955e41c8649e678b6b83adf824459d240a188": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/RxZJdnzeo3R5zSexge8UUZBw1xU1rKptJj_0jans920.woff2", + "https://fonts.gstatic.com/s/roboto/v18/RxZJdnzeo3R5zSexge8UUZBw1xU1rKptJj_0jans920.woff2", + ], + # Roboto Medium (latin-ext) + "ba99e38768dd8358450dc363431400b1642c7cd7e5b47830e30aa8ec80fb4790": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/oOeFwZNlrTefzLYmlVV1UIX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/oOeFwZNlrTefzLYmlVV1UIX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Medium (vietnamese) + "e785fcb2332a43e5f489c0e7457001a93800b459bdf5173cffbb880f350077eb": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/mbmhprMH69Zi6eEPBYVFhYX0hVgzZQUfRDuZrPvH3D8.woff2", + "https://fonts.gstatic.com/s/roboto/v18/mbmhprMH69Zi6eEPBYVFhYX0hVgzZQUfRDuZrPvH3D8.woff2", + ], + # Roboto Medium Italic (cyrillic) + "e9f24fd84cfbdad488d4f05d97ca2e009af8248044def329f0c78c04e12c32cb": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0V4sYYdJg5dU2qzJEVSuta0.woff2", + "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0V4sYYdJg5dU2qzJEVSuta0.woff2", + ], + # Roboto Medium Italic (cyrillic-ext) + "ecfda0e4317641a395971d71435ad1a3dce0499bccc9bcdcaaebffb714588a4e": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0fZraR2Tg8w2lzm7kLNL0-w.woff2", + "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0fZraR2Tg8w2lzm7kLNL0-w.woff2", + ], + # Roboto Medium Italic (greek) + "510c1001aa3c1ae574eba6eaa5a404414dd0f5d5cd8c213fe0fac404c1fbbd7c": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0Qt_Rm691LTebKfY2ZkKSmI.woff2", + "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0Qt_Rm691LTebKfY2ZkKSmI.woff2", + ], + # Roboto Medium Italic (greek-ext) + "e5343e5d46125f688c2f266369983a1f92dbefa8d16f131b09768cdd4a5cebd4": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0VBW26QxpSj-_ZKm_xT4hWw.woff2", + "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0VBW26QxpSj-_ZKm_xT4hWw.woff2", + ], + # Roboto Medium Italic (latin) + "76d779c16f21b55a95fb182bf7552447ee340d15556e53a99dd789383f6d8c32": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0Ygp9Q8gbYrhqGlRav_IXfk.woff2", + "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0Ygp9Q8gbYrhqGlRav_IXfk.woff2", + ], + # Roboto Medium Italic (latin-ext) + "a69b0c33d809b7aac3e9648bfc995bc38cd5e426efeb006dc3b31523f4867f73": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0aE8kM4xWR1_1bYURRojRGc.woff2", + "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0aE8kM4xWR1_1bYURRojRGc.woff2", + ], + # Roboto Medium Italic (vietnamese) + "2c94704be76a8ec87995f3427911e50987cfcaa13c5749c770419559fe836509": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0dDiNsR5a-9Oe_Ivpu8XWlY.woff2", + "https://fonts.gstatic.com/s/roboto/v18/OLffGBTaF0XFOW1gnuHF0dDiNsR5a-9Oe_Ivpu8XWlY.woff2", + ], + # Roboto Mono (cyrillic) + "2c9fae8205ea404d8400b9731423d5f8261788efcb26b651ad1031c70c895824": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY14sYYdJg5dU2qzJEVSuta0.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY14sYYdJg5dU2qzJEVSuta0.woff2", + ], + # Roboto Mono (cyrillic-ext) + "671d1df350d3ccfd9a5ebbc9e92810a274d6215a648099f0f6e3e256b2bdae02": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY_ZraR2Tg8w2lzm7kLNL0-w.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY_ZraR2Tg8w2lzm7kLNL0-w.woff2", + ], + # Roboto Mono (greek) + "eb84188b287e62e965be53c788b6562554cefcc0a3520f792ba91bb60d40e607": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpYwt_Rm691LTebKfY2ZkKSmI.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpYwt_Rm691LTebKfY2ZkKSmI.woff2", + ], + # Roboto Mono (greek-ext) + "978a5db5af1654146da5ec93980c273df7010a2d045f1360ac3b9d85bd890299": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY1BW26QxpSj-_ZKm_xT4hWw.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY1BW26QxpSj-_ZKm_xT4hWw.woff2", + ], + # Roboto Mono (latin) + "ecc28128233f90171df8f8915d60cdc59ff70b9194e1d93061816d3e3cd1f320": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY4gp9Q8gbYrhqGlRav_IXfk.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY4gp9Q8gbYrhqGlRav_IXfk.woff2", + ], + # Roboto Mono (latin-ext) + "9a7b6e1f38e9a47867ad5c2f403ff4f4477a03bbec300d4e345bf67d5d0da262": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY6E8kM4xWR1_1bYURRojRGc.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY6E8kM4xWR1_1bYURRojRGc.woff2", + ], + # Roboto Mono (vietnamese) + "b568a2d630d5924e40b73489cc4a8720fb9fb0249b8117d6d45cfc95d249c1da": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY9DiNsR5a-9Oe_Ivpu8XWlY.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/hMqPNLsu_dywMa4C_DEpY9DiNsR5a-9Oe_Ivpu8XWlY.woff2", + ], + # Roboto Mono Bold (cyrillic) + "656e4cb0b042d18f6b889948f3c9a1f87b70340bd20a38a0d738b0e32a7f00ee": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz1x-M1I1w5OMiqnVF8xBLhU.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz1x-M1I1w5OMiqnVF8xBLhU.woff2", + ], + # Roboto Mono Bold (cyrillic-ext) + "0d5221a5f914d57a674049b718a37b8f09a0e79647af8b187273f35ab0d8376c": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59FzwXaAXup5mZlfK6xRLrhsco.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59FzwXaAXup5mZlfK6xRLrhsco.woff2", + ], + # Roboto Mono Bold (greek) + "41553f58ea074adde7eaaefe9b220b49021128f6b68b8be384072c4db430603f": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fzwn6Wqxo-xwxilDXPU8chVU.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fzwn6Wqxo-xwxilDXPU8chVU.woff2", + ], + # Roboto Mono Bold (greek-ext) + "27798d63b7fadca6c6a2d17ea7673855d44baf75e8172fa9749888898ce04125": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz1T7aJLK6nKpn36IMwTcMMc.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz1T7aJLK6nKpn36IMwTcMMc.woff2", + ], + # Roboto Mono Bold (latin) + "8b827f046df0acf54d80954ae05f0b5e87fdf09bc4c1bf02e8edb0d928e259b7": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz_79_ZuUxCigM2DespTnFaw.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz_79_ZuUxCigM2DespTnFaw.woff2", + ], + # Roboto Mono Bold (latin-ext) + "b38383e889863e1c25c2334087e6b00835cef283f8448c8b2a2d5d51489d202b": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz4gd9OEPUCN3AdYW0e8tat4.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz4gd9OEPUCN3AdYW0e8tat4.woff2", + ], + # Roboto Mono Bold (vietnamese) + "03b9c55ee9bf53c57c9b9dcb739bc92ada5b97fc81deb5a57e4e8347c4eee8bb": [ + "http://mirror.tensorflow.org/fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz8bIQSYZnWLaWC9QNCpTK_U.woff2", + "https://fonts.gstatic.com/s/robotomono/v5/N4duVc9C58uwPiY8_59Fz8bIQSYZnWLaWC9QNCpTK_U.woff2", + ], + }, + generated_rule_name = "files", + extra_build_file_content = "\n".join([ + 'load("@io_bazel_rules_closure//closure:defs.bzl", "web_library")', + "", + 'licenses(["notice"]) # Apache 2.0', + "", + 'exports_files(["LICENSE"]) # Apache 2.0', + "", + "web_library(", + ' name = "com_google_fonts_roboto",', + ' path = "/font-roboto",', + " srcs = [", + ' "roboto.html",', + ' ":files",', + " ],", + ")", + "", + "genrule(", + ' name = "html",', + ' outs = ["roboto.html"],', + ' cmd = "\\n".join([', + ' "cat <<\'EOF\' >$@",', + " '',", + " '',", + " '',", + " '',", + ' "EOF",', + " ]),", + ")", + ]), + ) From 2aa430110f000de7afad645e843fdcb424e4bcee Mon Sep 17 00:00:00 2001 From: Ivo List Date: Wed, 17 Jan 2024 19:56:07 +0100 Subject: [PATCH 2/5] Replace legacy struct providers with modern ones Legacy struct providers have been deprecated by Bazel. Replacing them with modern providers, will make it possible to simplify and remove legacy handling from Bazel. --- tensorboard/defs/internal/html.bzl | 43 ++++++++--------- tensorboard/defs/web.bzl | 76 ++++++++++++++---------------- tensorboard/defs/zipper.bzl | 16 +++---- 3 files changed, 60 insertions(+), 75 deletions(-) diff --git a/tensorboard/defs/internal/html.bzl b/tensorboard/defs/internal/html.bzl index 48d3dcbe80..8d5978267a 100644 --- a/tensorboard/defs/internal/html.bzl +++ b/tensorboard/defs/internal/html.bzl @@ -15,7 +15,7 @@ """Rule for building the HTML binary.""" load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_aspect") -load("@io_bazel_rules_closure//closure/private:defs.bzl", "collect_js", "long_path", "unfurl") # buildifier: disable=bzl-visibility +load("@io_bazel_rules_closure//closure/private:defs.bzl", "WebFilesInfo", "long_path", "unfurl") # buildifier: disable=bzl-visibility def _tb_combine_html_impl(ctx): """Compiles HTMLs into one HTML. @@ -25,18 +25,11 @@ def _tb_combine_html_impl(ctx): JavaScript file when `js_path` is specified. """ - deps = unfurl(ctx.attr.deps, provider = "webfiles") - manifests = depset(order = "postorder") - files = depset() - webpaths = depset() - for dep in deps: - manifests = depset(transitive = [manifests, dep.webfiles.manifests]) - webpaths = depset(transitive = [webpaths, dep.webfiles.webpaths]) - files = depset(transitive = [files, dep.data_runfiles.files]) + deps = unfurl(ctx.attr.deps, provider = WebFilesInfo).exports + manifests = depset(order = "postorder", transitive = [dep[WebFilesInfo].manifests for dep in deps]) + webpaths = depset(transitive = [dep[WebFilesInfo].webpaths for dep in deps]) + files = depset(transitive = [dep.data_runfiles.files for dep in deps]) webpaths = depset([ctx.attr.output_path], transitive = [webpaths]) - closure_js_library = collect_js( - unfurl(ctx.attr.deps, provider = "closure_js_library"), - ) # vulcanize ctx.actions.run( @@ -91,23 +84,25 @@ def _tb_combine_html_impl(ctx): dep.data_runfiles.files, ]) - return struct( - files = depset([ctx.outputs.html, ctx.outputs.js]), - webfiles = struct( + return [ + DefaultInfo( + files = depset([ctx.outputs.html, ctx.outputs.js]), + runfiles = ctx.runfiles( + files = ctx.files.data + [ + manifest, + ctx.outputs.html, + ctx.outputs.js, + ], + transitive_files = transitive_runfiles, + ), + ), + WebFilesInfo( manifest = manifest, manifests = manifests, webpaths = webpaths, dummy = ctx.outputs.html, ), - runfiles = ctx.runfiles( - files = ctx.files.data + [ - manifest, - ctx.outputs.html, - ctx.outputs.js, - ], - transitive_files = transitive_runfiles, - ), - ) + ] tb_combine_html = rule( implementation = _tb_combine_html_impl, diff --git a/tensorboard/defs/web.bzl b/tensorboard/defs/web.bzl index 6e26219dce..c2302e7aae 100644 --- a/tensorboard/defs/web.bzl +++ b/tensorboard/defs/web.bzl @@ -22,6 +22,8 @@ load( "@io_bazel_rules_closure//closure/private:defs.bzl", "CLOSURE_LIBRARY_BASE_ATTR", "CLOSURE_WORKER_ATTR", + "ClosureJsLibraryInfo", + "WebFilesInfo", "collect_js", "collect_runfiles", "difference", @@ -49,10 +51,8 @@ def _tf_web_library(ctx): fail("when \"*\" is suppressed no other items should be present") # process what came before - deps = unfurl(ctx.attr.deps, provider = "webfiles") - webpaths = depset() - for dep in deps: - webpaths = depset(transitive = [webpaths, dep.webfiles.webpaths]) + deps = unfurl(ctx.attr.deps, provider = WebFilesInfo).exports + webpaths = depset(transitive = [dep[WebFilesInfo].webpaths for dep in deps]) # process what comes now manifest_srcs = [] @@ -93,11 +93,11 @@ def _tf_web_library(ctx): # If a rule exists purely to export other build rules, then it's # appropriate for the exported sources to be included in the # development web server. - export_deps = unfurl(ctx.attr.exports) + export_deps = unfurl(ctx.attr.exports).exports devserver_manifests = depset( order = "postorder", transitive = ( - [manifests] + [dep.webfiles.manifests for dep in export_deps] + [manifests] + [dep[WebFilesInfo].manifests for dep in export_deps] ), ) params = struct( @@ -125,38 +125,38 @@ def _tf_web_library(ctx): # rule from rules_closure: because `tf_web_library`s may depend on # either other `tf_web_library`s or base `web_library`s, the # interfaces ~must be the same. - # - # buildozer: disable=rule-impl-return - return struct( - files = depset(web_srcs + [dummy]), - exports = unfurl(ctx.attr.exports), - webfiles = struct( + return [ + WebFilesInfo( manifest = manifest, manifests = manifests, webpaths = webpaths, dummy = dummy, ), - closure_js_library = collect_js( - unfurl(ctx.attr.deps, provider = "closure_js_library"), + unfurl(ctx.attr.exports), + collect_js( + unfurl(ctx.attr.deps, provider = ClosureJsLibraryInfo).exports, ctx.files._closure_library_base, ), - runfiles = ctx.runfiles( - files = (ctx.files.srcs + - ctx.files.data + - ctx.files._closure_library_base + [ - manifest, - params_file, - ctx.outputs.executable, - dummy, - ]), - transitive_files = depset(transitive = [ - collect_runfiles([ctx.attr._WebfilesServer]), - collect_runfiles(deps), - collect_runfiles(export_deps), - collect_runfiles(ctx.attr.data), - ]), + DefaultInfo( + files = depset(web_srcs + [dummy]), + runfiles = ctx.runfiles( + files = (ctx.files.srcs + + ctx.files.data + + ctx.files._closure_library_base + [ + manifest, + params_file, + ctx.outputs.executable, + dummy, + ]), + transitive_files = depset(transitive = [ + collect_runfiles([ctx.attr._WebfilesServer]), + collect_runfiles(deps), + collect_runfiles(export_deps), + collect_runfiles(ctx.attr.data), + ]), + ), ), - ) + ] def _make_manifest(ctx, src_list): manifest = _new_file(ctx, "-webfiles.pbtxt") @@ -171,9 +171,7 @@ def _make_manifest(ctx, src_list): def _run_webfiles_validator(ctx, srcs, deps, manifest): dummy = _new_file(ctx, "-webfiles.ignoreme") - manifests = depset(order = "postorder") - for dep in deps: - manifests = depset(transitive = [manifests, dep.webfiles.manifests]) + manifests = depset(order = "postorder", transitive = [dep[WebFilesInfo].manifests for dep in deps]) if srcs: args = [ "WebfilesValidator", @@ -188,17 +186,13 @@ def _run_webfiles_validator(ctx, srcs, deps, manifest): args.append(category) inputs = [] # list of depsets inputs.append(depset([manifest] + srcs)) - direct_manifests = depset() + direct_manifests = depset([dep[WebFilesInfo].manifest for dep in deps]) for dep in deps: - inputs.append(depset([dep.webfiles.dummy])) + inputs.append(depset([dep[WebFilesInfo].dummy])) inputs.append(dep.files) - direct_manifests = depset( - [dep.webfiles.manifest], - transitive = [direct_manifests], - ) - inputs.append(depset([dep.webfiles.manifest])) + inputs.append(depset([dep[WebFilesInfo].manifest])) args.append("--direct_dep") - args.append(dep.webfiles.manifest.path) + args.append(dep[WebFilesInfo].manifest.path) for man in difference(manifests, direct_manifests): inputs.append(depset([man])) args.append("--transitive_dep") diff --git a/tensorboard/defs/zipper.bzl b/tensorboard/defs/zipper.bzl index 20f17ca2e6..98f1084691 100644 --- a/tensorboard/defs/zipper.bzl +++ b/tensorboard/defs/zipper.bzl @@ -17,14 +17,10 @@ load("@io_bazel_rules_closure//closure/private:defs.bzl", "unfurl") def _tensorboard_zip_file(ctx): - deps = unfurl(ctx.attr.deps, provider = "webfiles") - manifests = depset(order = "postorder") - files = depset() - webpaths = depset() - for dep in deps: - manifests = depset(transitive = [manifests, dep.webfiles.manifests]) - webpaths = depset(transitive = [webpaths, dep.webfiles.webpaths]) - files = depset(transitive = [files, dep.data_runfiles.files]) + deps = unfurl(ctx.attr.deps, provider = WebFilesInfo).exports + manifests = depset(order = "postorder", transitive = [dep[WebFilesInfo].manifests for dep in deps]) + webpaths = depset(transitive = [dep[WebFilesInfo].webpaths for dep in deps]) + files = depset(transitive = [dep.data_runfiles.files for dep in deps]) ctx.actions.run( mnemonic = "Zipper", inputs = depset(transitive = [manifests, files]).to_list(), @@ -40,7 +36,7 @@ def _tensorboard_zip_file(ctx): transitive_runfiles, dep.data_runfiles.files, ]) - return struct( + return DefaultInfo( files = depset([ctx.outputs.zip]), runfiles = ctx.runfiles( files = ctx.files.data + [ctx.outputs.zip], @@ -52,7 +48,7 @@ tensorboard_zip_file = rule( implementation = _tensorboard_zip_file, attrs = { "data": attr.label_list(allow_files = True), - "deps": attr.label_list(providers = ["webfiles"], mandatory = True), + "deps": attr.label_list(providers = [WebFilesInfo], mandatory = True), "_Zipper": attr.label( default = Label("//tensorboard/java/org/tensorflow/tensorboard/vulcanize:Zipper"), executable = True, From 21a4214224f5174d021c84b895e5ac8b1abeeaf3 Mon Sep 17 00:00:00 2001 From: Ivo List Date: Wed, 13 Mar 2024 22:13:36 +0100 Subject: [PATCH 3/5] Pin rules_closure to head, workaround missing com_github_gorilla_mux --- WORKSPACE | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 90f4343943..cc777878aa 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -26,11 +26,9 @@ versions.check( http_archive( name = "io_bazel_rules_webtesting", - sha256 = "e9abb7658b6a129740c0b3ef6f5a2370864e102a5ba5ffca2cea565829ed825a", - urls = [ - "http://mirror.tensorflow.org/github.com/bazelbuild/rules_webtesting/releases/download/0.3.5/rules_webtesting.tar.gz", - "https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.5/rules_webtesting.tar.gz", - ], + sha256 = "6e104e54c283c94ae3d5c6573cf3233ce478e89e0f541a869057521966a35b8f", + strip_prefix = "rules_webtesting-b6fc79c5a37cd18a5433fd080c9d2cc59548222c", + urls = ["https://github.com/bazelbuild/rules_webtesting/archive/b6fc79c5a37cd18a5433fd080c9d2cc59548222c.tar.gz"], ) load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories") @@ -55,11 +53,10 @@ py_repositories() http_archive( name = "io_bazel_rules_closure", - sha256 = "6a900831c1eb8dbfc9d6879b5820fd614d4ea1db180eb5ff8aedcb75ee747c1f", - strip_prefix = "rules_closure-db4683a2a1836ac8e265804ca5fa31852395185b", + sha256 = "ae060075a7c468eee42e6a08ddbb83f5a6663bdfdbd461261a465f4a3ae8598c", + strip_prefix = "rules_closure-7f3d3351a8cc31fbaa403de7d35578683c17b447", urls = [ - "http://mirror.tensorflow.org/github.com/bazelbuild/rules_closure/archive/db4683a2a1836ac8e265804ca5fa31852395185b.tar.gz", - "https://github.com/bazelbuild/rules_closure/archive/db4683a2a1836ac8e265804ca5fa31852395185b.tar.gz", # 2020-01-15 + "https://github.com/bazelbuild/rules_closure/archive/7f3d3351a8cc31fbaa403de7d35578683c17b447.tar.gz", # 2024-03-11 ], ) @@ -191,6 +188,11 @@ http_archive( ], ) +# WORKAROUND for rules_webtesting not declaring used com_github_gorilla_mux repo: +load("@io_bazel_rules_webtesting//web:go_repositories.bzl", "com_github_gorilla_mux") + +com_github_gorilla_mux() + # Please add all new dependencies in workspace.bzl. load("//third_party:workspace.bzl", "tensorboard_workspace") From 752bda191c34997aa48e29b2ada559e47570a803 Mon Sep 17 00:00:00 2001 From: Ivo List Date: Wed, 13 Mar 2024 22:13:59 +0100 Subject: [PATCH 4/5] Following rules_closure changes to providers --- tensorboard/defs/internal/html.bzl | 22 ++++++++------------ tensorboard/defs/web.bzl | 32 +++++++++++++----------------- tensorboard/defs/zipper.bzl | 21 ++++++++------------ 3 files changed, 30 insertions(+), 45 deletions(-) diff --git a/tensorboard/defs/internal/html.bzl b/tensorboard/defs/internal/html.bzl index 8d5978267a..99403ba051 100644 --- a/tensorboard/defs/internal/html.bzl +++ b/tensorboard/defs/internal/html.bzl @@ -15,7 +15,7 @@ """Rule for building the HTML binary.""" load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_aspect") -load("@io_bazel_rules_closure//closure/private:defs.bzl", "WebFilesInfo", "long_path", "unfurl") # buildifier: disable=bzl-visibility +load("@io_bazel_rules_closure//closure/private:defs.bzl", "WebFilesInfo", "collect_runfiles", "extract_providers", "long_path", "unfurl") # buildifier: disable=bzl-visibility def _tb_combine_html_impl(ctx): """Compiles HTMLs into one HTML. @@ -25,10 +25,11 @@ def _tb_combine_html_impl(ctx): JavaScript file when `js_path` is specified. """ - deps = unfurl(ctx.attr.deps, provider = WebFilesInfo).exports - manifests = depset(order = "postorder", transitive = [dep[WebFilesInfo].manifests for dep in deps]) - webpaths = depset(transitive = [dep[WebFilesInfo].webpaths for dep in deps]) - files = depset(transitive = [dep.data_runfiles.files for dep in deps]) + deps = extract_providers(ctx.attr.deps, provider = WebFilesInfo) + deps = unfurl(deps) + manifests = depset(order = "postorder", transitive = [dep.manifests for dep in deps]) + webpaths = depset(transitive = [dep.webpaths for dep in deps]) + files = depset(transitive = [dep[DefaultInfo].data_runfiles.files for dep in ctx.attr.deps]) webpaths = depset([ctx.attr.output_path], transitive = [webpaths]) # vulcanize @@ -77,23 +78,16 @@ def _tb_combine_html_impl(ctx): ) manifests = depset([manifest], transitive = [manifests]) - transitive_runfiles = depset() - for dep in deps: - transitive_runfiles = depset(transitive = [ - transitive_runfiles, - dep.data_runfiles.files, - ]) - return [ DefaultInfo( files = depset([ctx.outputs.html, ctx.outputs.js]), - runfiles = ctx.runfiles( + runfiles = collect_runfiles( + ctx, files = ctx.files.data + [ manifest, ctx.outputs.html, ctx.outputs.js, ], - transitive_files = transitive_runfiles, ), ), WebFilesInfo( diff --git a/tensorboard/defs/web.bzl b/tensorboard/defs/web.bzl index c2302e7aae..c184831f8a 100644 --- a/tensorboard/defs/web.bzl +++ b/tensorboard/defs/web.bzl @@ -27,6 +27,7 @@ load( "collect_js", "collect_runfiles", "difference", + "extract_providers", "long_path", "unfurl", ) @@ -51,8 +52,8 @@ def _tf_web_library(ctx): fail("when \"*\" is suppressed no other items should be present") # process what came before - deps = unfurl(ctx.attr.deps, provider = WebFilesInfo).exports - webpaths = depset(transitive = [dep[WebFilesInfo].webpaths for dep in deps]) + deps = extract_providers(ctx.attr.deps, provider = WebFilesInfo) + webpaths = depset(transitive = [dep.webpaths for dep in deps]) # process what comes now manifest_srcs = [] @@ -93,7 +94,7 @@ def _tf_web_library(ctx): # If a rule exists purely to export other build rules, then it's # appropriate for the exported sources to be included in the # development web server. - export_deps = unfurl(ctx.attr.exports).exports + export_deps = unfurl(extract_providers(ctx.attr.exports)) devserver_manifests = depset( order = "postorder", transitive = ( @@ -131,15 +132,16 @@ def _tf_web_library(ctx): manifests = manifests, webpaths = webpaths, dummy = dummy, + exports = export_deps, ), - unfurl(ctx.attr.exports), collect_js( - unfurl(ctx.attr.deps, provider = ClosureJsLibraryInfo).exports, + unfurl(deps), ctx.files._closure_library_base, ), DefaultInfo( files = depset(web_srcs + [dummy]), - runfiles = ctx.runfiles( + runfiles = collect_runfiles( + ctx, files = (ctx.files.srcs + ctx.files.data + ctx.files._closure_library_base + [ @@ -148,12 +150,7 @@ def _tf_web_library(ctx): ctx.outputs.executable, dummy, ]), - transitive_files = depset(transitive = [ - collect_runfiles([ctx.attr._WebfilesServer]), - collect_runfiles(deps), - collect_runfiles(export_deps), - collect_runfiles(ctx.attr.data), - ]), + extra_runfiles_attrs = ["export_deps", "_WebfilesServer"], ), ), ] @@ -171,7 +168,7 @@ def _make_manifest(ctx, src_list): def _run_webfiles_validator(ctx, srcs, deps, manifest): dummy = _new_file(ctx, "-webfiles.ignoreme") - manifests = depset(order = "postorder", transitive = [dep[WebFilesInfo].manifests for dep in deps]) + manifests = depset(order = "postorder", transitive = [dep.manifests for dep in deps]) if srcs: args = [ "WebfilesValidator", @@ -186,13 +183,12 @@ def _run_webfiles_validator(ctx, srcs, deps, manifest): args.append(category) inputs = [] # list of depsets inputs.append(depset([manifest] + srcs)) - direct_manifests = depset([dep[WebFilesInfo].manifest for dep in deps]) + direct_manifests = depset([dep.manifest for dep in deps]) for dep in deps: - inputs.append(depset([dep[WebFilesInfo].dummy])) - inputs.append(dep.files) - inputs.append(depset([dep[WebFilesInfo].manifest])) + inputs.append(depset([dep.dummy])) + inputs.append(depset([dep.manifest])) args.append("--direct_dep") - args.append(dep[WebFilesInfo].manifest.path) + args.append(dep.manifest.path) for man in difference(manifests, direct_manifests): inputs.append(depset([man])) args.append("--transitive_dep") diff --git a/tensorboard/defs/zipper.bzl b/tensorboard/defs/zipper.bzl index 98f1084691..8ea3f8edf5 100644 --- a/tensorboard/defs/zipper.bzl +++ b/tensorboard/defs/zipper.bzl @@ -14,13 +14,14 @@ """Rule for zipping Webfiles.""" -load("@io_bazel_rules_closure//closure/private:defs.bzl", "unfurl") +load("@io_bazel_rules_closure//closure/private:defs.bzl", "WebFilesInfo", "collect_runfiles", "extract_providers", "unfurl") def _tensorboard_zip_file(ctx): - deps = unfurl(ctx.attr.deps, provider = WebFilesInfo).exports - manifests = depset(order = "postorder", transitive = [dep[WebFilesInfo].manifests for dep in deps]) - webpaths = depset(transitive = [dep[WebFilesInfo].webpaths for dep in deps]) - files = depset(transitive = [dep.data_runfiles.files for dep in deps]) + deps = extract_providers(ctx.attr.deps, provider = WebFilesInfo) + deps = unfurl(deps) + manifests = depset(order = "postorder", transitive = [dep.manifests for dep in deps]) + webpaths = depset(transitive = [dep.webpaths for dep in deps]) + files = depset(transitive = [dep[DefaultInfo].data_runfiles.files for dep in ctx.attr.deps]) ctx.actions.run( mnemonic = "Zipper", inputs = depset(transitive = [manifests, files]).to_list(), @@ -30,17 +31,11 @@ def _tensorboard_zip_file(ctx): [m.path for m in manifests.to_list()]), progress_message = "Zipping %d files" % len(webpaths.to_list()), ) - transitive_runfiles = depset() - for dep in deps: - transitive_runfiles = depset(transitive = [ - transitive_runfiles, - dep.data_runfiles.files, - ]) return DefaultInfo( files = depset([ctx.outputs.zip]), - runfiles = ctx.runfiles( + runfiles = collect_runfiles( + ctx, files = ctx.files.data + [ctx.outputs.zip], - transitive_files = transitive_runfiles, ), ) From c1a32bc6749821b7b380295291dde7859b8e26b3 Mon Sep 17 00:00:00 2001 From: Ivo List Date: Thu, 14 Mar 2024 08:08:10 +0100 Subject: [PATCH 5/5] Bump Bazel to 6.5.0 --- .github/workflows/ci.yml | 4 ++-- WORKSPACE | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a1404c98a..de31b7fbee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,8 @@ permissions: env: # Keep this Bazel version in sync with the `versions.check` directive # in our WORKSPACE file. - BAZEL_VERSION: '4.2.2' - BAZEL_SHA256SUM: '11dea6c7cfd866ed520af19a6bb1d952f3e9f4ee60ffe84e63c0825d95cb5859' + BAZEL_VERSION: '6.5.0' + BAZEL_SHA256SUM: 'a40ac69263440761199fcb8da47ad4e3f328cbe79ffbf4ecc14e5ba252857307' BUILDTOOLS_VERSION: '3.0.0' BUILDIFIER_SHA256SUM: 'e92a6793c7134c5431c58fbc34700664f101e5c9b1c1fcd93b97978e8b7f88db' BUILDOZER_SHA256SUM: '3d58a0b6972e4535718cdd6c12778170ea7382de7c75bc3728f5719437ffb84d' diff --git a/WORKSPACE b/WORKSPACE index cc777878aa..67e90a0915 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -21,7 +21,7 @@ versions.check( maximum_bazel_version = "6.999.0", # Keep this version in sync with: # * The BAZEL environment variable defined in .github/workflows/ci.yml, which is used for CI and nightly builds. - minimum_bazel_version = "4.2.2", + minimum_bazel_version = "6.5.0", ) http_archive(