Open MilesCranmer opened 3 months ago
I think this is a good idea and we should imo also:
That all sounds good to me.
For naming, maybe just something like parse_compat
?
Does this mean that we have to make Pkg.Versions.VersionSpec
part of the public API? Because semver_spec
returns a VersionSpec
?
The Compatibility guide is very helpful, but I still find the exact syntax easy to forget, and find myself repeatedly checking this guide whenever I'm creating a complex version specification.
I recently found the
Pkg.Versions.semver_spec
as a way to manually parse the version string. I have found this useful for my own work and I thought it would be helpful to give an example of how to use this to explicitly check versions, and make sure you aren't too constrained or too flexible in a given version spec.I add the following subsection to the docs:
Checking specifications
Pkg.jl parses a given version specification using
Pkg.Versions.semver_spec
. You can check if a particular version of a package is contained in a particular range by using this command. For example: