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

Enchance property wrapper resolution #4

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

rafcabezas
Copy link
Collaborator

@rafcabezas rafcabezas commented Mar 7, 2024

This PR improves property-wrapper resolution by making sure it always happens at the point of use of the dependency. This solves bugs where, if the a new dependency is registered, the old one would potentially still be referenced by the code.

Also, since resolution won't happen on property wrapper instantiation, then the dependency type will need to be specified at this time, changing the syntax from:

@Resolve var dependency: Dependency

to

@Resolve(Dependency.self) var dependency

@rafcabezas rafcabezas requested a review from moyerr March 7, 2024 14:08
@rafcabezas rafcabezas force-pushed the feature/enhance-property-wrapper-resolution branch from 22fda5d to dea0d2c Compare March 8, 2024 16:29
@vcsoares
Copy link
Collaborator

LGTM

@rafcabezas rafcabezas merged commit f64bc47 into main Mar 22, 2024
@rafcabezas rafcabezas deleted the feature/enhance-property-wrapper-resolution branch March 22, 2024 18:52
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 this pull request may close these issues.

2 participants