Skip to content

Commit b15e911

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 b15e911

File tree

1,218 files changed

+11848
-14633
lines changed

Some content is hidden

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

1,218 files changed

+11848
-14633
lines changed

.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: 96 additions & 29 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, 25 ]
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,8 +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 }}
3131
- uses: sbt/setup-sbt@v1
3232

3333
- name: Cache ivy2
@@ -56,17 +56,24 @@ jobs:
5656
PLATFORM: ${{ matrix.java }}
5757
SBT_COMMAND: ci-jvm
5858

59+
- name: sbt reactiveTests/test
60+
run: ./.github/scripts/exec-sbt-command
61+
env:
62+
SCALA_VERSION: ${{ matrix.scala }}
63+
PLATFORM: ${{ matrix.java }}
64+
SBT_COMMAND: "reactiveTests/test"
65+
5966
js-tests:
6067
name: JS / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
61-
runs-on: ubuntu-latest
68+
runs-on: ubuntu-22.04
6269
strategy:
6370
fail-fast: false
6471
matrix:
6572
# WARN: build.sbt depends on this key path, as scalaVersion and
6673
# crossScalaVersions is determined from it
6774
include:
68-
- { java: 11, scala: 2.13.18 }
69-
- { java: 11, scala: 3.3.7 }
75+
- { java: 17, scala: 2.13.18 }
76+
- { java: 17, scala: 3.8.2 }
7077

7178
env:
7279
CI: true
@@ -75,8 +82,8 @@ jobs:
7582
- uses: actions/checkout@v4
7683
- uses: actions/setup-java@v4
7784
with:
85+
java-version: "${{ matrix.java }}"
7886
distribution: temurin
79-
java-version: ${{ matrix.java }}
8087
- uses: sbt/setup-sbt@v1
8188

8289
- name: Cache ivy2
@@ -101,7 +108,7 @@ jobs:
101108
- name: Setup NodeJS
102109
uses: actions/setup-node@v4
103110
with:
104-
node-version: 14
111+
node-version: 20
105112

106113
- name: sbt ci-js
107114
run: |
@@ -113,20 +120,24 @@ jobs:
113120

114121
mima:
115122
name: Mima / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
116-
runs-on: ubuntu-latest
123+
runs-on: ubuntu-22.04
124+
125+
env:
126+
CI: true
127+
117128
strategy:
118129
fail-fast: false
119130
matrix:
120131
include:
121-
- { java: 11, scala: 2.13.18 }
122-
- { java: 11, scala: 3.3.7 }
132+
- { java: 17, scala: 2.13.18 }
133+
- { java: 17, scala: 3.8.2 }
123134

124135
steps:
125136
- uses: actions/checkout@v4
126137
- uses: actions/setup-java@v4
127138
with:
139+
java-version: "${{ matrix.java }}"
128140
distribution: temurin
129-
java-version: ${{ matrix.java }}
130141
- uses: sbt/setup-sbt@v1
131142

132143
- name: Cache ivy2
@@ -155,23 +166,74 @@ jobs:
155166
SCALA_VERSION: ${{ matrix.scala }}
156167
SBT_COMMAND: mimaReportBinaryIssues
157168

169+
scalafmt:
170+
name: Scalafmt / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
171+
runs-on: ubuntu-22.04
172+
173+
env:
174+
CI: true
175+
176+
strategy:
177+
fail-fast: false
178+
matrix:
179+
include:
180+
- { java: 17, scala: 2.13.18 }
181+
- { java: 17, scala: 3.8.2 }
182+
183+
steps:
184+
- uses: actions/checkout@v4
185+
- uses: actions/setup-java@v4
186+
with:
187+
java-version: "${{ matrix.java }}"
188+
distribution: temurin
189+
- uses: sbt/setup-sbt@v1
190+
191+
- name: Cache ivy2
192+
uses: actions/cache@v4
193+
with:
194+
path: ~/.ivy2/cache
195+
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
196+
197+
- name: Cache coursier (linux)
198+
if: contains(runner.os, 'linux')
199+
uses: actions/cache@v4
200+
with:
201+
path: ~/.cache/coursier/v1
202+
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
203+
204+
- name: Cache sbt
205+
uses: actions/cache@v4
206+
with:
207+
path: ~/.sbt
208+
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
209+
210+
- name: sbt scalafmtCheckAll
211+
run: |
212+
./.github/scripts/exec-sbt-command
213+
env:
214+
SCALA_VERSION: ${{ matrix.scala }}
215+
SBT_COMMAND: "scalafmtCheckAll scalafmtSbtCheck"
216+
158217
unidoc:
159218
name: Unidoc / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
160-
runs-on: ubuntu-latest
219+
runs-on: ubuntu-22.04
220+
221+
env:
222+
CI: true
223+
161224
strategy:
162225
fail-fast: false
163226
matrix:
164227
include:
165-
- { java: 11, scala: 2.13.18 }
166-
# TODO: enable this after it works!
167-
# - { java: 11, scala: 3.3.5 }
228+
- { java: 17, scala: 2.13.18 }
229+
- { java: 17, scala: 3.8.2 }
168230

