Alejandro Serrano.Mena
11/13/2024, 3:23 PMYoussef Shoaib [MOD]
11/14/2024, 8:35 PMaccumulating
dsl, trying to clean things up and perhaps do a bit more reunification.
Is there a reason why Value
isn't a value class
that uses EmptyValue
or something under the hood? I'm guessing it's for simplicity or to prevent ABI explosion, is that right?Youssef Shoaib [MOD]
11/14/2024, 9:18 PMCould not determine the dependencies of task ':arrow-annotations:check'.
> Could not create task ':arrow-annotations:animalsnifferMain'.
> Could not create task of type 'AnimalSniffer'.
> Could not generate a decorated class for type AnimalSniffer.
> org/gradle/api/reporting/internal/TaskReportContainer
This seems to only happen with Gradle 8.11 which was committed yesterday. Not sure why this issue isn't happening in the repo though. This also happens when I try to do ./gradlew build
in the terminal.
Can anyone confirm that this happens for them too?
Edit: it seems that building triggers animalSniffer, and it seems that it highlights a bunch of errors?? Is animal sniffer just not used anymore? Is running build
common practice?Youssef Shoaib [MOD]
11/15/2024, 1:31 PMeither {
accumulate {
ensureOrAccumulate(false) { "hello" }
this@either.raise("hi".nel())
}
}
This results in nonEmptyListOf("hi").left()
, but I can see an argument for it being nonEmptyListOf("hi").left()
. It gets even more strange with early returns:
either {
accumulate {
ensureOrAccumulate(false) { "hello" }
return@either 42
}
}
Results in Right(42)
, but the very similar:
either {
accumulate {
ensureOrAccumulate(false) { "hello" }
42
}
}
results in nonEmptyListOf("hello").left()
Is this expected? Should the accumulated errors be raised instead?Youssef Shoaib [MOD]
11/19/2024, 9:37 PMaccumulate {
val x by accumulating { ... }
val y by accumulating { x }
}
Right now, if x fails, the second accumulating
will fail too. I understand why this happens obv, but might we want something that makes y
an Error
if x
fails? Is that even a useful idea? Are there any pitfalls I've missed?phldavies
11/26/2024, 3:25 PMResourceScope
from arrow.fx.coroutines.continuations
to arrow.fx.coroutines
), SuspendApp-Ktor will need a release against 2.x. Is it even worthwhile to consider maintaining releases for both arrow1.x and 2.x simultaneously - especially given the potential option of maintaining both ktor2 and ktor3 variants.phldavies
12/05/2024, 5:54 PMAlejandro Serrano.Mena
12/08/2024, 5:14 PMCLOVIS
12/11/2024, 2:51 PMYoussef Shoaib [MOD]
12/17/2024, 5:09 PMdave08
12/18/2024, 11:45 AMdave08
12/18/2024, 11:51 AMdave08
12/23/2024, 10:58 AMpublic fun <T> MutableState<T>.updateCopy(block: Copy<T>.() -> Unit) {
update { it.copy(block) }
}
/**
* Updates the value in this [MutableStateFlow]
* by performing the operations in the [Copy] [block].
*/
public fun <T> MutableStateFlow<T>.updateCopy(block: Copy<T>.() -> Unit) {
update { it.copy(block) }
}
the update functions themselves are and would allow to call suspend funs from within them... so if these were too, we could use the current ui state to call the suspend fun and update it atomically...Youssef Shoaib [MOD]
12/30/2024, 9:08 PMAlejandro Serrano.Mena
02/07/2025, 7:50 AMCLOVIS
02/17/2025, 8:30 AMarrow.fx.coroutines.await.awaitAll
marked experimental but arrow.fx.coroutines.await.AwaitAllScope
isn't?CLOVIS
02/17/2025, 8:47 AMawaitAll
? I'm curious what's stopping itphldavies
02/18/2025, 7:53 PMputOrRaise
(and similar) helpers that take a payload parameter (implicitly receiving a la fun <reified B: Any> Route.put(String, (B) -> Unit): Route
I'm hitting an overload ambiguity between the following:
inline fun <reified B : Any, reified R> Route.putOrRaise(
path: String,
crossinline body: suspend RaiseRoutingContext.(B) -> R,
): Route
and
public inline fun <reified R> Route.putOrRaise(
path: String,
crossinline body: suspend RaiseRoutingContext.() -> R,
): Route
when attempting to use the non-receiving form, i.e. putOrRaise("/path") { "my result" }
.
You could disambiguate either with putOrRaise("/path") { -> "my result" }
or putOrRaise<_>("/path") { "my result" }
but neither are intuitive or ergonomic to write.
The only reasonable alternative I can think of is to rename the "receiving" helpers like putOrRaiseReceiving
or putReceivingOrRaise
or such, but again, not very ergonomic.
Any other thoughts or ideas? Do we even need/want to include a "receiving" form of these, given a consumer could just use put<B>("/path") { respondOrRaise { "my result " }
or putOrRaise("/path") { val it = receiveOrRaise<T>() }
as needed?raulraja
02/22/2025, 1:04 PMphldavies
02/26/2025, 1:47 PMarrow-kt/suspendapp
or arrow-kt/arrow
given it's a fairly important fix
i.e. would a 0.5.1
release be worth cutting from arrow-kt/suspendapp
how is versioning of suspendapp going to follow from the merge into arrow-kt/arrow
?phldavies
03/03/2025, 10:33 AMYoussef Shoaib [MOD]
03/14/2025, 9:02 AM@BuilderInference
is useless nowadays, although for some reason it hasn't been deprecated yet? Should we remove it to clean up the codebase a bit?Youssef Shoaib [MOD]
03/14/2025, 9:11 AMcombine
function in Arrow, do we assume that such functions are associative?phldavies
03/21/2025, 9:07 AMsimon.vergauwen
03/27/2025, 9:51 AMsimon.vergauwen
03/27/2025, 4:23 PMAlejandro Serrano.Mena
04/20/2025, 4:16 PMphldavies
04/22/2025, 11:46 AMList<A>.asNonEmptyListUnsafe()
that avoids copying and simply wraps the list (potentially with a require(isNotEmpty())
check? (same for NonEmptySet) - currently the suggested replacement for the old Nel.fromListUnsafe
is list.toNonEmptyListOrNull() ?: error(...)
however this currently iterates the list twice (effectively doing iterator().let { listOf(it.next()) + Iterable { it }.toList() }
)Alejandro Serrano.Mena
04/24/2025, 8:57 AMList
(instead of copying it). Any feedback is welcome -> https://github.com/arrow-kt/arrow/pull/3611phldavies
04/29/2025, 3:54 PM