-
Notifications
You must be signed in to change notification settings - Fork 144
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
bug: Order annotation doesn't move dependent instances #454
Comments
Same problem. Did you find any solution? My code is heavily based on this structure |
I've made a workaround using It's not the best approach, but it work for us. |
same there, solution with scopes is the best
and the point, that I do not use IJohn john and IDoe doe fields in this singleton, but they init first. And i need such order of init |
@jamontes79, late reply, but nevertheless @Order(-1)
@singleton
class InitFeatureTogglesUseCase {
InitFeatureTogglesUseCase(
this._buildConfig,
this._hiddenSettingsRepository,
this._featureToggleRepository,
); allthough you wiil need to register objects you use in constructor before this. @Order(-2)
BuildConfig get config => <...>,
@Order(-2)
HiddenSettingsRepository get repo1 => <...>,
@Order(-2)
FeatureToggleRepository get repo2 => <...>, |
If I have the following code
The generated code is the following:
But the instances of
BuildConfig
,HiddenSettingsRepository
andFeatureToggleRepository
are not instantiated because they have no order.Any way of doing this without reordering manually all the instances?
Thanks in advance
The text was updated successfully, but these errors were encountered: