PSA: Add Downgrade CI to Better Check Version Compatibility

ChrisRackauckas
Sun, 11 Feb 2024 12:56:01 +0000
Community

A call to all Julia package authors to add Downgrade CI with scripts to copy-paste! This is an article about how to improve testing of package version compatibility and new systems we have adopted in SciML that I would like to see throughout the rest of the ecosystem. For full details see the article:

Stochastic Lifestyle – 11 Feb 24

Semantic Versioning (Semver) is flawed, and Downgrade CI is required to fix it...

Semantic versioning is great. If you don’t know what it is, it’s just a versioning scheme for software that goes MAJOR.MINOR.PATCH, where MAJOR version when you make incompatible API changes MINOR version when you add functionality in a backward...

Est. reading time: 9 minutes

I want to start testing my lower bounds!

Good, just steal this script SciMLBase.jl/.github/workflows/Downgrade.yml at v2.24.0 · SciML/SciMLBase.jl · GitHub

name: Downgrade
on:
  pull_request:
    branches:
      - master
    paths-ignore:
      - 'docs/**'
  push:
    branches:
      - master
    paths-ignore:
      - 'docs/**'
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        version: ['1']
    steps:
      - uses: actions/checkout@v4
      - uses: julia-actions/setup-julia@v1
        with:
          version: ${{ matrix.version }}
      - uses: cjdoris/julia-downgrade-compat-action@v1
        with:
          skip: Pkg,TOML
      - uses: julia-actions/julia-buildpkg@v1
      - uses: julia-actions/julia-runtest@v1

slap that into .github/workflows/Downgrade.yml and you’ll get the new CI group running.

Call to Action: Help Out?

Downgrade CI is actually really hard to get working the first time. Lower bounds can be old. If you have a little bit of time, help out by adding downgrade CI to a package you love. Note that it will take a bit of sweat. You most likely will need to bump some lower bounds, so this may take an hour or so. My recommendation is to be conservative and bump packages as high as possible because otherwise it’s simply too difficult to find the right granularity.

Good luck, I hope by this time next year everyone will have CI running that checks minimum versions and we should see a lot less version compatibility issues!

36 posts - 17 participants