Skip to content

Commit c6336d0

Browse files
halotukozakclaude
andcommitted
Merge upstream/main into series/3.x-avs
Sync fork with upstream monix/monix:main. Brings in VarHandle atomics, Scala 3.8.2, updated dependencies, scalafmt formatting, and mima refactoring. Conflicts resolved preferring upstream style. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 parents 3a1b361 + 13aa053 commit c6336d0

1,218 files changed

Lines changed: 11842 additions & 14655 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/build.yml

Lines changed: 118 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ name: build
22

33
on:
44
pull_request:
5-
branches: [ 'series/*' ]
5+
branches: ['series/*', 'main']
66
push:
7-
branches: [ 'series/*' ]
8-
tags: [ "v[0-9]+*" ]
7+
branches: ['series/*', 'main']
8+
tags: ["v[0-9]+*"]
99

1010
jobs:
1111
jvm-tests:
1212
name: JVM / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-22.04
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
java: [ 11, 17, 21, 25 ]
17+
java: [ 17, 21 ]
1818
# WARN: build.sbt depends on this key path, as scalaVersion and
1919
# crossScalaVersions is determined from it
20-
scala: [ 2.13.18, 3.3.7 ]
20+
scala: [ 2.13.18, 3.8.2 ]
2121

2222
env:
2323
CI: true
@@ -26,9 +26,8 @@ jobs:
2626
- uses: actions/checkout@v4
2727
- uses: actions/setup-java@v4
2828
with:
29+
java-version: "${{ matrix.java }}"
2930
distribution: temurin
30-
java-version: ${{ matrix.java }}
31-
- uses: sbt/setup-sbt@v1
3231

3332
- name: Cache ivy2
3433
uses: actions/cache@v4
@@ -56,17 +55,24 @@ jobs:
5655
PLATFORM: ${{ matrix.java }}
5756
SBT_COMMAND: ci-jvm
5857

58+
- name: sbt reactiveTests/test
59+
run: ./.github/scripts/exec-sbt-command
60+
env:
61+
SCALA_VERSION: ${{ matrix.scala }}
62+
PLATFORM: ${{ matrix.java }}
63+
SBT_COMMAND: "reactiveTests/test"
64+
5965
js-tests:
6066
name: JS / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
61-
runs-on: ubuntu-latest
67+
runs-on: ubuntu-22.04
6268
strategy:
6369
fail-fast: false
6470
matrix:
6571
# WARN: build.sbt depends on this key path, as scalaVersion and
6672
# crossScalaVersions is determined from it
6773
include:
68-
- { java: 11, scala: 2.13.18 }
69-
- { java: 11, scala: 3.3.7 }
74+
- { java: 17, scala: 2.13.18 }
75+
- { java: 17, scala: 3.8.2 }
7076

7177
env:
7278
CI: true
@@ -75,9 +81,8 @@ jobs:
7581
- uses: actions/checkout@v4
7682
- uses: actions/setup-java@v4
7783
with:
84+
java-version: "${{ matrix.java }}"
7885
distribution: temurin
79-
java-version: ${{ matrix.java }}
80-
- uses: sbt/setup-sbt@v1
8186

8287
- name: Cache ivy2
8388
uses: actions/cache@v4
@@ -101,7 +106,7 @@ jobs:
101106
- name: Setup NodeJS
102107
uses: actions/setup-node@v4
103108
with:
104-
node-version: 14
109+
node-version: 20
105110

106111
- name: sbt ci-js
107112
run: |
@@ -113,21 +118,24 @@ jobs:
113118

114119
mima:
115120
name: Mima / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
116-
runs-on: ubuntu-latest
121+
runs-on: ubuntu-22.04
122+
123+
env:
124+
CI: true
125+
117126
strategy:
118127
fail-fast: false
119128
matrix:
120129
include:
121-
- { java: 11, scala: 2.13.18 }
122-
- { java: 11, scala: 3.3.7 }
130+
- { java: 17, scala: 2.13.18 }
131+
- { java: 17, scala: 3.8.2 }
123132

