Skip to content

Commit f6fd864

Browse files
Merge pull request #250 from Vaibhavdixit02/master
Load Zygote in extension by checking for julia <1.9 support
2 parents 2005445 + 0e98c8f commit f6fd864

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
version:
1919
- '1' # Latest Release
2020
- '~1.6' # Current LTS
21-
- '^1.9.0-0'
21+
- '1.8'
2222
steps:
2323
- uses: actions/checkout@v3
2424
- uses: julia-actions/setup-julia@v1

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ VertexSafeGraphs = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f"
2727
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
2828

2929
[extensions]
30-
SparseDiffToolsZygote = "Zygote"
30+
SparseDiffToolsZygoteExt = "Zygote"
3131

3232
[compat]
3333
ADTypes = "0.1"

ext/SparseDiffToolsZygote.jl renamed to ext/SparseDiffToolsZygoteExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
module SparseDiffToolsZygote
1+
module SparseDiffToolsZygoteExt
22

3-
import Zygote
3+
isdefined(Base, :get_extension) ? (import Zygote) : (using ..Zygote)
44
using ADTypes
55
using LinearAlgebra
66
using SparseDiffTools: SparseDiffTools, DeivVecTag, AutoDiffVJP

src/SparseDiffTools.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ function auto_vecjac! end
8484
@static if !isdefined(Base, :get_extension)
8585
function __init__()
8686
Requires.@require Zygote="e88e6eb3-aa80-5325-afca-941959d7151f" begin
87-
include("../ext/SparseDiffToolsZygote.jl")
88-
@reexport using .SparseDiffToolsZygote
87+
include("../ext/SparseDiffToolsZygoteExt.jl")
88+
@reexport using .SparseDiffToolsZygoteExt
8989
end
9090
end
9191
end

0 commit comments

Comments
 (0)