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

fix ambiguous use of init #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix ambiguous use of init #173

wants to merge 1 commit into from

Conversation

tib
Copy link
Contributor

@tib tib commented Feb 11, 2024

The following code snippet emits an 'Ambigous use of init' error when using Swift Service Lifecycle v2.3.0:

let config = ServiceGroupConfiguration(
    services: [],
    logger: logger
)

This problem can be hotfixed like this, but it's not the right way:

let services: [ServiceGroupConfiguration.ServiceConfiguration] = []
let config = ServiceGroupConfiguration(
    services: services,
    logger: logger
)

This PR aims to fix the underlying issue in the library itself by removing the unnecessary init method, that caused the compiler error.

@FranzBusch
Copy link
Contributor

Ah that's an unfortunate unambiguity but the proposed change here would be breaking API. In hindsight we should have made the parameter serviceConfigurations and services for the other one. What we could do is a deprecation dance but I am unsure if that's worth it. How many people are actually passing an empty array to a ServiceGroup?

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