Skip to content

Commit

Permalink
Arrow 2.0 (#2778)
Browse files Browse the repository at this point in the history
* The beginning of Arrow 2.0

* Resource Arrow 2.0 (#2786)

* Flatten Resource ADT, maintain API

* [Arrow 2.0] Effect without suspending shift (#2797)

* Shift without suspend, inline all the rest
* Add new error handlers signatures
* Make ShiftCancellationException private

* Rename Shift to Raise according to Slack Poll, and add some initial docs (#2827)

* Remove all references to shift from new Arrow 2.0 code (#2834)

* Remove all references to shift from new code

* Update API files

* Fixes merge conflict between main and arrow-2 (#2835)

* Add Resource.allocated() to decompose Resource into it's allocate and… (#2820)
* [2743] Migrate internal use of CircuitBreaker double to duration (#2748)
* Fix typo (#2824)
* Make the server disconnect test more general (#2822)
* Update NonEmptyList.fromList deprecation to suggest `toOption()` instead (#2832)
* Improve Either.getOrHandle() docs (#2833)
* Improve allocated, and fix knit examples
Co-authored-by: Jeff Martin <[email protected]>
Co-authored-by: Martin Moore <[email protected]>
Co-authored-by: valery1707 <[email protected]>
Co-authored-by: Lukasz Kalnik <[email protected]>
Co-authored-by: stylianosgakis <[email protected]>

* Add Atomic module, and StateShift (#2817)

* Two small deprecations

* Add Atomic module, and StateShift. Implement ior through StateShift

* Fix build

* Fix atomic knit

* Fix knit attempt #2

* Update API files

* Remove references to shift

* Change return type of raise to Nothing (#2839)

* Change return type of raise to Nothing

Implements #2805

* Update public api with ./gradlew apiDump

* Suppress warnings for unreachable calls to fail in tests

The test is verifying that no code will be executed after a call to
raise, so it's actually testing the very behaviour that the compiler is
warning us about.

Co-authored-by: Alejandro Serrano <[email protected]>

* Update API files

* Increase timeout

* Fix compiler bug with nested inline + while + return

* Clean up ExitCase.fromError

* Update API files@

* Feature/remove validated (#2795)

Co-authored-by: Simon Vergauwen <[email protected]>
Co-authored-by: Alejandro Serrano <[email protected]>

* Remove CancellationExceptionNoTrace.kt after merge, and run apiDump

* Add missing runnerJUnit5 for arrow-atomic JVM

* Publish Arrow 2.0.0-SNAPSHOT (#2871)

Co-authored-by: Javier Segovia Córdoba <[email protected]>

* Simplify optics to Traversal/Optional/Lens/Prism (#2873)

* 'mapOrAccumulate' for Raise (#2872)

Co-authored-by: Simon Vergauwen <[email protected]>

* Fix problems with Atomic

* Smaller timeouts

* Remove Tuple10 to Tuple22, Const, Eval, computation blocks, and arrow-continuations (#2784)

* Revert typo

* Fix build

* Fix ParMapJvmTest

* Implement NonEmptyList using value class (#2911)

* Fix merge w.r.t. Saga

* apiDump

* Test other return expression

* change unalign signature (#2972)

see discussion in
#2960 (comment)
#2960 (comment)

---------

Co-authored-by: Alejandro Serrano <[email protected]>

* Update after merge main

* Fix :arrow-optics-ksp-plugin:compileKotlin

* Fix Every instances

* Move functions to arrow functions (#3014)

* Bring back `Iso` (#3013)

* Bring back Iso

* API Dump

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update BOM (#3019)

* Fix andThen duplication (#3020)

* Fix Knit

* Fix weird problem with value classes

* Update API docs

* Update publish workflow

Following the instructions in #3090 (comment)

* No closing repo on snapshot

* knit

* Fix optics tests

* Fix after merge

* Refactor ParMapTest from Kotest Plugin to Kotlin-test runtime #3191 (#3221)

Co-authored-by: Simon Vergauwen <[email protected]>
Co-authored-by: Alejandro Serrano <[email protected]>

* Refactor: Use Kotlin-test runtime for arrow-fx-stm tests (#3224)

Co-authored-by: Alejandro Serrano <[email protected]>

* Update all Gradle files to mention kotlin.test

* Refactor ParZip2Test from Kotest Plugin to Kotlin-test runtime #3192 (#3222)

Co-authored-by: Alejandro Serrano <[email protected]>

* Refactor ParZip3Test from Kotest Plugin to Kotlin-test runtime #3193 (#3223)

Co-authored-by: Alejandro Serrano <[email protected]>

* Refactor GuaranteeCaseTest to use kotlin test (#3226)

Closes #3190

* refactor: migrate NotEmptySetTest to kotlin-test (#3230)

Co-authored-by: Alejandro Serrano <[email protected]>

* refactor: migrate EagerEffectSpec to kotlin-test (#3233)

Co-authored-by: Alejandro Serrano <[email protected]>

* Refactor NullableSpec from Kotest Plugin to Kotlin-test runtime (#3236)

#3153

Co-authored-by: Alejandro Serrano <[email protected]>

* Refactor BracketCaseTest to use kotlin test (#3237)

Closes #3186

Co-authored-by: Alejandro Serrano <[email protected]>

* Move arrow-functions tests to kotlin.test (#3243)

* Inline `AtomicBoolean` (#3240)

* Inline AtomicBoolean

* Update API files

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* refactor: migrate MappersSpec to kotlin-test (#3248)

* Refactor ResourceTestJvm from Kotest Plugin to Kotlin-test runtime (#3244)

Closes #3213

* refactor: migrate FlowJvmTest to Kotlin-test (#3228)

* Refactor ParZip9JvmTest from Kotest Plugin to Kotlin-test runtime (#3245)

Closes #3211

* Refactor ParZip8JvmTest from Kotest Plugin to Kotlin-test runtime (#3246)

Closes #3210

* refactor: migrate NumberInstancesTest to kotlin-test (#3232)

* refactor: OptionTest to kotlin-test runtime (#3229)

* Revert "Inline `AtomicBoolean` (#3240)" (#3279)

This reverts commit a6f1e73.

* Refactor ParZip6JvmTest from Kotest Plugin to Kotlin-test runtime (#3255)

Closes #3208

* Refactor ParZip5JvmTest from Kotest Plugin to Kotlin-test runtime (#3256)

Closes #3207

* Refactor ParZip3JvmTest from Kotest Plugin to Kotlin-test runtime (#3258)

Closes #3205

* Refactor ParZip2JvmTest from Kotest Plugin to Kotlin-test runtime (#3259)

Closes #3204

* Refactor ParMapJvmTest from Kotest Plugin to Kotlin-test runtime (#3260)

Closes #3203

* Refactor ParZip4JvmTest from Kotest Plugin to Kotlin-test runtime (#3257)

Closes #3206

* refactor: migrate RaiseAccumulateSpec to kotlin-test (#3250)

* Refactor ParZip7JvmTest from Kotest Plugin to Kotlin-test runtime (#3247)

Closes #3209

Co-authored-by: Alejandro Serrano <[email protected]>

* Update ComparisonKtTest.kt (#3274)

Co-authored-by: Simon Vergauwen <[email protected]>

* Update OptionSpec.kt (#3271)

Co-authored-by: Simon Vergauwen <[email protected]>

* Update TraceJvmSpec.kt (#3276)

* Update TraceJvmSpec.kt

* Update TraceJvmSpec.kt

---------

Co-authored-by: Simon Vergauwen <[email protected]>

* Update ParZip9Test.kt (#3265)

* Update ParZip9Test.kt

* Update ParZip9Test.kt

* Update ParZip8Test.kt (#3266)

* Update ParZip7Test.kt (#3267)

* Update ParZip6Test.kt (#3268)

* Update ParZip5Test.kt (#3269)

* Update ParZip4Test.kt (#3270)

* Refactor CountDownLatchSpec and CyclicBarrierSpec to use kotlin test (#3227)

* Refactor CountDownLatchSpec to use kotlin test

Closes #3187

* Refactor CyclicBarrierSpec to use kotlin test

Closes #3188

---------

Co-authored-by: Alejandro Serrano <[email protected]>

* Refactor NonEmptyListTest to kotlin-test (#3231)

* Add kotlin test dependency

* Refactor NonEmptyList Test to use kotlin test

---------

Co-authored-by: Alejandro Serrano <[email protected]>

* refactor: migrate EffectSpec to kotlin-test (#3234)

* Refactor FlowTest to use kotlin test (#3238)

Closes #3189

Co-authored-by: Alejandro Serrano <[email protected]>

* refactor: migrate IorSpec to kotlin-test (#3249)

Co-authored-by: Simon Vergauwen <[email protected]>

* refactor: migrate ResultSpec to kotlin-test (#3251)

Co-authored-by: Simon Vergauwen <[email protected]>

* refactor: migrate StructuredConcurrencySpec to kotlin-test (#3252)

* refactor: migrate TraceSpec to kotlin-test (#3253)

* refactor: migrate GeneratorsTest to kotlin-test (#3254)

* Refactor RaceNJvmTest from Kotest Plugin to Kotlin-test runtime (#3261)

Closes #3212

Co-authored-by: Alejandro Serrano <[email protected]>

* Update ArrowResponseEAdapterTest.kt (#3264)

* Update ArrowResponseEAdapterTest.kt

* Update ArrowResponseEAdapterTest.kt

---------

Co-authored-by: Simon Vergauwen <[email protected]>
Co-authored-by: Alejandro Serrano <[email protected]>

* Update CollectionsSyntaxTests.kt (#3273)

* Update CollectionsSyntaxTests.kt

* Update CollectionsSyntaxTests.kt

---------

Co-authored-by: Simon Vergauwen <[email protected]>
Co-authored-by: Alejandro Serrano <[email protected]>

* Update NonFatalJvmTest.kt (#3277)

* Update ArrowEitherCallAdapterTest.kt (#3278)

* Update ArrowEitherCallAdapterTest.kt

* Update ArrowEitherCallAdapterTest.kt

* Move tests from `serialization` and `functions` completely to `kotlin.test` (#3289)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix problems with tests

* Remove a bunch of warnings in `arrow-2` (#3282)

Co-authored-by: serras <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Finish transition to `kotlin.test` of `retrofit` and `fx-coroutines` (#3291)

* Fix problems with concurrency in tests, take 8

* Port rest of `arrow-core` to `kotlin.test` (#3292)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Implement `fixedRate` using monotonic time source (#3294)

Co-authored-by: serras <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Port `optics` tests to `kotlin.test` (#3295)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Add or fix contracts in Raise (#3293)

* Add or fix contracts in Raise

* Make contracts less strict

* Get back contract on Either

* ignoreErrors should also be AT_MOST_ONCE

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Alternate `SingletonRaise` (#3328)

Co-authored-by: Youssef Shoaib <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: serras <[email protected]>

* Remove (unused) tests for high-arity module

* Fix tests + Knit

* Fix merge NullableSpec

* Regression in Arb.list?

* Fix test for nonEmptyList

* Develocity warning

* Fix merge problem with optics-ksp-plugin

* Fix timeout in test

---------

Co-authored-by: Simon Vergauwen <[email protected]>
Co-authored-by: Sam Cooper <[email protected]>
Co-authored-by: Marc Moreno Ferrer <[email protected]>
Co-authored-by: Javier Segovia Córdoba <[email protected]>
Co-authored-by: Alphonse Bendt <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andreas Storesund Madsen <[email protected]>
Co-authored-by: molikuner <[email protected]>
Co-authored-by: Jonathan Lagneaux <[email protected]>
Co-authored-by: Marcus Ilgner <[email protected]>
Co-authored-by: Chris Black <[email protected]>
Co-authored-by: Tejas Mate <[email protected]>
Co-authored-by: HyunWoo Lee (Nunu Lee) <[email protected]>
Co-authored-by: serras <[email protected]>
Co-authored-by: Youssef Shoaib <[email protected]>
  • Loading branch information
16 people authored Apr 24, 2024
1 parent 132de8c commit 2613059
Show file tree
Hide file tree
Showing 558 changed files with 9,032 additions and 36,159 deletions.
161 changes: 161 additions & 0 deletions .github/unused_workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: "Publish all libs, Arrow-stack and Docs"

on:
push:
tags:
- '**'

env:
BASEDIR: ${{github.workspace}}/arrow-libs
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx5g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PWD: ${{ secrets.SONATYPE_PWD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
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 }}'
GRADLE_PUBLISH_KEY: '${{ secrets.GRADLE_PUBLISH_KEY }}'
GRADLE_PUBLISH_SECRET: '${{ secrets.GRADLE_PUBLISH_SECRET }}'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_CLOUDFRONT_ID: ${{ secrets.AWS_CLOUDFRONT_ID }}
AWS_DEFAULT_REGION: eu-west-1
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
JEKYLL_ENV: production
S3_BUCKET: ${{ secrets.S3_BUCKET }}

jobs:
publish:
timeout-minutes: 90
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- name: assemble
uses: gradle/gradle-build-action@v2
with:
arguments: assemble -Pkotlin.mpp.enableCompatibilityMetadataVariant=true

- name: Get Arrow version
id: version
run: echo "::set-output name=arrow::$(head -n 1 build/semver/version.txt)"

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: 'reports-${{ matrix.os }}'
path: '**/build/reports/**'

- name: Publish alpha/beta/rc version
uses: gradle/gradle-build-action@v2
if: |
contains(steps.version.outputs.arrow, 'alpha') ||
contains(steps.version.outputs.arrow, 'beta') ||
contains(steps.version.outputs.arrow, 'rc')
with:
arguments: -Pkotlin.mpp.enableCompatibilityMetadataVariant=true publishToSonatype closeAndReleaseSonatypeStagingRepository

- name: Publish final version
uses: gradle/gradle-build-action@v2
if: |
!contains(steps.version.outputs.arrow, 'alpha') &&
!contains(steps.version.outputs.arrow, 'beta') &&
!contains(steps.version.outputs.arrow, 'rc')
with:
arguments: -Pkotlin.mpp.enableCompatibilityMetadataVariant=true publishToSonatype closeSonatypeStagingRepository

- name: Prepare environment
working-directory: arrow-site
run: |
mkdir $BASEDIR/logs
brew install tree
bundle config set --local path 'vendor/bundle'
bundle install --gemfile Gemfile
- name: Create API doc
uses: gradle/gradle-build-action@v2
with:
arguments: -Pkotlin.mpp.enableCompatibilityMetadataVariant=true dokkaGfm

- name: Build release directory (/docs)
working-directory: arrow-site
if: |
!contains(steps.version.outputs.arrow, 'alpha') &&
!contains(steps.version.outputs.arrow, 'beta') &&
!contains(steps.version.outputs.arrow, 'rc')
run: |
bundle exec jekyll build -b docs -s docs
tree _site > $BASEDIR/logs/content_docs-${{ steps.version.outputs.arrow }}.log
- name: Publish documentation (/docs)
working-directory: arrow-site
if: |
!contains(steps.version.outputs.arrow, 'alpha') &&
!contains(steps.version.outputs.arrow, 'beta') &&
!contains(steps.version.outputs.arrow, 'rc')
run: |
echo ">>> Latest release" >> $BASEDIR/logs/aws_sync.log
${GITHUB_WORKSPACE}/.github/scripts/sync-docs-with-aws.sh
- name: Build release directory (/docs/<major.minor>)
working-directory: arrow-site
if: |
!contains(steps.version.outputs.arrow, 'alpha') &&
!contains(steps.version.outputs.arrow, 'beta') &&
!contains(steps.version.outputs.arrow, 'rc')
run: |
bundle exec jekyll build -b docs/${{ steps.version.outputs.arrow }} -s docs
tree _site > $BASEDIR/logs/content_docs-${{ steps.version.outputs.arrow }}.log
- name: Publish release directory (/docs/<major.minor>)
working-directory: arrow-site
if: |
!contains(steps.version.outputs.arrow, 'alpha') &&
!contains(steps.version.outputs.arrow, 'beta') &&
!contains(steps.version.outputs.arrow, 'rc')
run: |
aws s3 sync _site s3://$S3_BUCKET/docs/${{ steps.version.outputs.arrow }} --delete --exclude "/CNAME" --exclude "/code/*" --exclude "/index.html" --exclude "/redirects.json" >> $BASEDIR/logs/aws_sync.log
- name: Build latest version (/docs/next)
working-directory: arrow-site
run: |
bundle exec jekyll build -b docs/next -s docs
tree _site > $BASEDIR/logs/content_docs-next.log
- name: Publish latest version (/docs/next)
working-directory: arrow-site
run: |
aws s3 sync _site s3://$S3_BUCKET/docs/next --delete --exclude "/CNAME" --exclude "/code/*" --exclude "/index.html" --exclude "/redirects.json" >> $BASEDIR/logs/aws_sync.log
- name: Publish sitemap.xml
if: |
!contains(steps.version.outputs.arrow, 'alpha') &&
!contains(steps.version.outputs.arrow, 'beta') &&
!contains(steps.version.outputs.arrow, 'rc')
run: |
${GITHUB_WORKSPACE}/.github/scripts/create-sitemap.sh > sitemap.xml
aws s3 cp sitemap.xml s3://$S3_BUCKET/sitemap.xml >> $BASEDIR/logs/aws_sync.log
- name: Invalidate CloudFront cache
run: aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_ID --paths "/*"

- name: List S3
run: aws s3 ls s3://$S3_BUCKET --recursive --summarize > $BASEDIR/logs/site-content.log

- uses: actions/upload-artifact@v3
with:
name: logs
path: arrow-libs/logs.
20 changes: 12 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: "Publish all libs, Arrow-stack and Docs"

on:
workflow_dispatch:
branches: [main]
inputs:
version:
description: 'Version'
required: true
type: string
push:
branch:
- 'arrow-2'
#on:
# workflow_dispatch:
# branches: [main]
# inputs:
# version:
# description: 'Version'
# required: true
# type: string

env:
BASEDIR: ${{github.workspace}}/arrow-libs
Expand Down Expand Up @@ -50,5 +54,5 @@ jobs:
name: 'reports-${{ matrix.os }}'
path: '**/build/reports/**'

- name: Publish final version
- name: Publish next major SNAPSHOT version
run: ./gradlew -Pversion=${{ inputs.version }} publishToSonatype closeSonatypeStagingRepository
60 changes: 30 additions & 30 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ jobs:

js:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -327,32 +327,32 @@ jobs:
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/**'
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 wasmJsTest -Penable_wasm=true --scan

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports-wasm'
path: '**/build/reports/**'
12 changes: 11 additions & 1 deletion arrow-libs/core/arrow-atomic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@file:Suppress("DSL_SCOPE_VIOLATION")

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id(libs.plugins.kotlin.multiplatform.get().pluginId)
alias(libs.plugins.arrowGradleConfig.kotlin)
Expand Down Expand Up @@ -34,9 +36,9 @@ kotlin {
dependencies {
implementation(projects.arrowFxCoroutines)
implementation(libs.kotlin.test)
implementation(libs.coroutines.test)
implementation(libs.kotest.assertionsCore)
implementation(libs.kotest.property)
implementation(libs.coroutines.test)
}
}
}
Expand All @@ -49,3 +51,11 @@ kotlin {
}
}
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-Xexpect-actual-classes"
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2613059

Please sign in to comment.