-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Gradually introduce SubclassOptInRequired into our codebase #3770
Labels
Comments
Yep, even a naive search yields a couple of places: https://grep.app/search?q=by%20channel&filter[lang][0]=Kotlin |
dkhalanskyjb
added a commit
that referenced
this issue
Apr 23, 2024
The initial stage of #3770 Marked: * Job, * Deferred and CompletableDeferred, * Flow, SharedFlow, StateFlow, * CloseableCoroutineDispatcher, * CancellableContinuation, * All of their `public` implementors.
dkhalanskyjb
added a commit
that referenced
this issue
Apr 23, 2024
The initial stage of #3770 Marked: * Job, * Deferred and CompletableDeferred, * Flow, SharedFlow, StateFlow, * CloseableCoroutineDispatcher, * CancellableContinuation, * All of their `public` implementors.
dkhalanskyjb
added a commit
that referenced
this issue
Apr 23, 2024
The initial stage of #3770 Marked: * Job, * Deferred and CompletableDeferred, * Flow, SharedFlow, StateFlow, * CloseableCoroutineDispatcher, * CancellableContinuation, * All of their `public` implementors.
dkhalanskyjb
added a commit
that referenced
this issue
May 16, 2024
The initial stage of #3770 Marked: * Job, * Deferred and CompletableDeferred, * Flow, SharedFlow, StateFlow, * CloseableCoroutineDispatcher, * CancellableContinuation, * All of their `public` implementors.
dkhalanskyjb
added a commit
that referenced
this issue
May 22, 2024
The initial stage of #3770 Marked: * Job, * Deferred and CompletableDeferred, * Flow, SharedFlow, StateFlow, * CloseableCoroutineDispatcher, * CancellableContinuation, * All of their `public` implementors.
dkhalanskyjb
added a commit
that referenced
this issue
May 27, 2024
The initial stage of #3770 Marked: * Job, * Deferred and CompletableDeferred, * Flow, SharedFlow, StateFlow, * CloseableCoroutineDispatcher, * CancellableContinuation, * All of their `public` implementors.
dkhalanskyjb
added a commit
that referenced
this issue
May 28, 2024
The initial stage of #3770 Marked: * Job, * Deferred and CompletableDeferred, * SharedFlow, StateFlow, * CancellableContinuation, * All of their `public` implementors.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-subclass-opt-in-required/
Historically, we have multiple interfaces that are not designed for external implementation, , but are not
sealed
for various reasons (including historical ones):Job
should not be extended externallyDeferred
andCompletableDeferred
should not be extended externallyChannel
probably should not be extended externallyFlow
,SharedFlow
, andStateFlow
are unstable/experimental for inheritanceCloseableCoroutineDispatcher
is unstable for inheritanceCancellableContinuation
is an interface not ready to be extendedIt would be nice to adopt the
SubclassOptInRequired
(available from 1.9.0) in the library to provide explicit programmatic warnings/errors and to prevent issues like #3729For "prohibited to implement" interfaces we can introduce the new annotation with a warning (or maybe even an error) and, in the next major release, make the annotation
internal
itself, so it would be much harder to opt-inThe text was updated successfully, but these errors were encountered: