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

Move bson files to core utils #7157

Merged
merged 1 commit into from
Nov 21, 2023
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
8 changes: 8 additions & 0 deletions src/realm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ set(UTIL_SOURCES
util/random.cpp
util/resource_limits.cpp
util/uri.cpp
util/bson/bson.cpp
util/bson/regular_expression.cpp
)

set(REALM_INSTALL_HEADERS
Expand Down Expand Up @@ -272,6 +274,12 @@ set(REALM_NOINST_HEADERS
util/timestamp_formatter.hpp
util/timestamp_logger.hpp
util/value_reset_guard.hpp
util/bson/bson.hpp
util/bson/min_key.hpp
util/bson/max_key.hpp
util/bson/regular_expression.hpp
util/bson/indexed_map.hpp
util/bson/mongo_timestamp.hpp
) # REALM_NOINST_HEADERS

if(NOT MSVC)
Expand Down
13 changes: 2 additions & 11 deletions src/realm/object-store/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,7 @@ if(REALM_ENABLE_SYNC)
sync/impl/sync_client.hpp
sync/impl/sync_file.hpp
sync/impl/sync_metadata.hpp
sync/impl/network_reachability.hpp

util/bson/bson.hpp
util/bson/min_key.hpp
util/bson/max_key.hpp
util/bson/regular_expression.hpp
util/bson/indexed_map.hpp
util/bson/mongo_timestamp.hpp)
sync/impl/network_reachability.hpp)

list(APPEND SOURCES
sync/app.cpp
Expand All @@ -133,9 +126,7 @@ if(REALM_ENABLE_SYNC)
sync/mongo_database.cpp
sync/push_client.cpp
sync/impl/sync_file.cpp
sync/impl/sync_metadata.cpp
util/bson/bson.cpp
util/bson/regular_expression.cpp)
sync/impl/sync_metadata.cpp)
if(APPLE)
list(APPEND HEADERS
sync/impl/apple/network_reachability_observer.hpp
Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/app_credentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
////////////////////////////////////////////////////////////////////////////

#include <realm/object-store/sync/app_credentials.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>

namespace realm::app {

Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/app_service_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef APP_SERVICE_CLIENT_HPP
#define APP_SERVICE_CLIENT_HPP

#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/util/functional.hpp>
#include <realm/util/optional.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/mongo_collection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef MONGO_COLLECTION_HPP
#define MONGO_COLLECTION_HPP

#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/util/functional.hpp>
#include <realm/util/optional.hpp>

Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/push_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <realm/object-store/sync/app_utils.hpp>
#include <realm/object-store/sync/auth_request_client.hpp>
#include <realm/object-store/sync/generic_network_transport.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>

namespace realm::app {

Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/sync_user.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define REALM_OS_SYNC_USER_HPP

#include <realm/object-store/util/atomic_shared_ptr.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/object-store/sync/subscribable.hpp>

#include <realm/util/checked_mutex.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/realm/sync/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <realm/sync/client.hpp>
#include <realm/sync/protocol.hpp>
#include <realm/sync/network/network.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>

#include <ostream>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
**************************************************************************/

#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/util/base64.hpp>
#include <external/json/json.hpp>
#include <sstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#ifndef REALM_BSON_HPP
#define REALM_BSON_HPP

#include <realm/object-store/util/bson/indexed_map.hpp>
#include <realm/object-store/util/bson/regular_expression.hpp>
#include <realm/object-store/util/bson/min_key.hpp>
#include <realm/object-store/util/bson/max_key.hpp>
#include <realm/object-store/util/bson/mongo_timestamp.hpp>
#include <realm/util/bson/indexed_map.hpp>
#include <realm/util/bson/regular_expression.hpp>
#include <realm/util/bson/min_key.hpp>
#include <realm/util/bson/max_key.hpp>
#include <realm/util/bson/mongo_timestamp.hpp>

#include <realm/binary_data.hpp>
#include <realm/timestamp.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
**************************************************************************/

#include <realm/object-store/util/bson/regular_expression.hpp>
#include <realm/util/bson/regular_expression.hpp>
#include <numeric>

namespace realm {
Expand Down
2 changes: 1 addition & 1 deletion test/object-store/bson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <catch2/catch_all.hpp>
#include "util/test_utils.hpp"
#include "util/test_file.hpp"
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>

using namespace nlohmann;
using namespace realm;
Expand Down
2 changes: 1 addition & 1 deletion test/object-store/sync/flx_sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <realm/object-store/sync/mongo_database.hpp>
#include <realm/object-store/sync/mongo_collection.hpp>
#include <realm/object-store/sync/async_open_task.hpp>
#include <realm/object-store/util/bson/bson.hpp>
#include <realm/util/bson/bson.hpp>
#include <realm/object-store/sync/sync_session.hpp>

#include <realm/sync/client_base.hpp>
Expand Down