From 962ba5db3c9bb185e3ef4971d87ff853d6a9c43f Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Fri, 15 Nov 2019 15:39:54 +0100 Subject: [PATCH] Update usage section of README for Julia 1.x (#673) * Update `Usage` section of README to Julia 1.x The README was still talking about a line in the `REQUIRE` file. Replace that with the respective lines for `Project.toml`. Also remove the obsolve `import Compat.String` usage example. * Replace dead link in README The latest Julia manual has no detailed discussion of packages; it has moved to the Pkg.jl docs. --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 20b298212..84c719baa 100644 --- a/README.md +++ b/README.md @@ -13,18 +13,21 @@ Compat package provides a macro that lets you use the *latest syntax* in a backwards-compatible way. This is primarily intended for use by other [Julia -packages](http://docs.julialang.org/en/latest/manual/packages/), where +packages](https://julialang.github.io/Pkg.jl/v1/creating-packages/), where it is important to maintain cross-version compatibility. ## Usage -To use Compat in your Julia package, add a line `Compat` to the -`REQUIRE` file in your package directory. Then, in your package, -shortly after the `module` statement include lines like these: +To use Compat in your Julia package, add a line +`Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"` in the `[deps]` section +and a line `Compat = "..."` in the `[compat]`section to 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: ```julia using Compat -import Compat.String ``` and then as needed add