diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 36e73c38bd9..d1dd5e9a717 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,7 +2,7 @@ name: "Publish all libs, Arrow-stack and Docs" on: push: - branches: [ main ] + branches: [ publish-2.0.0-alpha.1 ] workflow_dispatch: branches: [ main ] inputs: @@ -14,13 +14,11 @@ on: env: BASEDIR: ${{github.workspace}}/arrow-libs GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.kotlin.dsl.internal.io.timeout=120000 -Dorg.gradle.jvmargs="-Xmx5g -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8" - OSS_USER: '${{ secrets.OSS_USER }}' - OSS_TOKEN: '${{ secrets.OSS_TOKEN }}' - OSS_STAGING_PROFILE_ID: '${{ secrets.OSS_STAGING_PROFILE_ID }}' - SIGNING_KEY_NAME: '${{ secrets.SIGNING_KEY_NAME }}' - SIGNING_KEY_ID: '${{ secrets.SIGNING_KEY_ID }}' - SIGNING_KEY_PASSPHRASE: '${{ secrets.SIGNING_KEY_PASSPHRASE }}' - SIGNING_KEY: '${{ secrets.SIGNING_KEY }}' + ORG_GRADLE_PROJECT_mavenCentralUsername: '${{ secrets.OSS_USER }}' + ORG_GRADLE_PROJECT_mavenCentralPassword: '${{ secrets.OSS_TOKEN }}' + ORG_GRADLE_PROJECT_signingInMemoryKeyId: '${{ secrets.SIGNING_KEY_ID }}' + ORG_GRADLE_PROJECT_signingInMemoryKey: '${{ secrets.SIGNING_KEY }}' + ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: '${{ secrets.SIGNING_KEY_PASSPHRASE }}' jobs: publish: @@ -40,17 +38,10 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }} + cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'publish-2.0.0-alpha.1' }} - name: Assemble - run: ./gradlew assemble -Pversion=${{ inputs.version }} -Penable_wasm=true - - - name: Upload reports - if: failure() - uses: actions/upload-artifact@v4 - with: - name: 'reports-${{ matrix.os }}' - path: '**/build/reports/**' + run: ./gradlew assemble -Pversion=2.0.0-alpha.3 -Penable_wasm=true - - name: Publish next major SNAPSHOT version - run: ./gradlew -Pversion=${{ inputs.version }} publish + - name: Publish artifacts + run: ./gradlew -Pversion=2.0.0-alpha.3 publish -Penable_wasm=true diff --git a/arrow-libs/core/arrow-cache4k/gradle.properties b/arrow-libs/core/arrow-cache4k/gradle.properties index 958434cf3a6..4e0b3292c2a 100644 --- a/arrow-libs/core/arrow-cache4k/gradle.properties +++ b/arrow-libs/core/arrow-cache4k/gradle.properties @@ -1,4 +1,4 @@ # Maven publishing configuration -POM_NAME=Arrow + cache4k +POM_NAME=Arrow Cache4k # Build configuration kapt.incremental.apt=false diff --git a/arrow-libs/core/arrow-continuations/api/arrow-continuations.api b/arrow-libs/core/arrow-continuations/api/arrow-continuations.api deleted file mode 100644 index 8816ae2818c..00000000000 --- a/arrow-libs/core/arrow-continuations/api/arrow-continuations.api +++ /dev/null @@ -1,56 +0,0 @@ -public abstract interface class arrow/continuations/Effect { - public static final field Companion Larrow/continuations/Effect$Companion; - public abstract fun control ()Larrow/continuations/generic/DelimitedScope; -} - -public final class arrow/continuations/Effect$Companion { - public final fun restricted (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object; - public final fun suspended (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -} - -public final class arrow/continuations/Reset { - public static final field INSTANCE Larrow/continuations/Reset; - public final fun restricted (Lkotlin/jvm/functions/Function2;)Ljava/lang/Object; - public final fun suspended (Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -} - -public final class arrow/continuations/generic/AtomicRefKt { - public static final fun getAndUpdate (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; - public static final fun loop (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;)Ljava/lang/Void; - public static final fun update (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;)V - public static final fun updateAndGet (Ljava/util/concurrent/atomic/AtomicReference;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; -} - -public class arrow/continuations/generic/ControlThrowable : java/lang/Throwable { - public fun ()V - public fun fillInStackTrace ()Ljava/lang/Throwable; -} - -public final class arrow/continuations/generic/ControlThrowableKt { - public static final field deprecateArrowContinuation Ljava/lang/String; -} - -public abstract interface class arrow/continuations/generic/DelimitedContinuation { - public abstract fun invoke (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -} - -public abstract interface class arrow/continuations/generic/DelimitedScope { - public abstract fun shift (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -} - -public abstract interface class arrow/continuations/generic/RestrictedScope : arrow/continuations/generic/DelimitedScope { - public abstract fun shift (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun shift (Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -} - -public final class arrow/continuations/generic/RestrictedScope$DefaultImpls { - public static fun shift (Larrow/continuations/generic/RestrictedScope;Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; -} - -public final class arrow/continuations/generic/ShortCircuit : arrow/continuations/generic/ControlThrowable { - public final fun getRaiseValue ()Ljava/lang/Object; -} - -public abstract interface class arrow/continuations/generic/SuspendedScope : arrow/continuations/generic/DelimitedScope { -} - diff --git a/arrow-libs/core/arrow-continuations/src/wasmJsMain/kotlin/arrow/continuations/generic/AtomicRef.kt b/arrow-libs/core/arrow-continuations/src/wasmJsMain/kotlin/arrow/continuations/generic/AtomicRef.kt deleted file mode 100644 index 9b845acb0a9..00000000000 --- a/arrow-libs/core/arrow-continuations/src/wasmJsMain/kotlin/arrow/continuations/generic/AtomicRef.kt +++ /dev/null @@ -1,31 +0,0 @@ -package arrow.continuations.generic - -@Deprecated(deprecateArrowContinuation) -public actual class AtomicRef actual constructor(initialValue: V) { - private var internalValue: V = initialValue - - /** - * Compare current value with expected and set to new if they're the same. Note, 'compare' is checking - * the actual object id, not 'equals'. - */ - public actual fun compareAndSet(expected: V, new: V): Boolean { - return if (expected === internalValue) { - internalValue = new - true - } else { - false - } - } - - public actual fun getAndSet(value: V): V { - val oldValue = internalValue - internalValue = value - return oldValue - } - - public actual fun get(): V = internalValue - - public actual fun set(value: V) { - internalValue = value - } -} diff --git a/arrow-libs/core/arrow-continuations/src/wasmJsMain/kotlin/arrow/continuations/generic/ControlThrowable.kt b/arrow-libs/core/arrow-continuations/src/wasmJsMain/kotlin/arrow/continuations/generic/ControlThrowable.kt deleted file mode 100644 index 3ba52914bac..00000000000 --- a/arrow-libs/core/arrow-continuations/src/wasmJsMain/kotlin/arrow/continuations/generic/ControlThrowable.kt +++ /dev/null @@ -1,10 +0,0 @@ -package arrow.continuations.generic - -/** - * A [Throwable] class intended for control flow. - * Instance of [ControlThrowable] should **not** be caught, - * and `arrow.core.NonFatal` does not catch this [Throwable]. - * By extension, `Either.catch` and `Raise.catch` also don't catch [ControlThrowable]. - */ -@Deprecated(deprecateArrowContinuation) -public actual open class ControlThrowable : Throwable() diff --git a/arrow-libs/core/arrow-core-serialization/build.gradle.kts b/arrow-libs/core/arrow-core-serialization/build.gradle.kts index b5032a523d2..e2a452c3f7a 100644 --- a/arrow-libs/core/arrow-core-serialization/build.gradle.kts +++ b/arrow-libs/core/arrow-core-serialization/build.gradle.kts @@ -3,7 +3,7 @@ plugins { id(libs.plugins.kotlin.multiplatform.get().pluginId) alias(libs.plugins.arrowGradleConfig.kotlin) - + alias(libs.plugins.publish) alias(libs.plugins.kotlinx.kover) alias(libs.plugins.spotless) id(libs.plugins.kotlinx.serialization.get().pluginId) diff --git a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/Fold.kt b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/Fold.kt index a3eced1ab62..fa870b50948 100644 --- a/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/Fold.kt +++ b/arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/Fold.kt @@ -94,7 +94,7 @@ public inline fun EagerEffect.fold(recover: (error: Erro /** * The most general way to execute a computation using [Raise]. - * Depending on the outcome of the block, one of the two continuations is run: + * Depending on the outcome of the block, one of the two lambdas is run: * - _success_ [transform] result of [A] to a value of [B]. * - _raised_ [recover] from `raised` value of [Error] to a value of [B]. * @@ -116,7 +116,7 @@ public inline fun fold( /** * The most general way to execute a computation using [Raise]. - * Depending on the outcome of the block, one of the three continuations is run: + * Depending on the outcome of the block, one of the three lambdas is run: * - _success_ [transform] result of [A] to a value of [B]. * - _raised_ [recover] from `raised` value of [Error] to a value of [B]. * - _exception_ [catch] from [Throwable] by transforming value into [B]. @@ -172,16 +172,16 @@ public inline fun fold( * } * ``` * ```text - * arrow.core.continuations.RaiseCancellationException: Raised Continuation - * at arrow.core.continuations.DefaultRaise.raise(Fold.kt:77) + * arrow.core.raise.RaiseCancellationException: Raised Continuation + * at arrow.core.raise.DefaultRaise.raise(Fold.kt:77) * at MainKtKt$main$error$1.invoke(MainKt.kt:6) * at MainKtKt$main$error$1.invoke(MainKt.kt:6) - * at arrow.core.continuations.Raise$DefaultImpls.bind(Raise.kt:22) - * at arrow.core.continuations.DefaultRaise.bind(Fold.kt:74) - * at arrow.core.continuations.Effect__TracingKt$traced$2.invoke(Traced.kt:46) - * at arrow.core.continuations.Effect__TracingKt$traced$2.invoke(Traced.kt:46) - * at arrow.core.continuations.Effect__FoldKt.fold(Fold.kt:92) - * at arrow.core.continuations.Effect.fold(Unknown Source) + * at arrow.core.raise.Raise$DefaultImpls.bind(Raise.kt:22) + * at arrow.core.raise.DefaultRaise.bind(Fold.kt:74) + * at arrow.core.raise.Effect__TracingKt$traced$2.invoke(Traced.kt:46) + * at arrow.core.raise.Effect__TracingKt$traced$2.invoke(Traced.kt:46) + * at arrow.core.raise.Effect__FoldKt.fold(Fold.kt:92) + * at arrow.core.raise.Effect.fold(Unknown Source) * at MainKtKt.main(MainKt.kt:8) * at MainKtKt.main(MainKt.kt) * ``` diff --git a/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/raise/EffectSpec.kt b/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/raise/EffectSpec.kt index f92abec4ac2..b6efda8af58 100644 --- a/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/raise/EffectSpec.kt +++ b/arrow-libs/core/arrow-core/src/commonTest/kotlin/arrow/core/raise/EffectSpec.kt @@ -389,7 +389,7 @@ class EffectSpec { } } - @Test fun issue2779HandleErrorWithDoesNotMakeNestedContinuationsHang() = runTest { + @Test fun issue2779HandleErrorWithDoesNotMakeNestedEffectHang() = runTest { checkAll(Arb.string()) { error -> val failed: Effect = effect { withContext(Dispatchers.Default) {} @@ -405,7 +405,7 @@ class EffectSpec { } } - @Test fun issue2779BindNestedInFoldDoesNotMakeNestedContinuationsHang() = runTest { + @Test fun issue2779BindNestedInFoldDoesNotMakeNestedEffectHang() = runTest { checkAll(Arb.string()) { error -> val failed: Effect = effect { withContext(Dispatchers.Default) {} diff --git a/arrow-libs/core/arrow-functions/build.gradle.kts b/arrow-libs/core/arrow-functions/build.gradle.kts index a5b7ca4ab7d..8dc8fd3e30c 100644 --- a/arrow-libs/core/arrow-functions/build.gradle.kts +++ b/arrow-libs/core/arrow-functions/build.gradle.kts @@ -40,7 +40,7 @@ kotlin { jvm { tasks.jvmJar { manifest { - attributes["Automatic-Module-Name"] = "arrow.continuations" + attributes["Automatic-Module-Name"] = "arrow.functions" } } } diff --git a/arrow-libs/fx/arrow-fx-coroutines/gradle.properties b/arrow-libs/fx/arrow-fx-coroutines/gradle.properties index ac7b73adc18..ce9582a98a4 100644 --- a/arrow-libs/fx/arrow-fx-coroutines/gradle.properties +++ b/arrow-libs/fx/arrow-fx-coroutines/gradle.properties @@ -1,2 +1,2 @@ # Maven publishing configuration -POM_NAME=Arrow-Fx-Coroutines +POM_NAME=Arrow Fx Coroutines diff --git a/arrow-libs/fx/arrow-fx-stm/gradle.properties b/arrow-libs/fx/arrow-fx-stm/gradle.properties index 9c5b39749c8..7824731763b 100644 --- a/arrow-libs/fx/arrow-fx-stm/gradle.properties +++ b/arrow-libs/fx/arrow-fx-stm/gradle.properties @@ -1,2 +1,2 @@ # Maven publishing configuration -POM_NAME=Arrow-Fx-STM +POM_NAME=Arrow Fx STM diff --git a/arrow-libs/optics/arrow-optics-ksp-plugin/gradle.properties b/arrow-libs/optics/arrow-optics-ksp-plugin/gradle.properties index 3cad06197cf..0d325e5c562 100644 --- a/arrow-libs/optics/arrow-optics-ksp-plugin/gradle.properties +++ b/arrow-libs/optics/arrow-optics-ksp-plugin/gradle.properties @@ -1,6 +1,3 @@ # Maven publishing configuration POM_NAME=Arrow Optics Compiler KSP Plugin -POM_ARTIFACT_ID=arrow-optics-ksp-plugin POM_PACKAGING=jar - -POM_NAME=Arrow Optics Compiler KSP Plugin diff --git a/arrow-libs/optics/arrow-optics-reflect/gradle.properties b/arrow-libs/optics/arrow-optics-reflect/gradle.properties index bc7a92ed517..4509c42cf9c 100644 --- a/arrow-libs/optics/arrow-optics-reflect/gradle.properties +++ b/arrow-libs/optics/arrow-optics-reflect/gradle.properties @@ -1,4 +1,2 @@ # Maven publishing configuration -POM_NAME=Arrow Optics for Kotlin Reflection -# Build configuration -kapt.incremental.apt=false +POM_NAME=Arrow Optics Kotlin Reflection diff --git a/arrow-libs/resilience/arrow-resilience/gradle.properties b/arrow-libs/resilience/arrow-resilience/gradle.properties index e534878b7e7..e2358f112d5 100644 --- a/arrow-libs/resilience/arrow-resilience/gradle.properties +++ b/arrow-libs/resilience/arrow-resilience/gradle.properties @@ -1,2 +1,2 @@ # Maven publishing configuration -POM_NAME=Arrow-Fx-Resilience \ No newline at end of file +POM_NAME=Arrow Fx Resilience \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 1ec4a579517..188a3382ad9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,7 @@ -# Package definitions projects.group=io.arrow-kt -projects.version=2.0.0-SNAPSHOT - -# Pomfile definitions -#RELEASE_SIGNING_ENABLED=true +GROUP=io.arrow-kt +SONATYPE_HOST=DEFAULT +RELEASE_SIGNING_ENABLED=true POM_DESCRIPTION=Functional companion to Kotlin's Standard Library POM_URL=https://github.com/arrow-kt/arrow/