169231
steps:
170232
- uses: actions/checkout@v4
171233
- uses: actions/setup-java@v4
172234
with:
235+
java-version: "${{ matrix.java }}"
173236
distribution: temurin
174-
java-version: ${{ matrix.java }}
175237
- uses: sbt/setup-sbt@v1
176238

177239
- name: Cache ivy2
@@ -202,28 +264,33 @@ jobs:
202264

203265
all_tests:
204266
name: All Tests
205-
needs: [ jvm-tests, js-tests, mima, unidoc ]
206-
runs-on: ubuntu-latest
267+
if: always()
268+
needs: [ jvm-tests, js-tests, mima, scalafmt, unidoc ]
269+
runs-on: ubuntu-22.04
207270
steps:
208-
- name: Ack
209-
run: |
210-
echo "All done."
271+
- name: Validate required tests
272+
uses: re-actors/alls-green@release/v1
273+
with:
274+
jobs: ${{ toJSON(needs) }}
211275

212276
publish:
213277
name: Publish to Sonatype
214-
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/3.x')
278+
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/3.x-avs')
215279
needs: [ all_tests ]
216280

217-
runs-on: ubuntu-latest
281+
env:
282+
CI: true
283+
284+
runs-on: ubuntu-22.04
218285
steps:
219286
- uses: actions/checkout@v4
220287
with:
221288
fetch-depth: 100
222289

223290
- uses: actions/setup-java@v4
224291
with:
292+
java-version: 17
225293
distribution: temurin
226-
java-version: 11
227294
- uses: sbt/setup-sbt@v1
228295

229296
- name: Install GnuPG2

.github/workflows/manual-publish.yml

Lines changed: 6 additions & 3 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,7 +16,10 @@ 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-22.04
2023
steps:
2124
- uses: actions/checkout@v4
2225
with:
@@ -25,8 +28,8 @@ jobs:
2528

2629
- uses: actions/setup-java@v4
2730
with:
31+
java-version: 17
2832
distribution: temurin
29-
java-version: 11
3033
- uses: sbt/setup-sbt@v1
3134

3235
- name: Install GnuPG2

.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.

CHANGES.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## Version 3.5.0 (Mar 31, 2026)
2+
3+
This release updates Monix 3.x support baselines for modern JVM and Scala toolchains.
4+
5+
Breaking changes:
6+
7+
- JDK `17` is now the minimum supported runtime and build target.
8+
- JDK `21` is now part of the validated support matrix.
9+
- Scala `2.12` support is dropped.
10+
- Scala `3` is upgraded to `3.8.2`.
11+
- Legacy `sun.misc.Unsafe`-based internals were removed in favor of JDK `VarHandle`-based implementations.
12+
13+
This release was made possible by the work and feedback of:
14+
15+
- Alexandru Nedelcu (@alexandru)
16+
117
## Version 3.4.1 (May 7, 2022)
218

319
This is a minor bug-fixing release for the 3.x series.
@@ -1531,7 +1547,7 @@ Bug fixes:
15311547
Build:
15321548

15331549
- enabled the Scala
1534-
[Migration Manager](https://github.com/typesafehub/migration-manager)
1550+
[Migration Manager](https://github.com/lightbend/mima)
15351551
(MiMa) in `build.sbt` to check for backwards compatibility problems
15361552
- [Issue #322](https://github.com/monix/monix/issues/322):
15371553
Switch projects which use `CrossVersion.full/"org.scala-lang"`

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Monix project welcomes contributions from anybody wishing to participate.
44
All code or documentation that is provided must be licensed with Apache 2.0
5-
(see LICENSE.txt).
5+
(see `LICENSE.txt`).
66

77
## Code of Conduct
88

0 commit comments

Comments
 (0)