Skip to content

Commit

Permalink
Merge branch '136-go-release-v1-8-0' into 'dev'
Browse files Browse the repository at this point in the history
Resolve "Go Release v1.8.0"

Closes #136

See merge request objectbox/objectbox-go!93
  • Loading branch information
dan-obx committed Feb 16, 2024
2 parents aafd1c9 + 57ee7ef commit fb4848d
Show file tree
Hide file tree
Showing 12 changed files with 480 additions and 47 deletions.
7 changes: 5 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test:linux:x64:
extends: .test:linux:x64
parallel:
matrix:
- GOVERSION: [ '1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20' ]
- GOVERSION: [ '1.13', '1.14', '1.15', '1.16', '1.17', '1.18', '1.19', '1.20', '1.21', '1.22' ]

# TODO Not working on shell runner (e.g. with default (old) version): investigate and find a working setup
.test:linux:ARMv7hf:
Expand All @@ -42,13 +42,16 @@ test:linux:x64:

test:linux:aarch64:
extends: .test
tags: [ aarch64, linux, shell ]
tags: [ arm64, linux, docker ]
image: golang:$GOVERSION
variables:
GOVERSION: '1.22'
BUILD_ARGS: -test.short

test:mac:x64:
allow_failure: true # TODO Investigate and fix
extends: .test

tags: [ x64, mac, go ]

test:win:x64:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ id, err := box.Put(&Person{ FirstName: "Joe", LastName: "Green" })
Want details? **[Read the docs](https://golang.objectbox.io/)** or
**[check out the API reference](https://godoc.org/github.com/objectbox/objectbox-go/objectbox)**.

Latest release: [v1.7.0 (2023-06-23)](https://golang.objectbox.io/)
Latest release: [v1.8.0 (2024-02-16)](https://golang.objectbox.io/)

## Table of Contents:
- [High-performance Golang database](#high-performance-golang-database)
Expand Down Expand Up @@ -162,7 +162,7 @@ ObjectBox supports multiple platforms and languages:

License
-------
Copyright 2018-2022 ObjectBox Ltd. All rights reserved.
Copyright 2018-2024 ObjectBox Ltd. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion build/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd "${script_dir}/.." # move to project root dir

args="$@"

bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-c/main/download.sh) --quiet --sync 0.18.1
bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-c/main/download.sh) --quiet --sync 0.21.0
export CGO_LDFLAGS="-L$(pwd -P)/lib -Wl,-rpath -Wl,$(pwd -P)/lib"

if [[ "$(uname)" == MINGW* ]]; then
Expand Down
6 changes: 4 additions & 2 deletions build/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ fi

echo "******** Testing: go vet ********"
set +e
go_vet_result=$(go 2>&1 vet ./...)
# ignore '# <package>' comments to stablize checking false positive below;
# newer go version outputs a second-line with bracket ('# [<package]').
go_vet_result=$(go 2>&1 vet ./... | grep -v ^#)
go_vet_rc=$?
set -e
echo "$go_vet_result"
go_vet_result_lines=$(echo "$go_vet_result" | wc -l)
if [ $go_vet_rc -ne 0 ]; then
if [[ $go_vet_result_lines -eq 2 && $go_vet_result == *objectbox[/\\]c-callbacks.go*possible\ misuse\ of\ unsafe.Pointer* ]]; then
if [[ $go_vet_result_lines -eq 1 && $go_vet_result == *objectbox[/\\]c-callbacks.go*possible\ misuse\ of\ unsafe.Pointer* ]]; then
echo "Ignoring known false positive of go vet"
go_vet_rc=0
else
Expand Down
2 changes: 1 addition & 1 deletion install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $ErrorActionPreference = "Stop"
# Configure supported HTTPS protocols
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12, [Net.SecurityProtocolType]::Tls11, [Net.SecurityProtocolType]::Tls

$libVersion = '0.18.1'
$libVersion = '0.21.0'
$libVariant = 'objectbox' # or 'objectbox-sync'
$downloadDir = 'download'
$extractedLibDir = "$downloadDir\objectbox-$libVersion"
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

cLibVersion=0.18.1
cLibVersion=0.21.0
os=$(uname)
cLibArgs="$*"

Expand Down
4 changes: 2 additions & 2 deletions objectbox/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (model *Model) EntityFlags(entityFlags int) {
return
}
model.Error = cCall(func() C.obx_err {
return C.obx_model_entity_flags(model.cModel, C.OBXEntityFlags(entityFlags))
return C.obx_model_entity_flags(model.cModel, C.uint32_t(entityFlags))
})
}

Expand Down Expand Up @@ -216,7 +216,7 @@ func (model *Model) PropertyFlags(propertyFlags int) {
return
}
model.Error = cCall(func() C.obx_err {
return C.obx_model_property_flags(model.cModel, C.OBXPropertyFlags(propertyFlags))
return C.obx_model_property_flags(model.cModel, C.uint32_t(propertyFlags))
})
}

Expand Down
Loading

0 comments on commit fb4848d

Please sign in to comment.