Skip to content

Commit

Permalink
make HyperDualNumbers.jl a weak dependency (#180)
Browse files Browse the repository at this point in the history
* make HyperDualNumbers a weak dependency

* bump version
  • Loading branch information
ranocha authored Jun 20, 2023
1 parent a37ae26 commit c63b5b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Octavian"
uuid = "6fd5a793-0b7e-452c-907f-f8bfe9c57db4"
authors = ["Chris Elrod", "Dilum Aluthge", "Mason Protter", "contributors"]
version = "0.3.23"
version = "0.3.24"

[deps]
CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9"
Expand All @@ -19,9 +19,11 @@ VectorizationBase = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"

[weakdeps]
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
HyperDualNumbers = "50ceba7f-c3ee-5a84-a6e8-3ad40456ec97"

[extensions]
ForwardDiffExt = "ForwardDiff"
HyperDualNumbersExt = "HyperDualNumbers"

[compat]
CPUSummary = "0.1.26, 0.2.1"
Expand Down
11 changes: 5 additions & 6 deletions src/Octavian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,16 @@ include("complex_matmul.jl")

include("init.jl") # `Octavian.__init__()` is defined in this file

# TODO: This loads ForwardDiff unconditionally on Julia v1.6 - v1.8.
# TODO: This loads ForwardDiff.jl and HyperDualNumbers.jl
# unconditionally on Julia v1.6 - v1.8.
# It could be reconsidered when these older versions are not supported
# anymore. In this case, ForwardDiff should be removed from the
# dependencies and treated as weak dependency.
# anymore. In this case, these packages should be removed from the
# dependencies and treated only as weak dependency.
if !isdefined(Base, :get_extension)
include("../ext/ForwardDiffExt.jl")
include("../ext/HyperDualNumbersExt.jl")
end

# TODO: confirm when we need this extension
include("../ext/HyperDualNumbersExt.jl")

@static if VERSION >= v"1.8.0-beta1"
@setup_workload begin
# Putting some things in `setup` can reduce the size of the
Expand Down

2 comments on commit c63b5b9

@chriselrod
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/85895

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.24 -m "<description of version>" c63b5b9ee6a0a8ea3651eae5e4b3511f9246dceb
git push origin v0.3.24

Please sign in to comment.