Commit 4635dd1d authored by Trent Apted's avatar Trent Apted Committed by Commit Bot

Split the closure typecheck target for chrome://media-app into index/app.

Currently there is only one typechecking pass for chrome://media-app.
This means the two JS contexts are being typechecked together, and the
compiler doesn't complain if receiver.js uses function signatures in
launch.js even though they are isolated from each other.

Create one type check target for each .html file, listing the .js
files included in each (via script tags).

Bug: 996088
Change-Id: I7d24a54a1869a535721ef162ec15d268b3b00171
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2091092Reviewed-by: default avatarPatti <patricialor@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748071}
parent fef162d0
......@@ -6,21 +6,37 @@ import("//third_party/closure_compiler/compile_js.gni")
# Note we compile with reportUnknownTypes while it works, but if dependencies
# get more complex, we should remove it and only enable in developer builds.
js_type_check("closure_compile") {
closure_flags = default_closure_args + [
"jscomp_error=strictCheckTypes",
"jscomp_error=reportUnknownTypes",
"language_in=ECMASCRIPT_2018",
# TODO(crbug/1048973): Remove these when the mojo bindings
# js is updated to pass a closure compile check.
"hide_warnings_for=mojo/public/js/",
"hide_warnings_for=chromeos/components/media_app_ui/media_app_ui.mojom-lite-for-compile.js",
]
media_closure_flags = default_closure_args + [
"jscomp_error=strictCheckTypes",
"jscomp_error=reportUnknownTypes",
"language_in=ECMASCRIPT_2018",
# TODO(crbug/1048973): Remove these when the mojo bindings
# js is updated to pass a closure compile check.
"hide_warnings_for=mojo/public/js/",
"hide_warnings_for=chromeos/components/media_app_ui/media_app_ui.mojom-lite-for-compile.js",
]
group("closure_compile") {
deps = [
":closure_compile_app",
":closure_compile_index",
]
}
js_type_check("closure_compile_index") {
closure_flags = media_closure_flags
deps = [
":launch",
":message_pipe",
":mojo_api_bootstrap",
]
}
js_type_check("closure_compile_app") {
closure_flags = media_closure_flags
deps = [
":message_pipe",
":receiver",
]
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment