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

Remove ability to synchronize #7991

Merged
merged 11 commits into from
Aug 28, 2024
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Filtering notifications with backlink columns as last element could sometimes give wrong results ([#7530](https://github.com/realm/realm-core/issues/7530), since 11.1.0)

### Breaking changes
* None.
* Ability to synchronize has been removed.

### Compatibility
* Fileformat: Generates files with format v24. Reads and automatically upgrade from fileformat v10. If you want to upgrade from an earlier file format version you will have to use RealmCore v13.x.y or earlier.
Expand Down
18 changes: 1 addition & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ if(UNIX)
endif()

# Options (passed to CMake)
option(REALM_ENABLE_SYNC "Enable synchronized realms." ON)
option(REALM_BUILD_TEST_CLIENT "Build the test client" OFF)
option(REALM_ENABLE_ASSERTIONS "Enable assertions in release mode." OFF)
option(REALM_ENABLE_ALLOC_SET_ZERO "Zero all allocations." OFF)
Expand All @@ -268,10 +267,8 @@ if(NOT EMSCRIPTEN)
endif()
option(REALM_ENABLE_MEMDEBUG "Add additional memory checks" OFF)
option(REALM_VALGRIND "Tell the test suite we are running with valgrind" OFF)
option(REALM_SYNC_MULTIPLEXING "Enables/disables sync session multiplexing by default" ON)
set(REALM_MAX_BPNODE_SIZE "1000" CACHE STRING "Max B+ tree node size.")
option(REALM_ENABLE_GEOSPATIAL "Enable geospatial types and queries." ON)
option(REALM_APP_SERVICES "Enable the default app services implementation." ON)

# Find dependencies
set(THREADS_PREFER_PTHREAD_FLAG ON)
Expand All @@ -287,15 +284,7 @@ endif()
find_package(Backtrace)
set(REALM_HAVE_BACKTRACE ${Backtrace_FOUND})

if(REALM_ENABLE_SYNC)
option(REALM_FORCE_OPENSSL "Always use OpenSSL for SSL needs, regardless of target platform." OFF)
if(CMAKE_SYSTEM_NAME MATCHES "^Windows|Linux|Android")
set(REALM_NEEDS_OPENSSL TRUE)
endif()
if(REALM_NEEDS_OPENSSL OR REALM_FORCE_OPENSSL)
option(REALM_INCLUDE_CERTS "Include a list of trust certificates in the build for OpenSSL certificate verification" ON)
endif()
elseif(REALM_ENABLE_ENCRYPTION AND CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
if(REALM_ENABLE_ENCRYPTION AND CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
set(REALM_NEEDS_OPENSSL TRUE)
endif()

Expand All @@ -314,8 +303,6 @@ if(REALM_NEEDS_OPENSSL OR REALM_FORCE_OPENSSL)
set(REALM_HAVE_OPENSSL ON)
option(REALM_USE_SYSTEM_OPENSSL_PATHS "Use the system OpenSSL certificate store (specified by the OPENSSLDIR environment variable) at runtime for TLS handshake." ${_REALM_USE_OPENSSL_DEFAULT_VERIFY_PATHS})
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)" OPENSSL_VERSION_MAJOR_MINOR "${OPENSSL_VERSION}")
elseif(APPLE)
set(REALM_HAVE_SECURE_TRANSPORT "1")
endif()

# Use Zlib for Sync, but allow integrators to override it
Expand Down Expand Up @@ -380,9 +367,6 @@ set(REALM_EXPORTED_TARGETS
RealmFFI
RealmFFIStatic
)
if(REALM_ENABLE_SYNC)
list(APPEND REALM_EXPORTED_TARGETS Sync)
endif()
export(TARGETS ${REALM_EXPORTED_TARGETS} NAMESPACE Realm:: FILE RealmTargets.cmake)
configure_file(tools/cmake/RealmConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/RealmConfig.cmake @ONLY)
configure_file(tools/cmake/AcquireRealmDependency.cmake ${CMAKE_CURRENT_BINARY_DIR}/AcquireRealmDependency.cmake @ONLY)
Expand Down
78 changes: 3 additions & 75 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,13 @@ var cxxSettings: [CXXSetting] = [
.define("REALM_INSTALL_LIBEXECDIR", to: ""),
.define("REALM_ENABLE_ASSERTIONS", to: "1"),
.define("REALM_ENABLE_ENCRYPTION", to: "1"),
.define("REALM_ENABLE_SYNC", to: "1"),
.define("REALM_ENABLE_GEOSPATIAL", to: "1"),
.define("REALM_APP_SERVICES", to: "1"),

.define("REALM_VERSION_MAJOR", to: String(versionCompontents[0])),
.define("REALM_VERSION_MINOR", to: String(versionCompontents[1])),
.define("REALM_VERSION_PATCH", to: String(versionCompontents[2])),
.define("REALM_VERSION_EXTRA", to: "\"\(versionExtra)\""),
.define("REALM_VERSION_STRING", to: "\"\(versionStr)\""),
.define("REALM_HAVE_SECURE_TRANSPORT", to: "1", .when(platforms: [.macOS, .macCatalyst, .iOS, .tvOS, .watchOS]))
]

let syncServerSources: [String] = [
"realm/sync/noinst/server",
]

let syncExcludes: [String] = [
// Server files
"realm/sync/noinst/server/crypto_server_openssl.cpp",
"realm/sync/noinst/server/crypto_server_stub.cpp",

// CLI Tools
"realm/sync/tools",
]

let notSyncServerSources: [String] = [
Expand Down Expand Up @@ -98,36 +82,6 @@ let notSyncServerSources: [String] = [
"realm/spec.cpp",
"realm/status.cpp",
"realm/string_data.cpp",
"realm/sync/changeset.cpp",
"realm/sync/changeset_encoder.cpp",
"realm/sync/changeset_parser.cpp",
"realm/sync/client.cpp",
"realm/sync/config.cpp",
"realm/sync/history.cpp",
"realm/sync/instruction_applier.cpp",
"realm/sync/instruction_replication.cpp",
"realm/sync/instructions.cpp",
"realm/sync/network/default_socket.cpp",
"realm/sync/network/http.cpp",
"realm/sync/network/network.cpp",
"realm/sync/network/network_ssl.cpp",
"realm/sync/network/websocket.cpp",
"realm/sync/noinst/changeset_index.cpp",
"realm/sync/noinst/client_history_impl.cpp",
"realm/sync/noinst/client_impl_base.cpp",
"realm/sync/noinst/client_reset.cpp",
"realm/sync/noinst/client_reset_operation.cpp",
"realm/sync/noinst/client_reset_recovery.cpp",
"realm/sync/noinst/migration_store.cpp",
"realm/sync/noinst/pending_bootstrap_store.cpp",
"realm/sync/noinst/pending_reset_store.cpp",
"realm/sync/noinst/protocol_codec.cpp",
"realm/sync/noinst/sync_metadata_schema.cpp",
"realm/sync/noinst/sync_schema_migration.cpp",
"realm/sync/object_id.cpp",
"realm/sync/protocol.cpp",
"realm/sync/subscriptions.cpp",
"realm/sync/transform.cpp",
"realm/table.cpp",
"realm/table_ref.cpp",
"realm/table_view.cpp",
Expand All @@ -139,7 +93,7 @@ let notSyncServerSources: [String] = [
"realm/utilities.cpp",
"realm/uuid.cpp",
"realm/version.cpp",
] + syncExcludes
]

let bidExcludes: [String] = [
"bid128_acos.c",
Expand Down Expand Up @@ -412,16 +366,14 @@ let package = Package(
"realm/object-store/impl/generic",
"realm/object-store/impl/windows",
"realm/object-store/impl/emscripten",
"realm/object-store/sync/impl/emscripten",
"realm/parser",
"realm/sync/CMakeLists.txt",
"realm/tools",
"realm/util/config.h.in",
"realm/version_numbers.hpp.in",
"spm",
"swift",
"win32",
] + syncExcludes + syncServerSources) as [String],
]) as [String],
publicHeadersPath: ".",
cxxSettings: ([
.headerSearchPath("external"),
Expand Down Expand Up @@ -459,28 +411,6 @@ let package = Package(
cxxSettings: [
.headerSearchPath("realm/parser/generated")
] + cxxSettings),
.target(
name: "SyncServer",
dependencies: ["RealmCore"],
path: "src",
exclude: ([
"CMakeLists.txt",
"external",
"realm/CMakeLists.txt",
"realm/exec",
"realm/object-store",
"realm/parser",
"realm/sync/CMakeLists.txt",
"realm/sync/noinst/server/CMakeLists.txt",
"realm/tools",
"realm/util/config.h.in",
"realm/version_numbers.hpp.in",
"swift",
"win32",
] + notSyncServerSources) as [String],
sources: ["realm/sync"],
publicHeadersPath: "realm/sync/impl", // hack
cxxSettings: cxxSettings),
.target(
name: "Capi",
dependencies: ["RealmCore", "RealmQueryParser"],
Expand Down Expand Up @@ -528,7 +458,7 @@ let package = Package(
cxxSettings: (cxxSettings) as [CXXSetting]),
.target(
name: "ObjectStoreTestUtils",
dependencies: ["RealmCore", "SyncServer", "Catch2", "CoreTestUtils"],
dependencies: ["RealmCore", "Catch2", "CoreTestUtils"],
path: "test/object-store/util",
publicHeadersPath: ".",
cxxSettings: ([
Expand All @@ -546,8 +476,6 @@ let package = Package(
"c_api",
"geospatial.cpp",
"query.json",
"sync-metadata-v4.realm",
"sync-metadata-v5.realm",
"test_backup-olden-and-golden.realm",
"util",
],
Expand Down
Loading
Loading