Skip to content
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

Remove Synthesize Deprecated #8631

Closed
Tracked by #7613
anthony-murphy opened this issue Dec 30, 2021 · 0 comments · Fixed by #8858
Closed
Tracked by #7613

Remove Synthesize Deprecated #8631

anthony-murphy opened this issue Dec 30, 2021 · 0 comments · Fixed by #8858
Assignees
Milestone

Comments

@anthony-murphy
Copy link
Contributor

Once we remove deprecated on IFluidDependecySynthsize, and DependencyContainer we should do the following:

yeah. there is another set of changes coming. once i no longer expose providers directly i can just create the PropertyDescriptions upfront on register, and then all this code will be way simpler. I do those change with what you suggest in the next release

Originally posted by @anthony-murphy in #8593 (comment)

@ghost ghost added the triage label Dec 30, 2021
@anthony-murphy anthony-murphy self-assigned this Dec 30, 2021
@anthony-murphy anthony-murphy added this to the January 2022 milestone Dec 30, 2021
@ghost ghost removed the triage label Dec 30, 2021
anthony-murphy added a commit that referenced this issue Jan 26, 2022
DependencyContainer now takes a generic argument, as it is no longer directly couple to IFluidObject. The ideal pattern here would be directly pass the provider or FluidObject interfaces you will register. As a short term solution you could also pass IFluidObject, but IFluidObject is deprecated, so will need to be removed if used here.
Examples:

    // the old way
    const dc = new DependencyContainer();
    dc.register(IFluidHTMLView, MockLoadable());
    // FluidObject option
    const dc = new DependencyContainer<FluidObject<IFluidHTMLView>>();
    dc.register(IFluidHTMLView, MockLoadable());
    // Provider option
    const dc = new DependencyContainer<IProvideFluidHTMLView>();
    dc.register(IFluidHTMLView, MockLoadable());
    // Short term IFluidObject option
    const dc = new DependencyContainer<IFluidObject>();
    dc.register(IFluidHTMLView, MockLoadable());
The following members have been removed from IFluidDependencySynthesizer:

registeredTypes - unused and no longer supported. has can replace most possible usages
register - create new DependencyContainer and add existing as parent
unregister - create new DependencyContainer and add existing as parent
getProvider - use has and synthesize to check or get provider respectively
The following types have been removed or changed. These changes should only affect direct usages which should be rare. Existing synthesizer api usage is backwards compatible:

FluidObjectKey - removed as IFluidObject is deprecated
NonNullableFluidObject - removed as IFluidObject is deprecated. use typescripts NonNullable instead
AsyncRequiredFluidObjectProvider - Takes FluidObject types rather than keys
AsyncOptionalFluidObjectProvider - Takes FluidObject types rather than keys
AsyncFluidObjectProvider - Takes FluidObject types rather than keys
FluidObjectProvider - Takes FluidObject types rather than keys
ProviderEntry - no longer used
DependencyContainerRegistry - no longer used
fixes #8631
related #8074 #8852
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant