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

Remove legacy Meta, bring Optics KSP #2599

Merged
merged 28 commits into from Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0aab23f
Remove arrow-meta module
nomisRev Dec 1, 2021
81046ac
Bump to Kotlin 1.6.0
nomisRev Dec 1, 2021
0e06e9f
Conflict Arrow Optics Plugin, and Arrow Optics module
nomisRev Dec 1, 2021
d9587f6
Remove docs
nomisRev Dec 1, 2021
19cb22a
WIP
nomisRev Dec 16, 2021
045cf7f
Try kspAll
nomisRev Dec 16, 2021
95782d2
Bump versions
nomisRev Dec 16, 2021
71c6e33
Rolllback Kotlin bump to match ksp release
nomisRev Dec 16, 2021
d2e95e5
Rollback version KotlinX Coroutines
nomisRev Dec 16, 2021
dfce0d6
Move KSP plug-in to Arrow (tests still need work)
serras Dec 20, 2021
a6e0923
Do testing of Optics KSP
serras Dec 20, 2021
3ecab61
Update docs
serras Dec 20, 2021
5a73973
Fix bug in optics-ksp
serras Dec 20, 2021
195d72f
Do not do API check on internal-facing projects
serras Dec 20, 2021
d4d7121
Add iOS tests to Optics KSP
serras Dec 20, 2021
2d8ccfa
Missing KSP configuration
serras Dec 20, 2021
4fc1b65
Add targets programatically (thanks for the tip, @nomisRev !)
serras Dec 20, 2021
4a8c00a
Change cache for Linux
serras Dec 20, 2021
29477f0
Move to Kotlin 1.6.10
serras Dec 20, 2021
6e642fb
Upgrade more stuff
serras Dec 20, 2021
50ea4df
Go back to corotuines 1.6.0-RC
serras Dec 20, 2021
ef19cfe
Fix build
serras Dec 20, 2021
445a202
Update coroutines to 1.6.0-RC3 (RC2 does not work)
serras Dec 20, 2021
05b78ee
Move coroutines back to 1.5.2
serras Dec 20, 2021
3ad43e9
Fix compilation problem in test
serras Dec 21, 2021
398e5a9
Delete unneeded file
serras Dec 21, 2021
747aaba
Apply suggestions from code review by @nomisRev
serras Dec 21, 2021
e825acc
Try to fix flaky STM test
serras Dec 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -2,6 +2,5 @@ package arrow.continuations.generic

/** Represents a unique identifier using object equality. */
internal class Token {
@ExperimentalUnsignedTypes
override fun toString(): String = "Token(${hashCode().toUInt().toString(16)})"
override fun toString(): String = "Token(${hashCode().toString(16)})"
}
Expand Up @@ -6,7 +6,12 @@ import arrow.core.Tuple5
import arrow.core.test.generators.unit
import arrow.core.test.laws.Law
import io.kotest.core.names.TestName
import io.kotest.core.source.SourceRef
import io.kotest.core.spec.RootTest
import io.kotest.core.spec.style.StringSpec
import io.kotest.core.spec.style.scopes.StringSpecScope
import io.kotest.core.spec.style.scopes.addTest
import io.kotest.core.test.TestType
import io.kotest.property.Arb
import io.kotest.property.Gen
import io.kotest.property.PropertyContext
Expand Down Expand Up @@ -59,14 +64,18 @@ public abstract class UnitSpec(
.flatMap { list: List<Law> -> list.asIterable() }
.distinctBy { law: Law -> law.name }
.forEach { law: Law ->
registration().addTest(TestName(law.name), xdisabled = false, law.test)
addTest(TestName(null, law.name, false), false, null) {
law.test(StringSpecScope(this.coroutineContext, testCase))
}
}

public fun testLaws(prefix: String, vararg laws: List<Law>): Unit = laws
.flatMap { list: List<Law> -> list.asIterable() }
.distinctBy { law: Law -> law.name }
.forEach { law: Law ->
registration().addTest(TestName(prefix, law.name, true), xdisabled = false, law.test)
addTest(TestName(prefix, law.name, false), false, null) {
law.test(StringSpecScope(this.coroutineContext, testCase))
}
}

public suspend fun checkAll(property: suspend PropertyContext.() -> Unit): PropertyContext =
Expand Down
2 changes: 1 addition & 1 deletion arrow-libs/core/arrow-core/build.gradle.kts
Expand Up @@ -14,7 +14,7 @@ kotlin {
dependencies {
api(projects.arrowContinuations)
api(projects.arrowAnnotations)
implementation(libs.kotlin.stdlibCommon)
api(libs.kotlin.stdlibCommon)
Copy link
Member Author

@nomisRev nomisRev Dec 21, 2021

Choose a reason for hiding this comment

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

@JavierSegoviaCordoba do you know if this is correct?
Since we expose types from Kotlin Std from public API, it should be marked as api right?

}
}
commonTest {
Expand Down
Expand Up @@ -36,7 +36,7 @@ class EitherTest : UnitSpec() {
init {
testLaws(
MonoidLaws.laws(Monoid.either(Monoid.string(), Monoid.int()), ARB),
FxLaws.suspended<EitherEffect<String, *>, Either<String, Int>, Int>(
/*FxLaws.suspended<EitherEffect<String, *>, Either<String, Int>, Int>(
Copy link
Member Author

Choose a reason for hiding this comment

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

Can these not be uncommented without failing the build @serras ?

Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately not :(

Arb.int().map(::Right),
ARB.map { it },
Either<String, Int>::equals,
Expand All @@ -51,7 +51,7 @@ class EitherTest : UnitSpec() {
either::eager
) {
it.bind()
}
}*/
)

"isLeft should return true if Left and false if Right" {
Expand Down
Expand Up @@ -17,12 +17,12 @@ class EvalTest : UnitSpec() {
init {

testLaws(
FxLaws.suspended<EvalEffect<*>, Eval<Int>, Int>(Arb.int().map(Eval.Companion::now), Arb.int().map(Eval.Companion::now), Eval<Int>::equals, eval::invoke) {
/*FxLaws.suspended<EvalEffect<*>, Eval<Int>, Int>(Arb.int().map(Eval.Companion::now), Arb.int().map(Eval.Companion::now), Eval<Int>::equals, eval::invoke) {
it.bind()
},
FxLaws.eager<RestrictedEvalEffect<*>, Eval<Int>, Int>(Arb.int().map(Eval.Companion::now), Arb.int().map(Eval.Companion::now), Eval<Int>::equals, eval::eager) {
it.bind()
}
}*/
)

"should map wrapped value" {
Expand Down
Expand Up @@ -29,7 +29,7 @@ class OptionTest : UnitSpec() {

testLaws(
MonoidLaws.laws(Monoid.option(Monoid.int()), Arb.option(Arb.int())),
FxLaws.suspended<OptionEffect<*>, Option<String>, String>(
/*FxLaws.suspended<OptionEffect<*>, Option<String>, String>(
Arb.string().map(Option.Companion::invoke),
Arb.option(Arb.string()),
Option<String>::equals,
Expand All @@ -44,7 +44,7 @@ class OptionTest : UnitSpec() {
option::eager
) {
it.bind()
}
}*/
)

"ensure null in option computation" {
Expand Down
1,694 changes: 0 additions & 1,694 deletions arrow-libs/core/arrow-meta/api/arrow-meta.api

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions arrow-libs/core/arrow-meta/arrow-meta-test-models/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions arrow-libs/core/arrow-meta/build.gradle.kts

This file was deleted.

2 changes: 0 additions & 2 deletions arrow-libs/core/arrow-meta/gradle.properties

This file was deleted.

13 changes: 0 additions & 13 deletions arrow-libs/core/arrow-meta/infographic/arrow-infographic.txt

This file was deleted.

5 changes: 0 additions & 5 deletions arrow-libs/core/arrow-meta/knit.properties

This file was deleted.

This file was deleted.