Skip to content

Add built-in version information and check to the library

Koala Yeung requested to merge feat/version into main
  • Build version information into libcangjie.
  • Support query of raw version string.
  • Support comparison of semver by libcangjie_check_version (checks if the version is at least of the given major, minor, patch number).
  • Provide utilities for forward compatibility / debug checks.

Use case

As new feature(s) / function(s) are provided to libcangjie in the future, the user of the function (e.g. pycangjie, ibus-cangjie) might take advantage of the API. But dependencies of installations are tricky. User might install newer version of ibus-cangjie with old version of libcangjie without noticing it. This can cause unexpected behaviour.

Version string checks allow maintainer to check when encountering unexpected issue. Version checks also allow developer to provide clear message, or even backward compatibility for using against older libcangjie versions.

Merge request reports

Loading