-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): take @host into account while processing
useFactory
argu…
…ments (#40122) (#40313) DI providers can be defined via `useFactory` function, which may have arguments configured via `deps` array. The `deps` array may contain DI flags represented by DI decorators (such as `@Self`, `@SkipSelf`, etc). Prior to this commit, having the `@Host` decorator in `deps` array resulted in runtime error in Ivy. The problem was that the `@Host` decorator was not taken into account while `useFactory` argument list was constructed, the `@Host` decorator was treated as a token that should be looked up. This commit updates the logic which prepares `useFactory` arguments to recognize the `@Host` decorator. PR Close #40122 PR Close #40313
- Loading branch information
1 parent
ec5b09b
commit 45838c0
Showing
5 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,6 +236,9 @@ | |
{ | ||
"name": "FormsModule" | ||
}, | ||
{ | ||
"name": "Host" | ||
}, | ||
{ | ||
"name": "INJECTOR" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
{ | ||
"name": "EMPTY_ARRAY" | ||
}, | ||
{ | ||
"name": "Host" | ||
}, | ||
{ | ||
"name": "INJECTOR" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -290,6 +290,9 @@ | |
{ | ||
"name": "HashLocationStrategy" | ||
}, | ||
{ | ||
"name": "Host" | ||
}, | ||
{ | ||
"name": "INITIAL_VALUE" | ||
}, | ||
|