Skip to content

Commit

Permalink
Update docs/src/creating-packages.md
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
  • Loading branch information
aplavin and IanButterworth authored Aug 9, 2023
1 parent 1d19620 commit 46b4f9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/src/creating-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +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 only installed on Julia versions that do not support extensions.
- 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 46b4f9b

Please sign in to comment.