I want to support all LTS Julia versions which is currently 1.0.5. However, some functions like nonmissingtype is only introduced in 1.3
What’s the correct way to support these type of functions? Should I just check for Julia version in PacakgeName.jl and then if they are not there then with something like this?
if VERSION < v"1.3.0"
using Missings: nonmissingtype
end
I think the “best” solution is to add it to Compat and write using Compat: nonmissingtype; i.e., let Compat implement the branch. This way, other people can also use Compat for this.
Though if VERSION < v"1.3.0" looks like a good solution too.