Is dropping support for an old version of Julia a breaking change?

If I have this package and I want to get rid of the version-specific code

module MyPackage

export do_thing

function do_thing()
    VERSION < v"1.7" && return do_it_the_old_way()

    ...
end

function do_it_the_old_way()
    ...
end

end
name = "MyPackage"
uuid = "4c1de45c-6ba6-4794-88b8-a0fc666ce860"
version = "1.0.0"

[compat]
julia = "1.6"

If I change it to the following:

module MyPackage

export do_thing

function do_thing()
    ...
end

end
name = "MyPackage"
uuid = "4c1de45c-6ba6-4794-88b8-a0fc666ce860"
version = "?.?.?"

[compat]
julia = "1.7"

What version should I use?

My inclination is it is not breaking because an older Julia version will never see the new version of this package anyway, so it would be valid to use 1.0.1. I’d still probably use 1.1.0 so that I could continue to support julia 1.6 on the 1.0.x branch. The cost of bumping to 2.0.0 is that dependants would need to update their compats.

I think this might be an example in the wild: Bump 1.0 to 1.6 LTS. Prep for v1.0 (#54) · JuliaMath/NaNMath.jl@1d72715 · GitHub

3 Likes

No, it shouldn’t count as breaking since it won’t break any code if one is able to update to it, as you pointed out. The useful ColPrac list of practices agrees and has some more info: https://github.com/SciML/ColPrac#dropping-support-for-earlier-versions-of-julia

7 Likes

Thank you for the link! That’s exactly what I was looking for, just couldn’t find it.

1 Like