Right now, there are two relevant versions of Julia: the latest stable 0.3 release, and the 0.4 release under development (which has nightly builds).
Is there currently a good way to have Julia 0.3 and 0.4 versions of the same package, to handle syntax & other changes that occur between Julia versions?
For example, is one of these options possible for packages on METADATA?
You can use Pkg to install multiple packages (https://github.com/JuliaLang/julia/issues/19591). For instance: Pkg. add(["Combinatorics", "TaylorSeries"]) . If your list sits in a text file, you can just load it and pass it to Pkg.
By default, packages will be installed to ~/. julia/packages .
There is nothing to stop you maintaining your package for both Julia versions other than your patience.
For example, you could have master
of your packages GitHub repository be the Julia 0.4 compatible version, and maintain a separate julia03
branch for Julia 0.3.
In METADATA, you'd maintain two "series" of releases, e.g. the 0.1.x
series would all point to commits on the julia03
branch, and the 0.2.x
series would all point to commits on master
. All these releases would have appropriate lines in their REQUIRE
/requires
(julia 0.3 0.4-
in one and julia 0.4
in the other).
One other way to think of it is to create a branch in your package everytime you tag a major release. For example, JuMP has a release06
branch where we can backport small fixes to the 0.6
series of releases, while working on new features on master.
Finally, Compat.jl has many helpful tools to make code work on Julia 0.3 and Julia 0.4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With