From 29e72fde0c807732aa62fa3b1712904f3b325bde Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Thu, 24 Oct 2024 00:36:33 +0100 Subject: [PATCH 1/4] Disable precompilation of BijectorsEnzymeExt --- ext/BijectorsEnzymeExt.jl | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ext/BijectorsEnzymeExt.jl b/ext/BijectorsEnzymeExt.jl index 1e8d8aa3..cbadb990 100644 --- a/ext/BijectorsEnzymeExt.jl +++ b/ext/BijectorsEnzymeExt.jl @@ -8,7 +8,23 @@ else using ..Bijectors: find_alpha end -@import_rrule typeof(find_alpha) Real Real Real -@import_frule typeof(find_alpha) Real Real Real +# Julia 1.11.1 caused a change in the ordering of precompilation for extensions. +# https://github.com/TuringLang/Bijectors.jl/issues/332 +# See https://github.com/JuliaLang/julia/issues/56204 +@static if v"1.11.1" <= VERSION < v"1.12" + function __init__() + if !Base.generating_output() + eval( + quote + @import_rrule typeof(find_alpha) Real Real Real + @import_frule typeof(find_alpha) Real Real Real + end, + ) + end + end +else + @import_rrule typeof(find_alpha) Real Real Real + @import_frule typeof(find_alpha) Real Real Real +end end From 614d1fb4ab2b9c73e950c07adfdbf40e6c641012 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Thu, 24 Oct 2024 01:09:40 +0100 Subject: [PATCH 2/4] Bump patch version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index d13289bf..e7498ac7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Bijectors" uuid = "76274a88-744f-5084-9051-94815aaf08c4" -version = "0.13.18" +version = "0.13.19" [deps] ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197" From a962770af44ada6c548b9d36822abbed6d4a8f17 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Thu, 24 Oct 2024 02:21:32 +0100 Subject: [PATCH 3/4] Swap import orders in test suite --- test/runtests.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 914c0e32..c565375a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,3 @@ -using Bijectors - using ChainRulesTestUtils using Combinatorics using DistributionsAD @@ -12,6 +10,9 @@ using ReverseDiff using Tracker using Zygote +# Place below `using Enzyme`, see https://github.com/TuringLang/Bijectors.jl/pull/333 +using Bijectors + using Random, LinearAlgebra, Test using Bijectors: From adc412d6dd2449be198deffdb2588fdf7ae5de9e Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Thu, 24 Oct 2024 21:19:28 +0100 Subject: [PATCH 4/4] Disable fail-fast on CI --- .github/workflows/AD.yml | 2 +- .github/workflows/Interface.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/AD.yml b/.github/workflows/AD.yml index 47ef8549..3777b346 100644 --- a/.github/workflows/AD.yml +++ b/.github/workflows/AD.yml @@ -9,8 +9,8 @@ on: jobs: test: runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.version == 'nightly' }} strategy: + fail-fast: false matrix: version: - '1.6' diff --git a/.github/workflows/Interface.yml b/.github/workflows/Interface.yml index ef1f4dc7..b305124e 100644 --- a/.github/workflows/Interface.yml +++ b/.github/workflows/Interface.yml @@ -10,8 +10,8 @@ on: jobs: test: runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.version == 'nightly' }} strategy: + fail-fast: false matrix: version: - '1.6'