build: re-enable template type-checking for various targets across the repo (#34144)

Various targets have their template type-checking disabled in the past.

There is no reason for this any more.

The only target that was tricky was packages/examples/core:core_examples
which was quite broken and I had to fix it up.

Template typechecking is still disabled under blaze, see FW-1753 for more
info.

PR Close #34144
This commit is contained in:
Igor Minar 2019-11-29 01:54:33 -08:00 committed by Miško Hevery
parent d8792b3c36
commit 1421eff382
38 changed files with 14 additions and 79 deletions

View File

@ -9,11 +9,7 @@ ng_module(
name = "ng2",
srcs = glob(["*.ts"]),
generate_ve_shims = True,
# FIXME-IVY(FW-998): ExpressionTranslatorVisitor#visitWriteKeyExpr is not implemented.
tags = ["fixme-ivy-aot"],
tsconfig = "//modules/benchmarks:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//modules/benchmarks/src:util_lib",
"//packages/core",
@ -36,13 +32,11 @@ ts_devserver(
"//tools/rxjs:rxjs_umd_modules",
],
static_files = ["index.html"],
tags = ["fixme-ivy-aot"],
deps = [":ng2"],
)
benchmark_test(
name = "perf",
server = ":devserver",
tags = ["fixme-ivy-aot"],
deps = ["//modules/benchmarks/src/largeform:tests_lib"],
)

View File

@ -11,8 +11,6 @@ ng_module(
srcs = glob(["*.ts"]),
generate_ve_shims = True,
tsconfig = "//modules/benchmarks:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//modules/benchmarks/src:util_lib",
"//modules/benchmarks/src/largetable:util_lib",

View File

@ -8,8 +8,6 @@ ng_module(
srcs = glob(["*.ts"]),
generate_ve_shims = True,
tsconfig = "//modules/benchmarks:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//modules/benchmarks/src:util_lib",
"//modules/benchmarks/src/largetable:util_lib",

View File

@ -11,8 +11,6 @@ ng_module(
srcs = glob(["*.ts"]),
generate_ve_shims = True,
tsconfig = "//modules/benchmarks:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//modules/benchmarks/src:util_lib",
"//modules/benchmarks/src/tree:util_lib",

View File

@ -8,8 +8,6 @@ ng_module(
srcs = glob(["*.ts"]),
generate_ve_shims = True,
tsconfig = "//modules/benchmarks:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//modules/benchmarks/src:util_lib",
"//modules/benchmarks/src/tree:util_lib",

View File

@ -7,8 +7,6 @@ ng_module(
srcs = glob(["**/*.ts"]),
assets = glob(["**/*.css"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/animations",
"//packages/core",

View File

@ -6,8 +6,6 @@ ng_module(
name = "async",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -7,8 +7,6 @@ ng_module(
srcs = glob(["**/*.ts"]),
assets = ["template.html"],
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -6,8 +6,6 @@ ng_module(
name = "hello_world",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -6,8 +6,6 @@ ng_module(
name = "http",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/http",

View File

@ -6,8 +6,6 @@ ng_module(
name = "jsonp",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/http",

View File

@ -6,8 +6,6 @@ ng_module(
name = "key_events",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -6,8 +6,6 @@ ng_module(
name = "model_driven_forms",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/forms",

View File

@ -6,8 +6,6 @@ ng_module(
name = "order_management",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/forms",

View File

@ -6,8 +6,6 @@ ng_module(
name = "person_management",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/forms",

View File

@ -13,8 +13,6 @@ ng_module(
# need to disable resource inlining.
inline_resources = False,
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -7,8 +7,6 @@ ng_module(
srcs = glob(["**/*.ts"]),
assets = glob(["**/*.html"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -10,8 +10,6 @@ ng_module(
name = "sourcemap",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -6,8 +6,6 @@ ng_module(
name = "svg",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -6,8 +6,6 @@ ng_module(
name = "template_driven_forms",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/forms",

View File

@ -10,8 +10,6 @@ ng_module(
"css/base.css",
],
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -6,8 +6,6 @@ ng_module(
name = "animations",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/animations",
"//packages/core",

View File

@ -7,8 +7,6 @@ ng_module(
srcs = glob(["**/*.ts"]),
assets = ["image_demo.html"],
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-webworker",

View File

@ -6,8 +6,6 @@ ng_module(
name = "input",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-webworker",

View File

@ -6,8 +6,6 @@ ng_module(
name = "kitchen_sink",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-webworker",

View File

@ -6,8 +6,6 @@ ng_module(
name = "message_broker",
srcs = glob(["**/*.ts"]),
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-webworker",

View File

@ -7,8 +7,6 @@ ng_module(
srcs = glob(["**/*.ts"]),
assets = ["app.html"],
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-webworker",

View File

@ -7,8 +7,6 @@ ng_module(
srcs = glob(["**/*.ts"]),
assets = ["todo.html"],
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/forms",

View File

@ -7,8 +7,6 @@ ng_module(
srcs = glob(["**/*.ts"]),
assets = ["app/zippy.html"],
tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -305,6 +305,9 @@ def _ngc_tsconfig(ctx, files, srcs, **kwargs):
"enableSummariesForJit": is_legacy_ngc,
"enableIvy": is_ivy_enabled(ctx),
"fullTemplateTypeCheck": ctx.attr.type_check,
# TODO(alxhub/arick): template type-checking in g3 is currently disabled because of
# preexisting failures. Reenable once g3 is fixed: FW-1753
"ivyTemplateTypeCheck": _is_bazel(),
# In Google3 we still want to use the symbol factory re-exports in order to
# not break existing apps inside Google. Unlike Bazel, Google3 does not only
# enforce strict dependencies of source files, but also for generated files

View File

@ -9,8 +9,6 @@ ng_module(
exclude = ["**/*_spec.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/common",
"//packages/core",

View File

@ -12,11 +12,10 @@ ng_module(
],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/animations",
"//packages/core",
"//packages/forms",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"//packages/platform-browser/animations",

View File

@ -6,7 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
/* tslint:disable:no-console */
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive} from '@angular/core';
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
// #docregion mark-for-check
@ -42,7 +43,7 @@ class DataListProvider {
`,
})
class GiantList {
constructor(private ref: ChangeDetectorRef, private dataProvider: DataListProvider) {
constructor(private ref: ChangeDetectorRef, public dataProvider: DataListProvider) {
ref.detach();
setInterval(() => { this.ref.detectChanges(); }, 5000);
}
@ -70,8 +71,9 @@ class DataProvider {
@Component({selector: 'live-data', inputs: ['live'], template: 'Data: {{dataProvider.data}}'})
class LiveData {
constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}
constructor(private ref: ChangeDetectorRef, public dataProvider: DataProvider) {}
@Input()
set live(value: boolean) {
if (value) {
this.ref.reattach();
@ -94,3 +96,8 @@ class App1 {
live = true;
}
// #enddocregion reattach
@NgModule({declarations: [AppComponent, GiantList, App, LiveData, App1], imports: [FormsModule]})
class CoreExamplesModule {
}

View File

@ -9,8 +9,6 @@ ng_module(
exclude = ["**/*_spec.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/forms",

View File

@ -8,8 +8,6 @@ ng_module(
["**/*.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -9,8 +9,6 @@ ng_module(
exclude = ["**/*_spec.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -9,8 +9,6 @@ ng_module(
exclude = ["**/*_spec.ts"],
),
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"//packages/core",
"//packages/platform-browser",

View File

@ -12,8 +12,6 @@ def create_upgrade_example_targets(name, srcs, e2e_srcs, entry_module, assets =
name = "%s_sources" % name,
srcs = srcs,
generate_ve_shims = True,
# TODO: FW-1004 Type checking is currently not complete.
type_check = False,
deps = [
"@npm//@types/angular",
"@npm//@types/jasmine",