CompatHelper PRs failing with force_latest_compatible_version due to Julia version constraints

I’m stuck on an issue with CompatHelper PRs failing CI and not sure the best way to fix it.

My package has:

julia = "1.9"
Peaks = "0.5, 0.6"

Peaks 0.5 works on Julia 1.9, but Peaks 0.6 requires Julia 1.10+.

In my normal CI testing, Peaks 0.5 is selected for Julia 1.9, and Peaks 0.6 is selected on Julia 1.10+. Everything works fine.

But CompatHelper PRs fail on Julia 1.9 with:

ERROR: Unsatisfiable requirements detected for package Peaks [18e31ff7]:
 ...
 ├─restricted to versions 0.6 by an explicit requirement
 └─restricted by julia compatibility requirements to versions: 0.1.0-0.5.3 — no versions left

It seems like force_latest_compatible_version=true (auto-enabled for CompatHelper PRs) tries to force Peaks 0.6 even though it’s incompatible with Julia 1.9.

What’s the right approach here?

1 Like

julia-runtest has an option for overriding the value of force_latest_compatible_version. You could set it to false for Julia 1.9, and auto for later Julia versions.

I seem to have this problem on later Julia versions too, and with Dependabot. See e.g. Update ComponentArrays requirement to 0.15.30 in /docs · JuliaDecisionFocusedLearning/ImplicitDifferentiation.jl@f4f34a1 · GitHub.

You can conditionally disable force_latest_compatible_version on older Julia versions by eg:

- uses: julia-actions/julia-runtest@...
  with:
    # Disable force_latest_compatible_version on Julia 1.9
    # Keep it enabled for later Julia versions
    force_latest_compatible_version: ${{ matrix.julia-version == '1.9' && 'false' || 'auto' }}

Assuming that your matrix has a variable named julia-version, eg:

      matrix:
        julia-version:
          - '1.9'
          - '1.10'
          - '1.11'
          - '1.12'

You can completely disable force_latest_compatible_version with eg:

- uses: julia-actions/julia-runtest@...
  with:
    force_latest_compatible_version: false

@gdalle In your case, you can try completely disabling force_latest_compatible_version.

I just tried it and then rebased the dependabot PR, same issue.
What’s even weirder is that it’s a docs Project update, but it’s the tests that fail.