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
effect
and computed
throws circular dependency when ErrorHandler
creates effect
computed
during construction (or one of its dependencies does)
#52680
Comments
Can you provide a reproduction? The Edit: Here's a reproduction. Can you confirm that this is similar to your application? |
Sorry! Its a huge project. Thats just part of code I shared. They are just root injected services. But these services call by custom error handler. |
effect
throws circular dependency when ErrorHandler
creates effect
during construction (or one of its dependencies does)
Ok. I figure out that. Same error. https://stackblitz.com/edit/stackblitz-starters-ppn9ig?file=src%2Fmain.ts |
effect
throws circular dependency when ErrorHandler
creates effect
during construction (or one of its dependencies does)effect
and computed
throws circular dependency when ErrorHandler
creates effect
computed
during construction (or one of its dependencies does)
Still not working with last version. Is there any news? |
We can mitigate this situation by getting the |
`effect` was expecting an `ErrorHandler` in its constructor which can lead to a circular DI error if an effect is used inside a custom `ErrorHandler`. These changes inject the `ErrorHandler` only when reporting errors. Fixes angular#52680.
`effect` was expecting an `ErrorHandler` in its constructor which can lead to a circular DI error if an effect is used inside a custom `ErrorHandler`. These changes inject the `ErrorHandler` only when reporting errors. Fixes angular#52680.
Fixed. Thanks guys |
However, if you use ErrorHandler, there is a problem with this too. A simple data type, string, boolean etc. If I use them, it works, but when I change the data type with a complex interface like in this example, effect doesn't work. It works properly if you remove ErrorHandler. Please check this example https://stackblitz.com/edit/stackblitz-starters-2fvmzs?file=src%2Fmain.ts |
@blueiceprj I don't understand what your demo is trying to show or what you're saying isn't working. Can you explain this more? |
Ah, I see - I was expecting this to be related to the |
Ok. I see. Thanks. |
) `effect` was expecting an `ErrorHandler` in its constructor which can lead to a circular DI error if an effect is used inside a custom `ErrorHandler`. These changes inject the `ErrorHandler` only when reporting errors. Fixes angular#52680. PR Close angular#53713
) `effect` was expecting an `ErrorHandler` in its constructor which can lead to a circular DI error if an effect is used inside a custom `ErrorHandler`. These changes inject the `ErrorHandler` only when reporting errors. Fixes angular#52680. PR Close angular#53713
) `effect` was expecting an `ErrorHandler` in its constructor which can lead to a circular DI error if an effect is used inside a custom `ErrorHandler`. These changes inject the `ErrorHandler` only when reporting errors. Fixes angular#52680. PR Close angular#53713
) `effect` was expecting an `ErrorHandler` in its constructor which can lead to a circular DI error if an effect is used inside a custom `ErrorHandler`. These changes inject the `ErrorHandler` only when reporting errors. Fixes angular#52680. PR Close angular#53713
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. |
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
After upgrade to 17 signal objects not working properly
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: