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

Added @_disfavoredOverload for deprecated methods #143

Merged
merged 2 commits into from
May 22, 2024

Conversation

jkrukowski
Copy link
Contributor

Right now WhisperKit contains methods with the same arguments but different return type, e.g.

func transcribe(audioPath:decodeOptions:callback:) async throws -> TranscriptionResult?

and

func transcribe(audioPath:decodeOptions:callback:) async throws -> [TranscriptionResult]

This results in the issue described here #142 where compiler gives an error Ambiguous use of 'transcribe(audioPath:decodeOptions:callback:)

This PR resolves that by adding @_disfavoredOverload to deprecated methods

@ZachNagengast ZachNagengast self-requested a review May 22, 2024 16:36
Copy link
Contributor

@ZachNagengast ZachNagengast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent use case for this, should address #142

@ZachNagengast ZachNagengast merged commit d180062 into argmaxinc:main May 22, 2024
15 checks passed
@jkrukowski jkrukowski deleted the add-disfavored-overload branch May 22, 2024 20:21
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