angular-docs-cn/packages/compiler-cli/test
Alex Rickabaugh 13a0d527f6 fix(ivy): correctly write cross-file references (#25080)
There is a bug in the existing handling for cross-file references.
Suppose there are two files, module.ts and component.ts.

component.ts declares two components, one of which uses the other.
In the Ivy model, this means the component will get a directives:
reference to the other in its defineComponent call.

That reference is generated by looking at the declared components
of the module (in module.ts). However, the way ngtsc tracks this
reference, it ends up comparing the identifier of the component
in module.ts with the component.ts file, detecting they're not in
the same file, and generating a relative import.

This commit changes ngtsc to track all identifiers of a reference,
including the one by which it is declared. This allows toExpression()
to correctly decide that a local reference is okay in component.ts.

PR Close #25080
2018-07-26 16:38:09 -07:00
..
compliance fix(ivy): update compiler with latest runtime for view queries (#25061) 2018-07-25 10:39:30 -07:00
diagnostics build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
metadata fix(compiler-cli): Use typescript to resolve modules for metadata (#22856) 2018-07-10 11:11:48 -07:00
ngtsc fix(ivy): correctly write cross-file references (#25080) 2018-07-26 16:38:09 -07:00
transformers build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
BUILD.bazel test: switch to ts_web_test_suite (#23859) 2018-05-15 11:40:56 -07:00
extract_i18n_spec.ts fix(compiler): i18n_extractor now outputs the correct source file name (#24885) 2018-07-16 16:09:01 -04: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 build: upgrade jasmine (and related typings) to latest version (#19904) 2018-07-06 13:48:02 -07:00
ngtools_api_spec.ts ci(compiler-cli): run compiler-cli tests in bazel (#22997) 2018-03-28 10:02:53 -07:00
perform_watch_spec.ts build: upgrade to TypeScript 2.6 (#21144) 2017-12-22 20:15:47 -08:00
test_support.ts ci(compiler-cli): run compiler-cli tests in bazel (#22997) 2018-03-28 10:02:53 -07:00