diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 66c244f0..2c18f108 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v2 - uses: julia-actions/setup-julia@v1 with: - version: '1.9' + version: '1.10' - name: Install dependencies run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: Build and deploy diff --git a/src/fastgtpsa/temptps.jl b/src/fastgtpsa/temptps.jl index 4d33ebf6..893bf6f2 100644 --- a/src/fastgtpsa/temptps.jl +++ b/src/fastgtpsa/temptps.jl @@ -129,6 +129,9 @@ end # --- overloads for broadcasting compatibility --- Base.broadcastable(o::TempTPS) = Ref(o) +# NOTE: for some reason, merely overloading this function causes allocations +# in Julia 1.9. This is not the case in 1.10, so presumably this is a bug. +# Therefore, allocation tests only are performed on >=1.10 function Base.setindex!(A::Array{T}, x::TempTPS, i1::Int) where {T<:TPS} copy!(A[i1], x) rel_temp!(x) diff --git a/test/runtests.jl b/test/runtests.jl index a3b3b38d..9b9f90c7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1510,8 +1510,9 @@ end @test_opt benchmark_GTPSA3() end -# allocations only works on 1.10 -# maybe 1.9 includes the macro call allocations? +# NOTE: for some reason merely overloading Base.setindex!(A::Array{T}, x::TempTPS, i1::Int) where {T<:TPS}, +# in Julia 1.9 causes allocations. This is not the case in 1.10, so presumably this is a bug. +# Therefore, allocation tests only are performed on >=1.10 if VERSION >= v"1.10" @testset "FastGTPSA - Allocations" begin