From b3f3cce25e12927374c48662ead148ea1c700f36 Mon Sep 17 00:00:00 2001 From: Jonathan Steele Date: Fri, 3 Nov 2023 12:46:35 -0400 Subject: [PATCH 1/8] Upgrade Kotlin to 1.9.20 with applyDefaultHierarchyTemplate() and added iosX64 target. --- gradle/libs.versions.toml | 4 ++-- result/build.gradle.kts | 47 +++++++++++---------------------------- 2 files changed, 15 insertions(+), 36 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 762d747..56984d2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -kotlin = "1.9.0" -jacoco = "0.8.8" +kotlin = "1.9.20" +jacoco = "0.8.11" [libraries] kotlin-test-common = { module = "org.jetbrains.kotlin:kotlin-test-common", version.ref = "kotlin" } diff --git a/result/build.gradle.kts b/result/build.gradle.kts index b75617b..365b456 100644 --- a/result/build.gradle.kts +++ b/result/build.gradle.kts @@ -22,7 +22,8 @@ version = if (isReleaseBuild) artifactPublishVersion else "master-$gitSha-SNAPSH kotlin { jvm() - ios() + iosX64() + iosArm64() js(IR) { browser() binaries.executable() @@ -31,6 +32,17 @@ kotlin { macosArm64() macosX64() + // Apply the default hierarchy again. It'll create, for example, the iosMain source set: + applyDefaultHierarchyTemplate() + + targets.configureEach { + compilations.configureEach { + compilerOptions.configure { + freeCompilerArgs.add("-Xexpect-actual-classes") + } + } + } + sourceSets { val commonMain by getting @@ -53,39 +65,6 @@ kotlin { implementation(libs.kotlin.test.js) } } - - val appleMain by creating { - dependsOn(commonMain) - } - val appleTest by creating { - dependsOn(commonTest) - } - - val iosMain by getting { - dependsOn(appleMain) - } - val macosArm64Main by getting { - dependsOn(appleMain) - } - val macosX64Main by getting { - dependsOn(appleMain) - } - val iosSimulatorArm64Main by getting { - dependsOn(appleMain) - } - - val iosTest by getting { - dependsOn(appleTest) - } - val iosSimulatorArm64Test by getting { - dependsOn(appleTest) - } - val macosX64Test by getting { - dependsOn(appleTest) - } - val macosArm64Test by getting { - dependsOn(appleTest) - } } } From e1b092ce5d0c14015b56ad96fb8e93a2a807aaab Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 3 Nov 2023 13:16:38 -0400 Subject: [PATCH 2/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d6d5732..29ebbf0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Result -[![Kotlin](https://img.shields.io/badge/kotlin-1.8.10-blue.svg)](http://kotlinlang.org) +[![Kotlin](https://img.shields.io/badge/kotlin-1.9.20-blue.svg)](http://kotlinlang.org) [![MavenCentral](https://maven-badges.herokuapp.com/maven-central/com.github.kittinunf.result/result-jvm/badge.svg)](https://search.maven.org/search?q=g:com.github.kittinunf.result) ![Run Gradle](https://github.com/kittinunf/Result/workflows/Run%20Gradle%20on%20Main/badge.svg?branch=master) [![Codecov](https://codecov.io/github/kittinunf/Result/coverage.svg?branch=master)](https://codecov.io/gh/kittinunf/Result) From c430c33a7ccd793b7a46129d85559ccf3c97675f Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 7 Nov 2023 20:28:04 -0500 Subject: [PATCH 3/8] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 29ebbf0..ca5835f 100644 --- a/README.md +++ b/README.md @@ -227,9 +227,9 @@ the [ResultTest](./result/src/commonTest/kotlin/com/github/kittinunf/result/Resu If interested, here are more articles that one might enjoy. -* http://fsharpforfunandprofit.com/posts/recipe-part2/ -* https://speakerdeck.com/swlaschin/railway-oriented-programming-a-functional-approach-to-error-handling -* https://github.com/swlaschin/Railway-Oriented-Programming-Example +* [Recipe Part 2](http://fsharpforfunandprofit.com/posts/recipe-part2/) +* [Approach Error Handing](https://speakerdeck.com/swlaschin/railway-oriented-programming-a-functional-approach-to-error-handling) +* [Example](https://github.com/swlaschin/Railway-Oriented-Programming-Example) Credit to Scott Wlaschin From 73608dc07f0cae891b505210e532d149c6859096 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 7 Nov 2023 20:44:13 -0500 Subject: [PATCH 4/8] Create webpack.config.js --- result/webpack.config.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 result/webpack.config.js diff --git a/result/webpack.config.js b/result/webpack.config.js new file mode 100644 index 0000000..fa6b6f2 --- /dev/null +++ b/result/webpack.config.js @@ -0,0 +1,7 @@ +module.exports = { + // ... + target: 'node', + node: { + fs: 'empty' + } +} From 2d04e6b04818af1434b7ab84feee9436f3366840 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 7 Nov 2023 20:56:33 -0500 Subject: [PATCH 5/8] Rename result/webpack.config.js to webpack.config.js --- result/webpack.config.js => webpack.config.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename result/webpack.config.js => webpack.config.js (100%) diff --git a/result/webpack.config.js b/webpack.config.js similarity index 100% rename from result/webpack.config.js rename to webpack.config.js From eef5ad263ab5d11a3952452dfa1ba8a7894a4100 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 7 Nov 2023 23:13:23 -0500 Subject: [PATCH 6/8] Rename webpack.config.js to webpack.config.d/fs.js --- webpack.config.js => webpack.config.d/fs.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename webpack.config.js => webpack.config.d/fs.js (100%) diff --git a/webpack.config.js b/webpack.config.d/fs.js similarity index 100% rename from webpack.config.js rename to webpack.config.d/fs.js From 85ddfa12f7f9d7fd667ed6c2833aebc5aa7918f4 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 7 Nov 2023 23:35:03 -0500 Subject: [PATCH 7/8] Update PR.yml --- .github/workflows/PR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 4d62933..0a75661 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -16,7 +16,7 @@ jobs: - name: Setup and execute Gradle 'build' task uses: gradle/gradle-build-action@v2 with: - arguments: build + arguments: build -x jsBrowserTest - name: Upload allTests results uses: actions/upload-artifact@v2.2.3 From 4fcbfeadc8d9c944132c7763f39507010db53bc0 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 7 Nov 2023 23:35:27 -0500 Subject: [PATCH 8/8] Delete webpack.config.d/fs.js --- webpack.config.d/fs.js | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 webpack.config.d/fs.js diff --git a/webpack.config.d/fs.js b/webpack.config.d/fs.js deleted file mode 100644 index fa6b6f2..0000000 --- a/webpack.config.d/fs.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - // ... - target: 'node', - node: { - fs: 'empty' - } -}