124133
steps:
125134
- uses: actions/checkout@v4
126135
- uses: actions/setup-java@v4
127136
with:
137+
java-version: "${{ matrix.java }}"
128138
distribution: temurin
129-
java-version: ${{ matrix.java }}
130-
- uses: sbt/setup-sbt@v1
131139

132140
- name: Cache ivy2
133141
uses: actions/cache@v4
@@ -155,24 +163,26 @@ jobs:
155163
SCALA_VERSION: ${{ matrix.scala }}
156164
SBT_COMMAND: mimaReportBinaryIssues
157165

158-
unidoc:
159-
name: Unidoc / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
160-
runs-on: ubuntu-latest
166+
scalafmt:
167+
name: Scalafmt / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
168+
runs-on: ubuntu-22.04
169+
170+
env:
171+
CI: true
172+
161173
strategy:
162174
fail-fast: false
163175
matrix:
164176
include:
165-
- { java: 11, scala: 2.13.18 }
166-
# TODO: enable this after it works!
167-
# - { java: 11, scala: 3.3.5 }
177+
- { java: 17, scala: 2.13.18 }
178+
- { java: 17, scala: 3.8.2 }
168179

169180
steps:
170181
- uses: actions/checkout@v4
171182
- uses: actions/setup-java@v4
172183
with:
184+
java-version: "${{ matrix.java }}"
173185
distribution: temurin
174-
java-version: ${{ matrix.java }}
175-
- uses: sbt/setup-sbt@v1
176186

177187
- name: Cache ivy2
178188
uses: actions/cache@v4
@@ -193,49 +203,100 @@ jobs:
193203
path: ~/.sbt
194204
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
195205

196-
- name: sbt unidoc
206+
- name: sbt scalafmtCheckAll
197207
run: |
198208
./.github/scripts/exec-sbt-command
199209
env:
200210
SCALA_VERSION: ${{ matrix.scala }}
201-
SBT_COMMAND: unidoc
211+
SBT_COMMAND: "scalafmtCheckAll scalafmtSbtCheck"
202212

203-
all_tests:
204-
name: All Tests
205-
needs: [ jvm-tests, js-tests, mima, unidoc ]
206-
runs-on: ubuntu-latest
207-
steps:
208-
- name: Ack
209-
run: |
210-
echo "All done."
213+
unidoc:
214+
name: Unidoc / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
215+
runs-on: ubuntu-22.04
211216

212-
publish:
213-
name: Publish to Sonatype
214-
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/3.x')
215-
needs: [ all_tests ]
217+
env:
218+
CI: true
219+
220+
strategy:
221+
fail-fast: false
222+
matrix:
223+
include:
224+
- { java: 17, scala: 2.13.18 }
225+
- { java: 17, scala: 3.8.2 }
216226

217-
runs-on: ubuntu-latest
218227
steps:
219228
- uses: actions/checkout@v4
220-
with:
221-
fetch-depth: 100
222-
223229
- uses: actions/setup-java@v4
224230
with:
231+
java-version: "${{ matrix.java }}"
225232
distribution: temurin
226-
java-version: 11
227-
- uses: sbt/setup-sbt@v1
228233

229-
- name: Install GnuPG2
230-
run: |
231-
./.github/scripts/setup-pgp
234+
- name: Cache ivy2
235+
uses: actions/cache@v4
236+
with:
237+
path: ~/.ivy2/cache
238+
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
239+
240+
- name: Cache coursier (linux)
241+
if: contains(runner.os, 'linux')
242+
uses: actions/cache@v4
243+
with:
244+
path: ~/.cache/coursier/v1
245+
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
232246

