0

WebUI: Clean up more closure compiler references

- Fix a potential build issue by ensuring builds that manually override
  enable_js_type_check only add the webui_closure_compile target on
  ChromeOS Ash.
- Update documentation to indicate closure should never be used on other
  platforms.

Bug: 1316438
Change-Id: I44d35f9805ca56d3825a3c4106964740bdec5b7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4185395
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1095761}
This commit is contained in:
Rebekah Potter
2023-01-23 19:48:14 +00:00
committed by Chromium LUCI CQ
parent 0b948e28b2
commit b2f0faef8c
3 changed files with 8 additions and 4 deletions

@ -115,7 +115,7 @@ group("gn_all") {
deps += [ "//third_party/abseil-cpp:absl_tests" ]
}
if (enable_js_type_check) {
if (is_chromeos_ash && enable_js_type_check) {
deps += [ ":webui_closure_compile" ]
}

@ -1,5 +1,9 @@
# Closure Compilation
**Important: Closure Compilation is only supported on ChromeOS Ash. On all
other platforms, Closure Compiler is deprecated; TypeScript should be used
for type checking.** See [bug](https://www.crbug.com/1316438)
## What is type safety?
[Statically-typed languages](https://en.wikipedia.org/wiki/Type_system#Static_type_checking)

@ -341,10 +341,10 @@ if (!enterKey) {
feature when the code needs to handle null/undefined gracefully.
### Closure compiler
### Closure compiler (ChromeOS Ash code only)
* Closure compiler should only be used by legacy code that has not yet been
converted to use TypeScript.
* Closure compiler can only be used on ChromeOS Ash. All other platforms
are required to use TypeScript to add type checking.
* Use the [closure
compiler](https://chromium.googlesource.com/chromium/src/+/main/docs/closure_compilation.md)