angular-cn/packages/compiler-cli/test
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
..
compliance fix(core): remove side effects from `ɵɵNgOnChangesFeature()` (#35769) 2020-03-03 08:50:03 -08:00
diagnostics build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
helpers fix(ivy): handle namespaced imports correctly (#31367) 2019-07-09 09:40:30 -07:00
metadata build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
ngtsc fix(compiler): process `imports` first and `declarations` second while calculating scopes (#35850) 2020-03-10 14:16:59 -04:00
transformers build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
BUILD.bazel build: derive ts_library dep from jasmine_node_test boostrap label if it ends in `_es5` (#34736) 2020-01-15 14:58:07 -05:00
extract_i18n_spec.ts feat: make the Ivy compiler the default for ngc (#32219) 2019-08-20 16:41:08 -07:00
mocks.ts fix(compiler-cli): Use typescript to resolve modules for metadata (#22856) 2018-07-10 11:11:48 -07:00
ngc_spec.ts fix(compiler): switch to modern diagnostic formatting (#34234) 2019-12-09 11:37:49 -08:00
perform_compile_spec.ts fix(compiler): return enableIvy true when using `readConfiguration` (#32234) 2019-08-21 10:06:25 -07:00
perform_watch_spec.ts fix(ivy): recompile on template change in ngc watch mode on Windows (#34015) 2020-02-04 10:40:22 -08:00
test_support.ts fix(compiler): switch to modern diagnostic formatting (#34234) 2019-12-09 11:37:49 -08:00
typescript_support_spec.ts feat(ivy): verify whether TypeScript version is supported (#33377) 2019-10-24 15:46:23 -07:00