From 2c6181cd2a43bedb42378b200a0024263f277e43 Mon Sep 17 00:00:00 2001 From: JamesWrigley Date: Sun, 29 Mar 2026 20:10:33 +0200 Subject: [PATCH 1/2] Run integration tests in a temporary environment This avoids making ChainRulesCore a dependency of the downstream package, which can cause Aqua failures. --- .github/workflows/IntegrationTest.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/IntegrationTest.yml b/.github/workflows/IntegrationTest.yml index 154d4bd..36b435b 100644 --- a/.github/workflows/IntegrationTest.yml +++ b/.github/workflows/IntegrationTest.yml @@ -7,7 +7,7 @@ on: jobs: test: - name: ${{ matrix.package.repo }} + name: ${{ matrix.package.name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -15,12 +15,12 @@ jobs: julia-version: [1] os: [ubuntu-latest] package: - - {user: JuliaDiff, repo: ChainRulesTestUtils.jl} - - {user: JuliaDiff, repo: ChainRules.jl} - - {user: JuliaMath, repo: SpecialFunctions.jl} - - {user: invenia, repo: BlockDiagonals.jl} - - {user: invenia, repo: PDMatsExtras.jl} - - {user: PumasAI, repo: DataInterpolations.jl} + - {user: JuliaDiff, name: ChainRulesTestUtils} + - {user: JuliaDiff, name: ChainRules} + - {user: JuliaMath, name: SpecialFunctions} + - {user: JuliaArrays, name: BlockDiagonals} + - {user: invenia, name: PDMatsExtras} + - {user: SciML, name: DataInterpolations} steps: - uses: actions/checkout@v4 @@ -28,21 +28,22 @@ jobs: with: version: ${{ matrix.julia-version }} arch: x64 + - uses: julia-actions/cache@v3 - uses: julia-actions/julia-buildpkg@latest - name: Clone Downstream uses: actions/checkout@v4 with: - repository: ${{ matrix.package.user }}/${{ matrix.package.repo }} + repository: ${{ matrix.package.user }}/${{ matrix.package.name }}.jl path: downstream - name: Load this and run the downstream tests - shell: julia --project=downstream {0} + shell: julia --project=@temp {0} run: | using Pkg try # force it to use this PR's version of the package - Pkg.develop(PackageSpec(path=".")) # ResolverError with main deps may be thrown here + Pkg.develop([PackageSpec(path="."), PackageSpec(path="downstream")]) # ResolverError with main deps may be thrown here Pkg.update() - Pkg.test() # ResolverError with test deps may be thrown here (before test process starts) + Pkg.test("${{ matrix.package.name }}") # ResolverError with test deps may be thrown here (before test process starts) catch err err isa Pkg.Resolve.ResolverError || rethrow() # If we can't resolve that means this is incompatible by SemVer and this is fine From 06b333bb3b81ae562399adeb7e6c6812670642b9 Mon Sep 17 00:00:00 2001 From: JamesWrigley Date: Sun, 29 Mar 2026 12:05:32 +0200 Subject: [PATCH 2/2] Add compat for ChainRulesCore v2 --- Project.toml | 4 ++-- test/to_vec.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index a0a1ebc..929bd68 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "FiniteDifferences" uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" -version = "0.12.33" +version = "0.12.34" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" @@ -12,7 +12,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" [compat] -ChainRulesCore = "0.10.3, 1" +ChainRulesCore = "0.10.3, 1, 2" LinearAlgebra = "<0.0.1, 1" Printf = "<0.0.1, 1" Random = "<0.0.1, 1" diff --git a/test/to_vec.jl b/test/to_vec.jl index 9de188d..774ab4c 100644 --- a/test/to_vec.jl +++ b/test/to_vec.jl @@ -190,7 +190,7 @@ end if T == Float64 test_to_vec((a=5, b=randn(10, 11), c=(5, 4, 3)); check_inferred = VERSION ≥ v"1.2") else - test_to_vec((a=3 + 2im, b=randn(T, 10, 11), c=(5+im, 2-im, 1+im)); check_inferred = VERSION ≥ v"1.2") + test_to_vec((a=3 + 2im, b=randn(T, 10, 11), c=(5+im, 2-im, 1+im)); check_inferred = v"1.2" <= VERSION < v"1.12") end end @testset "Dictionary" begin