233-
- name: .github/scripts/release
247+
- name: Cache sbt
248+
uses: actions/cache@v4
249+
with:
250+
path: ~/.sbt
251+
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
252+
253+
- name: sbt unidoc
234254
run: |
235-
.github/scripts/release
255+
./.github/scripts/exec-sbt-command
236256
env:
237-
PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }}
238-
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
239-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
240-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
241-
PUBLISH_STABLE_VERSION: false
257+
SCALA_VERSION: ${{ matrix.scala }}
258+
SBT_COMMAND: unidoc
259+
260+
all_tests:
261+
name: All Tests
262+
if: always()
263+
needs: [ jvm-tests, js-tests, mima, scalafmt, unidoc ]
264+
runs-on: ubuntu-22.04
265+
steps:
266+
- name: Validate required tests
267+
uses: re-actors/alls-green@release/v1
268+
with:
269+
jobs: ${{ toJSON(needs) }}
270+
271+
# publish:
272+
# name: Publish to Sonatype
273+
# if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
274+
# needs: [ all_tests ]
275+
276+
# env:
277+
# CI: true
278+
279+
# runs-on: ubuntu-22.04
280+
# steps:
281+
# - uses: actions/checkout@v4
282+
# with:
283+
# fetch-depth: 100
284+
285+
# - uses: actions/setup-java@v4
286+
# with:
287+
# java-version: 17
288+
# distribution: temurin
289+
290+
# - name: Install GnuPG2
291+
# run: |
292+
# ./.github/scripts/setup-pgp
293+
294+
# - name: .github/scripts/release
295+
# run: |
296+
# .github/scripts/release
297+
# env:
298+
# PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }}
299+
# PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
300+
# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
301+
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
302+
# PUBLISH_STABLE_VERSION: false

.github/workflows/manual-publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
ref_to_publish:
77
description: 'Ref (branch or tag)'
88
required: true
9-
default: 'refs/heads/series/3.x'
9+
default: 'refs/heads/main'
1010
stable_version:
1111
description: 'Stable version? (true=staging, false=snapshot)'
1212
required: true
@@ -16,18 +16,20 @@ jobs:
1616
publish:
1717
name: Publish to Sonatype (Request)
1818

19-
runs-on: ubuntu-latest
19+
env:
20+
CI: true
21+
22+
runs-on: ubuntu-20.04
2023
steps:
2124
- uses: actions/checkout@v4
2225
with:
2326
fetch-depth: 100
2427
ref: ${{ github.event.inputs.ref_to_publish }}
2528

26-
- uses: actions/setup-java@v4
29+
- uses: actions/setup-java@v3
2730
with:
28-
distribution: temurin
29-
java-version: 11
30-
- uses: sbt/setup-sbt@v1
31+
java-version: 8
32+
distribution: adopt
3133

3234
- name: Install GnuPG2
3335
run: |

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ TAGS
1515
.tags
1616
.metals
1717
.bloop
18+
.bsp
1819
metals.sbt
1920
.vscode
2021
.bsp
21-
.planning/
22+
*.sublime*
23+
.sisyphus/

.scala-steward.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pullRequests.frequency = "7 days"
22

3-
updates.pin = [
4-
{ groupId = "org.typelevel", artifactId="cats-effect", version = "2." },
5-
{ groupId = "org.typelevel", artifactId="cats-effect-laws", version = "2." },
6-
]
3+
#updates.pin = [
4+
# { groupId = "org.typelevel", artifactId="cats-effect", version = "2." },
5+
# { groupId = "org.typelevel", artifactId="cats-effect-laws", version = "2." },
6+
#]

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ align.tokens = [
1010
]
1111

1212
fileOverride {
13-
"glob:**/src/main/scala_3.0/**" {
13+
"glob:**/src/main/scala-3*/**" {
1414
runner.dialect = scala3
1515
},
1616
"glob:**/*.sbt" {

AGENTS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Agent Instructions for Monix
2+
3+
This file contains mandatory rules for AI agents (Copilot, Claude, Cursor, etc.) working on this repository.
4+
**Any violation is a CI-breaking mistake!**
5+
6+
---
7+
8+
## Code rules
9+
10+
- Never workaround the compiler, make an effort to solve errors in an idiomatic way:
11+
- Avoid `asInstanceOf` downcasting, unless there's no other way (e.g., untagged union types in Scala 3).
12+
- `@nowarn` annotations, or other ways for supressing warnings/errors, are not permitted without the user's consent.
13+
- We fix warnings, we don't ignore them.
14+
- Use package imports, instead of fully qualified names.
15+
- Make an effort to write idiomatic, yet performant Scala code.

0 commit comments

Comments
 (0)