Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rip-out vcpkg (use openssl + zlib prebuilds instead) #1069

Merged
merged 5 commits into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,6 @@ jobs:
if: contains(github.head_ref, 'release/') || steps.check-cache.outputs.cache-hit != 'true'
uses: seanmiddleditch/gha-setup-ninja@1815f2d05c2cd60c2d900f89843139b8dde09f4c

- name: Get vcpkg submodule commit sha
id: vcpkg_cache_key
if: contains(github.head_ref, 'release/') || steps.check-cache.outputs.cache-hit != 'true'
working-directory: src/realm-core/tools/vcpkg/ports
shell: bash
run: echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Setup Vcpkg
if: contains(github.head_ref, 'release/') || steps.check-cache.outputs.cache-hit != 'true'
continue-on-error: true
uses: friendlyanon/setup-vcpkg@v1
with:
path: src/realm-core/tools/vcpkg/ports
cache-key: vcpkg-${{ matrix.build }}-${{ steps.vcpkg_cache_key.outputs.commit }}-${{ hashFiles('./src/realm-core/tools/vcpkg/vcpkg.json') }}
cache-restore-keys: vcpkg-${{ matrix.build }}-${{ steps.vcpkg_cache_key.outputs.commit }}-

- name: Refetch Vcpkg
run: git fetch --unshallow
working-directory: ./src/realm-core/tools/vcpkg/ports

- name: Setup Android NDK
if: startsWith(matrix.build, 'android-')
run: echo "ANDROID_NDK=$ANDROID_NDK_LATEST_HOME" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

### Internal
* Using Core 13.1.2.
* No longer use vcpkg ([#1069](https://github.com/realm/realm-dart/pull/1069))

## 0.8.0+rc (2022-11-14)

Expand Down
44 changes: 16 additions & 28 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 0
},
"configurePresets": [
{
"name": "default",
"binaryDir": "${sourceDir}/build-native/${presetName}",
"generator": "Ninja Multi-Config",
"cacheVariables": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/src/realm-core/tools/vcpkg/triplets",
"VCPKG_MANIFEST_DIR": "${sourceDir}/src/realm-core/tools/vcpkg",
"CMAKE_CONFIGURATION_TYPES": "Debug;Release;RelWithDebInfo;MinSizeRel"
}
},
Expand All @@ -30,10 +28,7 @@
"name": "windows",
"inherits": "default",
"generator": "Visual Studio 17 2022",
"toolchainFile": "${sourceDir}/src/realm-core/tools/vcpkg/ports/scripts/buildsystems/vcpkg.cmake",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-windows-static"
},
"architecture": "x64",
"condition": {
"lhs": "${hostSystemName}",
"type": "equals",
Expand Down Expand Up @@ -86,8 +81,7 @@
},
"cacheVariables": {
"CMAKE_SYSTEM_NAME": "Android",
"CMAKE_ANDROID_NDK": "$env{ANDROID_NDK}",
"VCPKG_TARGET_TRIPLET": "$env{vcpkg_arch}-android"
"CMAKE_ANDROID_NDK": "$env{ANDROID_NDK}"
},
"environment": {
"ANDROID_NDK_HOME": "$env{ANDROID_NDK}"
Expand All @@ -99,9 +93,6 @@
"inherits": "android",
"cacheVariables": {
"CMAKE_ANDROID_ARCH_ABI": "x86"
},
"environment": {
"vcpkg_arch": "x86"
}
},
{
Expand All @@ -110,9 +101,6 @@
"inherits": "android",
"cacheVariables": {
"CMAKE_ANDROID_ARCH_ABI": "x86_64"
},
"environment": {
"vcpkg_arch": "x64"
}
},
{
Expand All @@ -121,9 +109,6 @@
"inherits": "android",
"cacheVariables": {
"CMAKE_ANDROID_ARCH_ABI": "armeabi-v7a"
},
"environment": {
"vcpkg_arch": "arm"
}
},
{
Expand All @@ -132,9 +117,6 @@
"inherits": "android",
"cacheVariables": {
"CMAKE_ANDROID_ARCH_ABI": "arm64-v8a"
},
"environment": {
"vcpkg_arch": "arm64"
}
}
],
Expand Down Expand Up @@ -184,15 +166,21 @@
"name": "macos",
"displayName": "macOS",
"configurePreset": "macos",
"nativeToolOptions": [ "-destination", "platform=macOS" ],
"nativeToolOptions": [
"-destination",
"platform=macOS"
],
"configuration": "Debug"
},
{
"name": "ios",
"hidden": true,
"inherits": "default",
"configurePreset": "ios",
"nativeToolOptions": [ "-destination", "$env{xcode_destination}" ]
"nativeToolOptions": [
"-destination",
"$env{xcode_destination}"
]
},
{
"name": "ios-device",
Expand Down
17 changes: 17 additions & 0 deletions lib/src/native/realm_bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11095,6 +11095,12 @@ class realm_sync_error extends ffi.Struct {

@ffi.Size()
external int user_info_length;

external ffi.Pointer<realm_sync_error_compensating_write_info_t>
compensating_writes;

@ffi.Size()
external int compensating_writes_length;
}

abstract class realm_sync_error_action {
Expand Down Expand Up @@ -11132,6 +11138,17 @@ class realm_sync_error_code extends ffi.Struct {
}

typedef realm_sync_error_code_t = realm_sync_error_code;

class realm_sync_error_compensating_write_info extends ffi.Struct {
external ffi.Pointer<ffi.Char> reason;

external ffi.Pointer<ffi.Char> object_name;

external realm_value_t primary_key;
}

typedef realm_sync_error_compensating_write_info_t
= realm_sync_error_compensating_write_info;
typedef realm_sync_error_handler_func_t = ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(ffi.Pointer<ffi.Void>,
Expand Down