Ben Hamner
Ben Hamner

Reputation: 4745

In Julia, is there a good way to maintain multiple versions of a package targeted at different releases?

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?

Upvotes: 8

Views: 1327

Answers (1)

IainDunning
IainDunning

Reputation: 11664

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.

Upvotes: 5

Related Questions