-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ivy): throw a better error when DI can't inject a ctor param #33739
Conversation
3c6c287
to
6196365
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! Some nits
.toThrowError( | ||
/constructor is not compatible with Angular Dependency Injection because its dependency for its parameter 2 is invalid/); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test for the missing directive decorator case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
6196365
to
d7f2cda
Compare
d7f2cda
to
2f8a0ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
merge-assistance: global approval |
Needs rebase and fails g3
|
Occasionally a factory function needs to be generated for an "invalid" constructor (one with parameters types which aren't injectable). Typically this happens in JIT mode where understanding of parameters cannot be done in the same "up-front" way that the AOT compiler can. This commit changes the JIT compiler to generate a new `invalidFactoryDep` call for each invalid parameter. This instruction will error at runtime if called, indicating both the index of the invalid parameter as well as (via the stack trace) the factory function which was generated for the type being constructed. Fixes angular#33637
2f8a0ec
to
e09bc43
Compare
…ular#33739) Occasionally a factory function needs to be generated for an "invalid" constructor (one with parameters types which aren't injectable). Typically this happens in JIT mode where understanding of parameters cannot be done in the same "up-front" way that the AOT compiler can. This commit changes the JIT compiler to generate a new `invalidFactoryDep` call for each invalid parameter. This instruction will error at runtime if called, indicating both the index of the invalid parameter as well as (via the stack trace) the factory function which was generated for the type being constructed. Fixes angular#33637 PR Close angular#33739
) (#34340) Occasionally a factory function needs to be generated for an "invalid" constructor (one with parameters types which aren't injectable). Typically this happens in JIT mode where understanding of parameters cannot be done in the same "up-front" way that the AOT compiler can. This commit changes the JIT compiler to generate a new `invalidFactoryDep` call for each invalid parameter. This instruction will error at runtime if called, indicating both the index of the invalid parameter as well as (via the stack trace) the factory function which was generated for the type being constructed. Fixes #33637 PR Close #33739 PR Close #34340
…ular#33739) Occasionally a factory function needs to be generated for an "invalid" constructor (one with parameters types which aren't injectable). Typically this happens in JIT mode where understanding of parameters cannot be done in the same "up-front" way that the AOT compiler can. This commit changes the JIT compiler to generate a new `invalidFactoryDep` call for each invalid parameter. This instruction will error at runtime if called, indicating both the index of the invalid parameter as well as (via the stack trace) the factory function which was generated for the type being constructed. Fixes angular#33637 PR Close angular#33739
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Occasionally a factory function needs to be generated for an "invalid"
constructor (one with parameters types which aren't injectable). Typically
this happens in JIT mode where understanding of parameters cannot be done in
the same "up-front" way that the AOT compiler can.
This commit changes the JIT compiler to generate a new
invalidFactoryDep
call for each invalid parameter. This instruction will error at runtime if
called, indicating both the index of the invalid parameter as well as (via
the stack trace) the factory function which was generated for the type being
constructed.