There are a few ways, not all public, to obtain the runtime versions of the third-party dependencies in the standard library:
Regex::PCRE.version : String
Regex::PCRE2.version : String
YAML.libyaml_version : SemanticVersion
Crystal::LibEvent::Event::VERSION : String
Some build-time versions are also available:
LibLLVM::VERSION : String
LibSSL::LIBRESSL_VERSION : String
LibSSL::OPENSSL_VERSION : String
YAML.libyaml_version was added because there were behavior changes in libyaml 0.2.1 and the specs had to accommodate for that. For completeless, we should do the same in all other third-party libraries. They should:
All return a String. There is no guarantee that a library follows Semantic Versioning even if it exposes functions to obtain its major / minor / patch numbers.
Have the same method name, like .lib_version. Note that libssl and libcrypto share the same version.
Probably include the name of the actual library being used. We could insert it at compilation time if the library's version string does not include it. In particular it should be able to tell PCRE2 apart from PCRE, LibreSSL from OpenSSL, and MPIR from GMP.
There are a few ways, not all public, to obtain the runtime versions of the third-party dependencies in the standard library:
Regex::PCRE.version : String
Regex::PCRE2.version : String
YAML.libyaml_version : SemanticVersion
Crystal::LibEvent::Event::VERSION : String
Some build-time versions are also available:
LibLLVM::VERSION : String
LibSSL::LIBRESSL_VERSION : String
LibSSL::OPENSSL_VERSION : String
YAML.libyaml_version
was added because there were behavior changes in libyaml 0.2.1 and the specs had to accommodate for that. For completeless, we should do the same in all other third-party libraries. They should:String
. There is no guarantee that a library follows Semantic Versioning even if it exposes functions to obtain its major / minor / patch numbers..lib_version
. Note that libssl and libcrypto share the same version.