kotlinx.coroutines icon indicating copy to clipboard operation
kotlinx.coroutines copied to clipboard

Why is transformLatest still experimental?

Open LouisCAD opened this issue 3 years ago • 9 comments

Hello,

I use the transformLatest function a lot in my business logic, and I'm wondering why it's still marked as an experimental API while the other xxxLatest operators are not.

All the best, Louis CAD

LouisCAD avatar Feb 01 '22 04:02 LouisCAD

Hi, thanks for the reminder.

Nothing conceptually prevents it, we just haven't bothered by looking into it deeply after the initial release -- API seemed to be well-received and no corner cases were found.

collectLatest is already stable and relies on mapLatest, so I'll take a look at it one more time prior to 1.7.0 release and likely promote it to stable.

Reminder to self: re-visit #3109 prior to stabilization

qwwdfsad avatar Feb 01 '22 12:02 qwwdfsad

Hi, thanks for the reminder.

Nothing conceptually prevents it, we just haven't bothered by looking into it deeply after the initial release -- API seemed to be well-received and no corner cases were found.

collectLatest is already stable and relies on mapLatest, so I'll take a look at it one more time prior to 1.7.0 release and likely promote it to stable.

Reminder to self: re-visit #3109 prior to stabilization

https://github.com/Kotlin/kotlinx.coroutines/issues/3162 - is this not an issue @qwwdfsad , I'm extremely sorry if I have raised an incorrect issue, I'm new to kotlin coroutines, I'm exploring it to use it in my project.

can someone please reply to that issue, and explain what is happening?

Manideepkota0708 avatar Feb 02 '22 15:02 Manideepkota0708

@Manideepkota0708 I don't think this is on topic in this issue 🤔

LouisCAD avatar Feb 11 '22 10:02 LouisCAD

@qwwdfsad For this issue we're in, I think it also applies to flatMapLatest, unless there are some reasons for it to stay experimental while transformLatest wouldn't?

LouisCAD avatar Feb 11 '22 10:02 LouisCAD

@Manideepkota0708 I don't think this is on topic in this issue 🤔 i'm sorry, could some one reply in this thread then? if it's not at all an issue could someone close it, thereby it helps me to dig further inside coroutines methods, and put some more time in learning them if it's an issue? then someone at least confirm that it was an issue.

I'm happy that at least you had replied tagging me in this issue @LouisCAD

https://github.com/Kotlin/kotlinx.coroutines/issues/3162

Manideepkota0708 avatar Feb 12 '22 19:02 Manideepkota0708

1.7.0 has launched but they are all still marked as Experimental. Any updates on this?

racka98 avatar Jul 05 '22 21:07 racka98

1.7.0 has launched but they are all still marked as Experimental. Any updates on this?

1.7.0 of kotlin was released. The coroutines library is still on 1.6.0.

remcomokveld avatar Jul 06 '22 15:07 remcomokveld

Hey folks! I know you are busy with lot of stuff, but it would be nice to have a new coroutines release with some experimental annotation removed :-) like this one

the 1.6.4 was released this summer

1.6.5 perhaps?

danielesegato avatar Sep 15 '22 10:09 danielesegato

We tend to avoid changing API stability guarantees in patch releases, esp. if it is a popular API. We'll likely do it in 1.7.0 as we still have to put some effort into it and ensure that everything behaves the way we intend it to (see comments above with potential concerns)

qwwdfsad avatar Sep 15 '22 13:09 qwwdfsad

Still marked experimental in 1.7.1 :(

djcsdy avatar May 18 '23 14:05 djcsdy

Still marked experimental in 1.7.1 :(

Experimental only means that the API might change, it doesn't mean it is unsafe.

It probably just means they aren't yet sure on the name of the function.

danielesegato avatar Jun 10 '23 18:06 danielesegato

The problem is not the name but the semantics -- it's unclear whether the underlying coroutine should be launched in an undispatched manner or not.

While sounding like an implementation detail, it, in fact, leaks to users' code -- #3109, and we have conflicting requirements for this behaviour -- #3681 (#3109 in disguise) and #3679

qwwdfsad avatar Jun 12 '23 09:06 qwwdfsad

Maybe CoroutineDispatcher should expose whether it's single threaded or not? I've bumped into other use cases where I wanted to know about that.

LouisCAD avatar Jun 13 '23 07:06 LouisCAD