-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Update Inversify to latest #14435
Update Inversify to latest #14435
Conversation
270eb10
to
0fd9f9d
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.
I was able to build and start the browser application and did not encounter any error just by clicking a bit around and trying some features.
I then checked with the regex @injectable(.|\n)*?constructor
to find all places where an @unmanaged
might be needed.
I found the following @injectable
classes which either have constructor parameters which are neither injected nor are declared unmanaged or execute a super
call to a parent class without such declarations for their parameters.
@sdirix Thanks for looking into this! I've added the decorations for the listed classes :) |
d21a7ce
to
f21e842
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.
Works for me! Thanks for the work!
What's keeping this PR from being merged? |
What it does
Closes #14431.
The latest minor version of Inversify (6.1.0) introduced some behavior changes with regards to injected base classes. Inversify validates that the constructor arguments are in some way satisfied (by asserting constructor function length). Since we sometimes use an inheritance pattern that breaks this assertion, this leads to runtime failures in newer versions of Inversify.
This change adds
@unmanaged()
decorations to all constructors that aren't injected. Also adds a few more type constraints during compile time where Inversify got more strict in its typing.How to test
Assert that the CI is green, and the application builds and runs without any start error.
Follow-ups
I couldn't really find all places where we're using the above mentioned pattern, as I couldn't find a way to easily search for it.
Review checklist
Reminder for reviewers