angular/packages/core/test/acceptance
Kristiyan Kostadinov 4ef11c987d fix(core): resolve forward-referenced host directives during directive matching (#58492)
When the compiler generates the `HostDirectivesFeature`, it generates either an eager call (`ɵɵHostDirectivesFeature([])`) or a lazy call (`ɵɵHostDirectivesFeature(() => [])`. The lazy call is necessary when there are forward references within the `hostDirectives` array. Currently we resolve the lazy variant when the component definition is created which has been enough for most cases, however if the host is injected by one of its host directives, we can run into a reference error because DI is synchronous and the host's class hasn't been defined yet.

These changes resolve the issue by pushing the lazy resolution later during directive matching when all classes are guanrateed to exist.

Fixes #58485.

PR Close #58492
2024-11-04 16:17:23 +01:00
..
authoring feat(core): introduce debugName optional arg to framework signal functions (#57073) 2024-10-22 11:26:37 -07:00
after_render_effect_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
after_render_hook_spec.ts refactor(core): introduce ngServerMode as global (#58386) 2024-10-30 10:13:28 -07:00
attributes_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
bootstrap_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
BUILD.bazel build: replace base64-js package with Node.js Buffer usage (#53464) 2023-12-11 14:04:06 -08:00
change_detection_signals_in_zones_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
change_detection_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
change_detection_transplanted_view_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
common_integration_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
component_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
content_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
control_flow_for_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
control_flow_if_spec.ts feat(compiler): add support for the typeof keyword in template expressions. (#58183) 2024-10-16 07:31:00 +00:00
control_flow_switch_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
copy_definition_feature_spec.ts refactor(core): Don't generate standalone: true for definitions (#58238) 2024-10-24 12:44:12 -07:00
csp_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
defer_spec.ts refactor(core): remove the standalone feature (#58288) 2024-10-24 16:19:02 -07:00
destroy_ref_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
di_forward_ref_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
di_spec.ts build: remove usages of useDefineForClassFields: false (#58297) 2024-10-28 12:26:05 -07:00
directive_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
discover_utils_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
embedded_views_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
env_injector_standalone_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
environment_injector_spec.ts feat(core): add syntactic sugar for initializers (#53152) 2024-10-22 09:38:18 -07:00
exports_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
hmr_spec.ts fix(compiler): avoid having to duplicate core environment (#58444) 2024-11-01 14:32:57 +00:00
host_binding_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
host_directives_spec.ts fix(core): resolve forward-referenced host directives during directive matching (#58492) 2024-11-04 16:17:23 +01:00
i18n_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
inherit_definition_feature_spec.ts refactor(core): remove the standalone feature (#58288) 2024-10-24 16:19:02 -07:00
injector_profiler_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
integration_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
internal_spec.ts refactor(core): add internal utility to resolve the component name of a node (#58148) 2024-10-11 07:04:40 +00:00
let_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
lifecycle_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
listener_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
local_compilation_spec.ts refactor(core): remove the standalone feature (#58288) 2024-10-24 16:19:02 -07:00
ng_module_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
ngmodule_scope_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
outputs_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
pending_tasks_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
pipe_spec.ts refactor(compiler): update compliance tests. (#58238) 2024-10-24 12:44:12 -07:00
profiler_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
property_binding_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
property_interpolation_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
providers_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
pure_function_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
query_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
renderer_factory_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
router_integration_spec.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
security_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
standalone_injector_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
standalone_spec.ts refactor(core): Don't generate standalone: true for definitions (#58238) 2024-10-24 12:44:12 -07:00
styling_spec.ts build: remove usages of useDefineForClassFields: false (#58297) 2024-10-28 12:26:05 -07:00
template_ref_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
text_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
view_container_ref_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
view_insertion_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00
view_ref_spec.ts refactor(core): Migrate all packages with the explicit-standalone-flag schematic. (#58160) 2024-10-14 14:58:57 +00:00