angular-cn/packages/compiler-cli/test/ngtsc
Andrew Kushnir 0bf6e58db2 fix(compiler): process `imports` first and `declarations` second while calculating scopes (#35850)
Prior to this commit, while calculating the scope for a module, Ivy compiler processed `declarations` field first and `imports` after that. That results in a couple issues:

* for Pipes with the same `name` and present in `declarations` and in an imported module, Pipe from imported module was selected. In View Engine the logic is opposite: Pipes from `declarations` field receive higher priority.
* for Directives with the same selector and present in `declarations` and in an imported module, we first invoked the logic of a Directive from `declarations` field and after that - imported Directive logic. In View Engine, it was the opposite and the logic of a Directive from the `declarations` field was invoked last.

In order to align Ivy and View Engine behavior, this commit updates the logic in which we populate module scope: we first process all imports and after that handle `declarations` field. As a result, in Ivy both use-cases listed above work similar to View Engine.

Resolves #35502.

PR Close #35850
2020-03-10 14:16:59 -04:00
..
fake_core fix(ivy): support dynamic query tokens in AOT mode (#35307) 2020-02-27 16:05:21 -08:00
BUILD.bazel test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34736) 2020-01-15 14:58:07 -05: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 fix(ivy): disable use of aliasing in template type-checking (#34649) 2020-01-23 10:31:48 -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 fix(ivy): correctly emit component when it's removed from its module (#34912) 2020-01-23 13:30:10 -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 fix(compiler): process `imports` first and `declarations` second while calculating scopes (#35850) 2020-03-10 14:16:59 -04: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(compiler): type-checking error for duplicate variables in templates (#35674) 2020-03-03 13:52:50 -08:00