mitch
05/13/2022, 4:40 AMmitch
05/28/2022, 10:38 AMmitch
06/25/2022, 7:30 AMsimon.vergauwen
07/25/2022, 10:18 AMAlejandro Serrano Mena
07/29/2022, 9:36 AMYoussef Shoaib [MOD]
07/29/2022, 11:57 AMspotlessApply
, is there a different way to do code-formatting now?Youssef Shoaib [MOD]
07/30/2022, 1:39 AMvalue class Option
! Turns out while the compiler is very finicky and picky with its optimizations for value classes, it did still surprise me by being more optimized that expected. It's still missing tests, documentation, and benchmarks, which I will add in the next couple of days. The implementation does have some downsides though, so I wonder what the team thinks of it. Check it out here: https://github.com/arrow-kt/arrow/pull/2780Gopal S Akshintala
09/02/2022, 2:04 AMGiorgos Makris
09/02/2022, 1:12 PMDeprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
is there a suggested gradle version?Lukasz Kalnik
09/14/2022, 5:34 AMsimon.vergauwen
09/14/2022, 12:36 PMphldavies
09/16/2022, 11:32 AMResource<A>.allocated()
extension returns Pair<suspend () -> A, suspend(A, ExitCase) -> Unit>
rather than Pair<A, suspend (ExitCase) -> Unit>
. Much like in cats.effect.Resource
I would expect allocated
to actually allocate/acquire the resource (and provide the release).phldavies
09/16/2022, 3:04 PMCoroutineScope
to avoid any leaked resources if the finaliser isn’t called. I’m not sure if this is entirely safe wrt structured concurrency but it passes some rudimentary tests (and finalizer is called within the current context):
context(CoroutineScope)
suspend fun <A> Resource<A>.bind(): Pair<A, suspend () -> Unit> =
allocate().let { (acquired, release) ->
acquired to guaranteeCase(release)
}
fun CoroutineScope.guaranteeCase(finalizer: suspend (ExitCase) -> Unit): suspend () -> Unit {
val completion = CompletableDeferred<Unit>()
val finalize = async(NonCancellable) { guaranteeCase(completion::await, finalizer) }
val hookHandle = coroutineContext.job.invokeOnCompletion {
if (it != null) completion.completeExceptionally(it)
else completion.complete(Unit)
}
return {
hookHandle.dispose()
completion.complete(Unit)
finalize.await()
}
}
or alternatively without the CoroutineScope
receiver/context (but requiring a current Job
)
suspend fun <A> Resource<A>.bind(): Pair<A, suspend () -> Unit> =
allocate().let { (acquired, release) ->
acquired to guaranteeCase(release)
}
suspend fun guaranteeCase(finalizer: suspend (ExitCase) -> Unit): suspend () -> Unit {
val completion = CompletableDeferred<Unit>()
val finalize = async(NonCancellable) { guaranteeCase(completion::await, finalizer) }
val hookHandle = coroutineContext.job.invokeOnCompletion {
if (it != null) completion.completeExceptionally(it)
else completion.complete(Unit)
}
return {
hookHandle.dispose()
completion.complete(Unit)
finalize.await()
}
}
private suspend fun async(
context: CoroutineContext = EmptyCoroutineContext,
start: CoroutineStart = CoroutineStart.DEFAULT,
block: suspend CoroutineScope.() -> Unit
) = Job(coroutineContext.job).let { job ->
CoroutineScope(coroutineContext + job)
.async(context, start, block)
.also { job.complete() }
}
stojan
09/21/2022, 12:37 PMsimon.vergauwen
09/27/2022, 3:32 PMLukasz Kalnik
09/30/2022, 12:00 PMarrow-core-retrofit
tests to a more general one (because apparently the more specific type made the tests fail for some OS/JVM combinations when building locally).
It just needs one more approving review, it would be awesome if someone could take a look:
https://github.com/arrow-kt/arrow/pull/2822Giorgos Makris
10/06/2022, 5:29 PMflatMap
with a filter
, if that provides any benefits at all. I'd love to hear your thoughts
https://github.com/arrow-kt/arrow/pull/2818simon.vergauwen
11/16/2022, 8:32 AMmitch
11/24/2022, 9:18 PMAlejandro Serrano Mena
12/05/2022, 2:41 PMIterable<Either<E, A>>
https://github.com/arrow-kt/arrow/discussions/2861Alejandro Serrano Mena
12/22/2022, 10:25 AMjulian
12/22/2022, 4:01 PMjulian
01/20/2023, 8:28 PMarrow-fx-coroutines
.
But I always get Cannot find declaration to go to
when I try to navigate to a symbol's declaration in IntelliJ.
I'm wondering if I set up the project incorrectly.
I imported the build.gradle.kts
that's in the root directory arrow
into IntelliJ. Should I have done something different?
In IntelliJ, I'm also getting compiler errors in DeadlockTest.kt
, EitherJvmTest.kt
, EvalJvmTest.kt
, NonFatalJvmTest.kt
, and JvmGenerators.kt
.
These are the ones in DeadlockTest.kt
, for example:
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:16:15
Kotlin: Unresolved reference: Validated
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:18:15
Kotlin: Unresolved reference: Validated
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:30:15
Kotlin: Unresolved reference: Either
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:32:15
Kotlin: Unresolved reference: Either
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:44:15
Kotlin: Unresolved reference: None
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:46:15
Kotlin: Unresolved reference: Some
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:58:15
Kotlin: Unresolved reference: Ior
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:60:15
Kotlin: Unresolved reference: Ior
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:72:15
Kotlin: Unresolved reference: Eval
/Users/bayo/dev/arrow_fork_3/arrow-libs/core/arrow-core/src/jvmTest/java/arrow/core/DeadlockTest.kt:74:15
Kotlin: Unresolved reference: Eval
Any suggestions on how to get IntelliJ to behave correctly? I'm flying blind without IDE support as I make changes.
Thanks!julian
01/22/2023, 7:05 PMCONTRIBUTING.md
to run ./gradlew spotlessApply
, but got the error Task 'spotlessApply' not found in root project 'arrow'
. I found this in a year-old PR. How do others handle this error?julian
01/22/2023, 7:07 PMCONTRIBUTING.md
doesn't appear opinionated about this.julian
01/25/2023, 5:12 AMcheck
step. I examined the log, but didn't find any failure. Could it be that it timed out? That step took 50 minutes. Is there a way to trigger a build manually, without changing branch history?
Thanks!julian
01/25/2023, 10:43 PMcurried
.
May I use them as a pattern for the curried
functions that are missing tests?
Is there anything that should be done differently?
Any other considerations that are undocumented?
I think I'll remove the curried
tests from FunctionSyntaxTest.kt
and add a new file with just curried
tests. That sound reasonable?
Thanks!julian
02/01/2023, 4:37 PMsimon.vergauwen
02/09/2023, 9:10 AMjulian
02/09/2023, 6:08 PMmaster
, and should be released, according to @sam, next in v5.6. With it, checkAll
, forAll
, and forNone
will support up to 22-arity.