angular/packages/core/test/render3
Payam Valadkhan c6b9a3ea6c refactor(core): forbid rendering orphan components in local compilation mode (#51726)
Certain code patterns and tools in Google (and possibly 3P world) lead to the situation that a component is bootstrapped/rendered without its ng-module being loaded in the browser. Technically speaking this should be an anti-pattern since the ng-module could contain some runtime logic (e.g., providing something, calling some services, etc) and its not being loaded leads to unexpected behaviour. However, in many cases ng-module is an empty class and its only usage is for providing scope, and since in AoT full compilation mode we already hard-code dependencies into components so we can get away with not loading the ng-module. But in AoT local compilation mode it is not possible to get away since the component's dependencies are computed in runtime and the presence of the corresponding ng-module in the browser is needed. For this reason in this change it is forbidden to attempt to render a component without first loading its ng-module in local compilation mode and an explicit error message is created to make this situation clear. This error message can help with catching such cases when running TGP in Google.

It would be an interesting question as to whether to ban this situation in full compilation mode as well, as it is error prone and these errors are sometimes very hard to debug.

PR Close #51726
2023-09-15 10:45:38 +02:00
..
i18n refactor(core): remove debug data structures (#48281) 2022-11-30 09:27:59 -08:00
instructions refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
interfaces ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
ivy refactor(core): remove unnecessary reflect-metadata import. (#49673) 2023-04-03 19:17:02 -07:00
jit build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
styling_next refactor(core): Ensure that previousOrParentTNode always belongs to current TView. (#38707) 2020-09-28 16:15:58 -04:00
util test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
BUILD.bazel refactor(core): Synchronously emit the current signal value in toObservable (#49894) 2023-04-25 09:27:38 -07:00
change_detection_spec.ts refactor(core): drop unused fields from the RootContext (#46806) 2022-08-05 09:58:06 -07:00
component_ref_spec.ts fix(core): expose input transform function on ComponentFactory and ComponentMirror (#50713) 2023-06-22 09:47:15 -07:00
deps_tracker_spec.ts refactor(core): forbid rendering orphan components in local compilation mode (#51726) 2023-09-15 10:45:38 +02:00
di_spec.ts refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
es2015-tsconfig.json fix(core): destroy hooks not set up for useClass provider using forwardRef (#44281) 2021-11-30 11:56:05 -05:00
global_utils_spec.ts feat(core): introduce getDirectiveMetadata global debugging utility (#41525) 2021-04-13 16:06:32 -07:00
i18n_debug_spec.ts build: bundle spec files for saucelabs legacy job (#44281) 2021-11-30 11:56:04 -05:00
imported_renderer2.ts refactor(core): Remove dead unit test code (#51223) 2023-08-01 12:10:57 -07:00
instructions_spec.ts refactor(core): handle #24571 todos. (#49221) 2023-06-14 12:33:44 +02:00
integration_spec.ts feat(core): support TypeScript 4.8 (#47038) 2022-08-16 16:02:47 +00:00
is_shape_of.ts refactor(core): Better use of Object.keys() (#51153) 2023-07-25 09:17:46 -07:00
is_shape_of_spec.ts ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
jit_environment_spec.ts refactor(compiler): apply component metadata asynchronously when defer blocks are present (#51182) 2023-08-15 11:32:09 -07:00
load_domino.ts fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
matchers.ts refactor(core): Better use of Object.keys() (#51153) 2023-07-25 09:17:46 -07:00
matchers_spec.ts refactor(core): serialize info about templates used to create embedded views (#49382) 2023-03-14 14:22:08 -07:00
metadata_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
node_selector_matcher_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
providers_helper.ts test(core): convert providers test utility to TestBed (#46527) 2022-06-27 15:15:00 -07:00
providers_spec.ts test(core): use TestBed & JIT instead of handwritten defs in providers_spec (#46527) 2022-06-27 15:15:00 -07:00
query_spec.ts test(core): refactor tests to use TestBed instead of hand-written instructions (#46561) 2022-06-28 21:28:21 -07:00
reactivity_spec.ts build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
testing_spec.ts test: update tests to account for karma-jasmine v5.0.0 2022-07-18 19:19:00 +02:00
utils.ts build: update to jasmine 4.0 (#45558) 2022-04-11 16:25:28 +00:00
view_fixture.ts refactor(core): decouple effects from change detection (#51049) 2023-09-12 08:12:56 -07:00
view_utils_spec.ts fix(core): Store ICU state in LView rather than in TView (#39233) 2020-10-21 18:33:00 -07:00