Skip to content

Commit

Permalink
recommend adding Requires to weakdeps (#3537)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Butterworth <[email protected]>
  • Loading branch information
aplavin and IanButterworth authored Aug 9, 2023
1 parent b044bf6 commit 6e183ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/src/creating-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,8 @@ This is done by making the following changes (using the example above):
```julia
isdefined(Base, :get_extension) ? (using Contour) : (using ..Contour)
```
- Add `Requires` to `[weakdeps]` in your `Project.toml` file, so that it is listed in both `[deps]` and `[weakdeps]`.
Julia 1.9+ knows to not install it as a regular dependency, whereas earlier versions will consider it a dependency.

The package should now work with Requires.jl on Julia versions before extensions were introduced
and with extensions on more recent Julia versions.
Expand Down

0 comments on commit 6e183ad

Please sign in to comment.