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

chore(service): remove parametrized service constructor #931

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

jvallesm
Copy link
Collaborator

Because

  • Using parameter structs for injecting dependencies is dangerous, especially when constructors are consumed by other packages / repos. Explicit parameters produce compilation errors when new dependencies are added and the client package doesn't update the constructor method call.

This commit

  • Transforms service.NewService to a constructor method with one argument per dependency.

@jvallesm jvallesm requested a review from donch1989 as a code owner December 11, 2024 10:22
@jvallesm jvallesm self-assigned this Dec 11, 2024
@jvallesm jvallesm merged commit ab29d4d into main Dec 11, 2024
12 checks passed
@jvallesm jvallesm deleted the jvalles/chore-explicit-service-constructor branch December 11, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants