diff --git a/README.md b/README.md index b26a9f7e7..32123eb21 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,27 @@ To use Compat in your Julia package, add it as a dependency of your package usin ```julia pkg> add Compat ``` -and add a [version specifier line](https://julialang.github.io/Pkg.jl/v1/compatibility/#Version-specifier-format-1) such as `Compat = "2.2, 3"` in the `[compat]`section of the `Project.toml` file +and add a [version specifier line](https://julialang.github.io/Pkg.jl/v1/compatibility/#Version-specifier-format-1) +such as `Compat = "3.22, 4"` in the `[compat]`section of the `Project.toml` file in your package directory. The version in the latter should be the minimum -version that supports all needed fatures (see list below), and (if applicable) -any newer major versions verified to be compatible. Then, in your package, -shortly after the `module` statement a line like this: +version that supports all needed features (see list below). Note that Compat v4 +requires Julia v1.6, but some features may have been backported to Compat v3 +(see the +[feature list of the release-3 branch](https://github.com/JuliaLang/Compat.jl/tree/release-3#supported-features)). +If you require any of those backported features, be sure to specify the correct +compatibility in your `Project.toml`. E.g. if the feature from Compat v4.x has +been backported to v3.y, use `Compat = 3.y, 4.x`. If you use a feature that had +originally been added in Compat v3 (e.g. in 3.x), don't forget to also declare +compatibility with v4 with `Compat = 3.x, 4` (unless you use one the very few +things that got removed between Compat v3 and v4, which you most probably +don't). + +To minimize dependency conflicts between packages it is recommended that packages +allow for both appropriate v4 and v3 versions of Compat.jl in their Project.toml +(except for rare cases of packages that support only v4 or v3 version of Compat.jl). + +Then, in your package, shortly after the `module` statement include a line like +this: ```julia using Compat