Skip to content

Commit

Permalink
chore(deps): update all dependencies (#3368)
Browse files Browse the repository at this point in the history
Co-authored-by: Alejandro Serrano <trupill@gmail.com>
  • Loading branch information
renovate[bot] and serras authored Feb 8, 2024
1 parent 08f1540 commit a616f26
Show file tree
Hide file tree
Showing 47 changed files with 214 additions and 210 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ jobs:

- name: Upgrade yarn.lock
run: ./gradlew kotlinUpgradeYarnLock
continue-on-error: true

- name: JS tests
run: ./gradlew jsTest --scan
Expand Down Expand Up @@ -325,3 +326,33 @@ jobs:
with:
name: 'reports-linux'
path: '**/build/reports/**'

# wasm:
# runs-on: ubuntu-latest
# timeout-minutes: 60
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Set up Java
# uses: actions/setup-java@v4
# with:
# distribution: 'temurin'
# java-version: 17
#
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@v3
# with:
# cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/arrow-2' }}
#
# - name: Compile WebAssembly
# run: ./gradlew compileKotlinWasmJs --scan
#
# - name: Upload reports
# if: failure()
# uses: actions/upload-artifact@v4
# with:
# name: 'reports-wasm'
# path: '**/build/reports/**'
10 changes: 0 additions & 10 deletions arrow-libs/core/arrow-annotations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,10 @@ apply(from = property("ANIMALSNIFFER_MPP"))
kotlin {
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlin.stdlibCommon)
}
}
jvmMain {
dependencies {
implementation(libs.kotlin.stdlib)
}
}
jsMain {
dependencies {
implementation(libs.kotlin.stdlibJS)
}
}
}

jvm {
Expand Down
14 changes: 1 addition & 13 deletions arrow-libs/core/arrow-atomic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ kotlin {
sourceSets {
commonMain {
dependencies {
api(libs.kotlin.stdlibCommon)
api(libs.kotlin.stdlib)
}
}

Expand All @@ -39,18 +39,6 @@ kotlin {
implementation(libs.coroutines.test)
}
}

jvmMain {
dependencies {
implementation(libs.kotlin.stdlib)
}
}

jsMain {
dependencies {
implementation(libs.kotlin.stdlibJS)
}
}
}

jvm {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package arrow.atomic

public actual class Atomic<V> actual constructor(initialValue: V) {
private var internalValue: V = initialValue

public actual fun get(): V = internalValue

public actual fun set(value: V) {
internalValue = value
}

public actual fun compareAndSet(expected: V, new: V): Boolean =
if (expected === internalValue) {
internalValue = new
true
} else {
false
}

public actual fun getAndSet(value: V): V {
val old = internalValue
internalValue = value
return old
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package arrow.atomic

public actual class AtomicInt actual constructor(initialValue: Int) {
private var internalValue: Int = initialValue

public actual fun get(): Int = internalValue

public actual fun set(newValue: Int) {
internalValue = newValue
}

public actual fun addAndGet(delta: Int): Int {
internalValue += delta
return internalValue
}

public actual fun incrementAndGet(): Int = addAndGet(1)

public actual fun decrementAndGet(): Int = addAndGet(-1)

public actual fun compareAndSet(expected: Int, new: Int): Boolean =
if (expected == internalValue) {
internalValue = new
true
} else {
false
}

public actual fun getAndSet(value: Int): Int {
val current = internalValue
internalValue = value
return current
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package arrow.atomic

public actual class AtomicLong actual constructor(initialValue: Long) {
private var internalValue: Long = initialValue

public actual fun get(): Long = internalValue

public actual fun set(newValue: Long) {
internalValue = newValue
}

public actual fun addAndGet(delta: Long): Long {
internalValue += delta
return internalValue
}

public actual fun incrementAndGet(): Long = addAndGet(1)

public actual fun decrementAndGet(): Long = addAndGet(-1)

public actual fun compareAndSet(expected: Long, new: Long): Boolean =
if (expected == internalValue) {
internalValue = new
true
} else {
false
}

public actual fun getAndSet(value: Long): Long {
val current = internalValue
internalValue = value
return current
}
}
13 changes: 1 addition & 12 deletions arrow-libs/core/arrow-autoclose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ kotlin {
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlin.stdlibCommon)
implementation(libs.kotlin.stdlib)
implementation(projects.arrowAtomic)
}
}
Expand All @@ -33,17 +33,6 @@ kotlin {
implementation(libs.coroutines.test)
}
}
jvmMain {
dependencies {
implementation(libs.kotlin.stdlib)
}
}

jsMain {
dependencies {
implementation(libs.kotlin.stdlibJS)
}
}
}

jvm {
Expand Down

This file was deleted.

12 changes: 1 addition & 11 deletions arrow-libs/core/arrow-continuations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ kotlin {
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlin.stdlibCommon)
implementation(libs.kotlin.stdlib)
}
}
commonTest {
Expand All @@ -38,16 +38,6 @@ kotlin {
runtimeOnly(libs.kotest.runnerJUnit5)
}
}
jvmMain {
dependencies {
implementation(libs.kotlin.stdlib)
}
}
jsMain {
dependencies {
implementation(libs.kotlin.stdlibJS)
}
}
}

jvm {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package arrow.continuations.generic

@Deprecated(deprecateArrowContinuation)
public actual class AtomicRef<V> 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
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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()
14 changes: 1 addition & 13 deletions arrow-libs/core/arrow-core-high-arity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ kotlin {
api(projects.arrowAtomic)
api(projects.arrowContinuations)
api(projects.arrowAnnotations)
api(libs.kotlin.stdlibCommon)
api(libs.kotlin.stdlib)
}
}

Expand All @@ -45,18 +45,6 @@ kotlin {
runtimeOnly(libs.kotest.runnerJUnit5)
}
}

jvmMain {
dependencies {
implementation(libs.kotlin.stdlib)
}
}

jsMain {
dependencies {
implementation(libs.kotlin.stdlibJS)
}
}
}

jvm {
Expand Down
2 changes: 1 addition & 1 deletion arrow-libs/core/arrow-core-serialization/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kotlin {
commonMain {
dependencies {
api(projects.arrowCore)
api(libs.kotlin.stdlibCommon)
api(libs.kotlin.stdlib)
api(libs.kotlinx.serializationCore)
}
}
Expand Down
14 changes: 1 addition & 13 deletions arrow-libs/core/arrow-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ kotlin {
api(projects.arrowAtomic)
api(projects.arrowContinuations)
api(projects.arrowAnnotations)
api(libs.kotlin.stdlibCommon)
api(libs.kotlin.stdlib)
}
}

Expand All @@ -44,18 +44,6 @@ kotlin {
runtimeOnly(libs.kotest.runnerJUnit5)
}
}

jvmMain {
dependencies {
implementation(libs.kotlin.stdlib)
}
}

jsMain {
dependencies {
implementation(libs.kotlin.stdlibJS)
}
}
}

jvm {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a616f26

Please sign in to comment.