Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
169 changes: 86 additions & 83 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,40 @@ on:
jobs:
jvm-tests:
name: JVM / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
java: [ 8, 11 ]
java: [ 17, 21 ]
# WARN: build.sbt depends on this key path, as scalaVersion and
# crossScalaVersions is determined from it
scala: [ 2.12.15, 2.13.8, 3.1.2 ]
scala: [ 2.13.18, 3.8.2 ]

env:
CI: true

steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v10
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: "adopt@1.${{ matrix.java }}"
java-version: "${{ matrix.java }}"
distribution: temurin

- name: Cache ivy2
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache sbt
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
Expand All @@ -63,49 +64,49 @@ jobs:

js-tests:
name: JS / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# WARN: build.sbt depends on this key path, as scalaVersion and
# crossScalaVersions is determined from it
include:
- { java: 8, scala: 2.12.15 }
- { java: 8, scala: 2.13.8 }
- { java: 8, scala: 3.1.2 }
- { java: 17, scala: 2.13.18 }
- { java: 17, scala: 3.8.2 }

env:
CI: true

steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v10
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: "adopt@1.${{ matrix.java }}"
java-version: "${{ matrix.java }}"
distribution: temurin

- name: Cache ivy2
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache sbt
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Setup NodeJS
uses: actions/setup-node@v2.1.2
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20

- name: sbt ci-js
run: |
Expand All @@ -117,7 +118,7 @@ jobs:

mima:
name: Mima / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
CI: true
Expand All @@ -126,31 +127,31 @@ jobs:
fail-fast: false
matrix:
include:
- { java: 8, scala: 2.12.15 }
- { java: 8, scala: 2.13.8 }
- { java: 8, scala: 3.1.2 }
- { java: 17, scala: 2.13.18 }
- { java: 17, scala: 3.8.2 }

steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v10
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: "adopt@1.${{ matrix.java }}"
java-version: "${{ matrix.java }}"
distribution: temurin

- name: Cache ivy2
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache sbt
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
Expand All @@ -164,7 +165,7 @@ jobs:

scalafmt:
name: Scalafmt / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
CI: true
Expand All @@ -173,31 +174,31 @@ jobs:
fail-fast: false
matrix:
include:
- { java: 11, scala: 2.12.15 }
- { java: 11, scala: 2.13.8 }
- { java: 11, scala: 3.1.2 }
- { java: 17, scala: 2.13.18 }
- { java: 17, scala: 3.8.2 }

steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v10
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: "adopt@1.${{ matrix.java }}"
java-version: "${{ matrix.java }}"
distribution: temurin

- name: Cache ivy2
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache sbt
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
Expand All @@ -207,11 +208,11 @@ jobs:
./.github/scripts/exec-sbt-command
env:
SCALA_VERSION: ${{ matrix.scala }}
SBT_COMMAND: scalafmtCheckAll
SBT_COMMAND: "scalafmtCheckAll scalafmtSbtCheck"

unidoc:
name: Unidoc / scala ${{ matrix.scala }}, jdk ${{ matrix.java }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
CI: true
Expand All @@ -220,30 +221,31 @@ jobs:
fail-fast: false
matrix:
include:
- { java: 8, scala: 2.13.8 }
- { java: 8, scala: 3.1.2 }
- { java: 17, scala: 2.13.18 }
- { java: 17, scala: 3.8.2 }

steps:
- uses: actions/checkout@v2
- uses: olafurpg/setup-scala@v10
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: "adopt@1.${{ matrix.java }}"
java-version: "${{ matrix.java }}"
distribution: temurin

- name: Cache ivy2
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache sbt
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
Expand All @@ -259,41 +261,42 @@ jobs:
name: All Tests
if: always()
needs: [ jvm-tests, js-tests, mima, scalafmt, unidoc ]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Validate required tests
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

publish:
name: Publish to Sonatype
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/4.x')
needs: [ all_tests ]

env:
CI: true

runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100

- uses: olafurpg/setup-scala@v10
with:
java-version: "adopt@1.8"

- name: Install GnuPG2
run: |
./.github/scripts/setup-pgp

- name: .github/scripts/release
run: |
.github/scripts/release
env:
PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
PUBLISH_STABLE_VERSION: false
# publish:
# name: Publish to Sonatype
# if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/series/4.x')
# needs: [ all_tests ]

# env:
# CI: true

# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 100

# - uses: actions/setup-java@v4
# with:
# java-version: 17
# distribution: temurin

# - name: Install GnuPG2
# run: |
# ./.github/scripts/setup-pgp

# - name: .github/scripts/release
# run: |
# .github/scripts/release
# env:
# PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }}
# PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
# PUBLISH_STABLE_VERSION: false
7 changes: 4 additions & 3 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ jobs:

runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 100
ref: ${{ github.event.inputs.ref_to_publish }}

- uses: olafurpg/setup-scala@v10
- uses: actions/setup-java@v3
with:
java-version: "adopt@1.8"
java-version: 8
distribution: adopt

- name: Install GnuPG2
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ metals.sbt
.vscode
.bsp
*.sublime*
.sisyphus/
1 change: 0 additions & 1 deletion .jvmopts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
-XX:ReservedCodeCacheSize=250M
-XX:+TieredCompilation
-XX:-UseGCOverheadLimit
-XX:+CMSClassUnloadingEnabled

15 changes: 15 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Agent Instructions for Monix

This file contains mandatory rules for AI agents (Copilot, Claude, Cursor, etc.) working on this repository.
**Any violation is a CI-breaking mistake!**

---

## Code rules

- Never workaround the compiler, make an effort to solve errors in an idiomatic way:
- Avoid `asInstanceOf` downcasting, unless there's no other way (e.g., untagged union types in Scala 3).
- `@nowarn` annotations, or other ways for supressing warnings/errors, are not permitted without the user's consent.
- We fix warnings, we don't ignore them.
- Use package imports, instead of fully qualified names.
- Make an effort to write idiomatic, yet performant Scala code.
Loading