Skip to content

Commit

Permalink
Update usage section of README for Julia 1.x (#673)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
martinholters authored Nov 15, 2019
1 parent 3aa2419 commit 962ba5d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 962ba5d

Please sign in to comment.