angular-cn/packages/compiler-cli/test/ngtsc
Alex Rickabaugh 498a2ffba3 fix(ivy): don't produce template diagnostics when scope is invalid (#34460)
Previously, ngtsc would perform scope analysis (which directives/pipes are
available inside a component's template) and template type-checking of that
template as separate steps. If a component's scope was somehow invalid (e.g.
its NgModule imported something which wasn't another NgModule), the
component was treated as not having a scope. This meant that during template
type-checking, errors would be produced for any invalid expressions/usage of
other components that should have been in the scope.

This commit changes ngtsc to skip template type-checking of a component if
its scope is erroneous (as opposed to not present in the first place). Thus,
users aren't overwhelmed with diagnostic errors for the template and are
only informed of the root cause of the problem: an invalid NgModule scope.

Fixes #33849

PR Close #34460
2019-12-18 15:04:49 -08:00
..
fake_core fix(core): make QueryList implement Iterable in the type system (#33536) 2019-11-19 13:43:53 -08:00
BUILD.bazel build: remove redundant `@types/source-map` dependency (#31468) 2019-07-11 17:18:12 -04:00
component_indexing_spec.ts feat(ivy): index template references, variables, bound attributes/events (#31535) 2019-07-25 13:09:10 -07:00
env.ts test(ivy): driveDiagnostics() works incrementally (#33862) 2019-11-20 11:46:02 -08:00
incremental_error_spec.ts perf(ivy): reuse prior analysis work during incremental builds (#34288) 2019-12-12 13:11:45 -08:00
incremental_spec.ts perf(ivy): reuse prior analysis work during incremental builds (#34288) 2019-12-12 13:11:45 -08:00
modulewithproviders_spec.ts refactor(ivy): include generic type for `ModuleWithProviders` in .d.ts files (#34235) 2019-12-10 16:34:47 -08:00
monorepo_spec.ts fix(ivy): emit fs-relative paths when rootDir(s) aren't in effect (#33828) 2019-11-19 12:41:24 -08:00
ngtsc_spec.ts refactor(compiler): i18n - render legacy i18n message ids (#34135) 2019-12-03 10:15:53 -08:00
scope_spec.ts fix(ivy): don't produce template diagnostics when scope is invalid (#34460) 2019-12-18 15:04:49 -08:00
sourcemap_utils.ts refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
template_mapping_spec.ts perf(ivy): move attributes array into component def (#32798) 2019-10-09 13:16:55 -07:00
template_typecheck_spec.ts fix(ivy): generate a better error for template var writes (#34339) 2019-12-12 13:13:32 -08:00