objectbox-go icon indicating copy to clipboard operation
objectbox-go copied to clipboard

Version.LessThan() function not working properly

Open josh-hogle opened this issue 2 years ago • 1 comments

Description

When using v0.19.0 of the Go library with v0.19.0 of the C library, I get the following warning message:

Note: the loaded ObjectBox C library should be updated.
      Found ObjectBox version 0.19.0, but the minimum recommended version is 0.18.1.

Basic info

Please complete the following information:

  • ObjectBox version (are you using the latest version?): v0.19.0 (Go and C libraries)
  • Reproducibility: always
  • Device: desktop
  • OS: Debian

How to reproduce

Simply build a small demo program similar to the getting started example and compile it and you should get the warning.

Expected behavior

No warning(s) should be emitted as the "C" library is greater than/equal to the Go library version.

Code

Check the LessThan() function in version.go on line 35. It appears to me that this may be causing the issue. You may also want to just use the golang.org/x/mod/semver package to simplify your version comparison and management.

josh-hogle avatar Sep 20 '23 21:09 josh-hogle

Fixed in https://github.com/objectbox/objectbox-go/releases/tag/v2.0.0

greenrobot avatar Mar 11 '25 14:03 greenrobot