Skip to content

Commit

Permalink
fix package extensions on Julia v1.9.0 (#115)
Browse files Browse the repository at this point in the history
* fix package extensions on Julia v1.9.0

* bump version
  • Loading branch information
ranocha authored May 30, 2023
1 parent 1781cf0 commit c04dc11
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RootedTrees"
uuid = "47965b36-3f3e-11e9-0dcf-4570dfd42a8c"
authors = ["Hendrik Ranocha <[email protected]> and contributors"]
version = "2.19.0"
version = "2.19.1"

[deps]
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
Expand Down
5 changes: 1 addition & 4 deletions ext/PlotsExt.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
module PlotsExt

# We do not check `isdefined(Base, :get_extension)` since Julia v1.9.0
# does not load package extensions when their dependency is loaded from
# the main environment
if VERSION >= v"1.9.1"
if isdefined(Base, :get_extension)
using Plots: Plots
else
import ..Plots: Plots
Expand Down
10 changes: 2 additions & 8 deletions src/RootedTrees.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ using Latexify: Latexify
using Preferences: @set_preferences!, @load_preference
using RecipesBase: RecipesBase

# We do not check `isdefined(Base, :get_extension)` since Julia v1.9.0
# does not load package extensions when their dependency is loaded from
# the main environment
if !(VERSION >= v"1.9.1")
if !isdefined(Base, :get_extension)
using Requires: @require
end

Expand Down Expand Up @@ -1444,10 +1441,7 @@ function __init__()
Threads.resize_nthreads!(PARTITION_ITERATOR_BUFFER_EDGE_SET_TMP,
Vector{Bool}(undef, BUFFER_LENGTH))

# We do not check `isdefined(Base, :get_extension)` since Julia v1.9.0
# does not load package extensions when their dependency is loaded from
# the main environment
@static if !(VERSION >= v"1.9.1")
@static if !isdefined(Base, :get_extension)
@require Plots="91a5bcdd-55d7-5caf-9e0b-520d859cae80" begin include("../ext/PlotsExt.jl") end
end

Expand Down

2 comments on commit c04dc11

@ranocha
Copy link
Member Author

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/84517

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 v2.19.1 -m "<description of version>" c04dc11458eb952cf99fd6dda87cf7d774c08835
git push origin v2.19.1

Please sign in to comment.