Skip to content

Switch to Boost.JSON #1590

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 7 additions & 7 deletions .github/workflows/psv_pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: ./scripts/misc/cpplint_ci.sh
shell: bash
- name: Install Ubuntu dependencies
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-7 g++-7 --no-install-recommends
run: sudo apt-get update && sudo apt-get install -y ccache libssl-dev libcurl4-openssl-dev gcc-7 g++-7 --no-install-recommends
shell: bash
- name: Compile project with cmake and ccache
run: gcc --version && ./scripts/linux/psv/build_psv.sh
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Ubuntu dependencies
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-9 g++-9 --no-install-recommends
run: sudo apt-get update && sudo apt-get install -y ccache libssl-dev libcurl4-openssl-dev gcc-9 g++-9 --no-install-recommends
shell: bash
- name: Compile project with cmake and ccache
run: gcc --version && ./scripts/linux/psv/build_psv.sh
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Ubuntu dependencies
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev libssl-dev libcurl4-openssl-dev gcc-7 g++-7 --no-install-recommends
run: sudo apt-get update && sudo apt-get install -y libssl-dev libcurl4-openssl-dev gcc-7 g++-7 --no-install-recommends
shell: bash
- name: Compile project without cache
run: ./scripts/linux/psv/build_psv_no_cache.sh
Expand All @@ -87,7 +87,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Ubuntu dependencies
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev --no-install-recommends
run: sudo apt-get update && sudo apt-get install -y ccache libssl-dev libcurl4-openssl-dev --no-install-recommends
shell: bash
- name: Compile project with cmake and ccache
run: gcc --version && ./scripts/linux/psv/build_psv.sh
Expand All @@ -104,7 +104,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Ubuntu dependencies
run: sudo rm /etc/apt/sources.list.d/microsoft-prod.list && sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install -y libboost-all-dev libssl-dev libcurl4-openssl-dev gcc-13 g++-13 --no-install-recommends
run: sudo rm /etc/apt/sources.list.d/microsoft-prod.list && sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install -y libssl-dev libcurl4-openssl-dev gcc-13 g++-13 --no-install-recommends
shell: bash
- name: Compile project without cache
run: ./scripts/linux/psv/build_psv_no_cache.sh
Expand All @@ -121,7 +121,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Ubuntu dependencies
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install -y libboost-all-dev ccache libssl-dev libcurl4-openssl-dev gcc-13 g++-13 --no-install-recommends
run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update && sudo apt-get install -y ccache libssl-dev libcurl4-openssl-dev gcc-13 g++-13 --no-install-recommends
shell: bash
- name: Compile project with cmake and ccache
run: gcc --version && ./scripts/linux/psv/build_psv.sh
Expand All @@ -136,7 +136,7 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Ubuntu dependencies
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev libssl-dev libcurl4-openssl-dev --no-install-recommends
run: sudo apt-get update && sudo apt-get install -y libssl-dev libcurl4-openssl-dev --no-install-recommends
shell: bash
- name: Compile project without cache
run: ./scripts/linux/psv/build_psv_no_cache.sh
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ The table below lists the dependencies of the Data SDK.
| Boost (headers only) | 1.82.0 |
| LevelDB | 1.21 |
| Snappy | 1.1.7 |
| RapidJSON | latest |
| Zlib | 1.3.1 |

### Linux dependencies
Expand Down
4 changes: 2 additions & 2 deletions docs/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ cmake --build . --target install

<a href="https://cmake.org/download/" target="_blank">CMake</a> is the main build system. The minimal required version of CMake is 3.9.

CMake downloads <a href="https://github.com/google/leveldb" target="_blank">LevelDB</a>, <a href="https://github.com/google/snappy" target="_blank">Snappy</a>, <a href="https://github.com/Tencent/rapidjson" target="_blank">RapidJSON</a>, and <a href="https://www.boost.org/" target="_blank">Boost</a>. To disable downloading, set `OLP_SDK_BUILD_EXTERNAL_DEPS` to `OFF`. For details on CMake flags, see the [related](#cmake-flags) section.
CMake downloads <a href="https://github.com/google/leveldb" target="_blank">LevelDB</a>, <a href="https://github.com/google/snappy" target="_blank">Snappy</a>, and <a href="https://www.boost.org/" target="_blank">Boost</a>. To disable downloading, set `OLP_SDK_BUILD_EXTERNAL_DEPS` to `OFF`. For details on CMake flags, see the [related](#cmake-flags) section.

**To build the Data SDK:**

Expand Down Expand Up @@ -175,4 +175,4 @@ HERE Data SDK for C++ contains several example programs that demonstrate some of
- [Read example](dataservice-read-catalog-example.md) – demonstrates how to get catalog and partition metadata, as well as partition data.
- [Read example for a stream layer](dataservice-read-from-stream-layer-example.md) – demonstrates how to get data from a stream layer.
- [Cache example](dataservice-cache-example.md) – demonstrates how to get partition data and work with a mutable and protected cache.
- [Write example](dataservice-write-example.md) – demonstrates how to publish data to the HERE platform.
- [Write example](dataservice-write-example.md) – demonstrates how to publish data to the HERE platform.
2 changes: 1 addition & 1 deletion docs/work-with-data-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The example below demonstrates how to use the `olp::client::OlpClient` class fro
}
```

5. If the check passed and the status of the received `olp::client::HttpResponse` is `olp::http::HttpStatusCode::OK` (that is 200 OK), extract the encoded JSON from the response and parse it using RapidJSON or any other JSON parsing library.
5. If the check passed and the status of the received `olp::client::HttpResponse` is `olp::http::HttpStatusCode::OK` (that is 200 OK), extract the encoded JSON from the response and parse it using JSON parsing library.

```cpp
std::string response_json;
Expand Down
11 changes: 1 addition & 10 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ set(OLP_SDK_CPP_SNAPPY_TAG "1.1.7")
set(OLP_SDK_CPP_LEVELDB_URL "https://github.com/google/leveldb.git")
set(OLP_SDK_CPP_LEVELDB_TAG "1.21")

set(OLP_SDK_CPP_RAPIDJSON_URL "https://github.com/Tencent/rapidjson.git")
# Next commit after that breaks our build
set(OLP_SDK_CPP_RAPIDJSON_TAG "d621dc9e9c77f81e5c8a35b8dcc16dcd63351321")

set(OLP_SDK_CPP_BOOST_URL "https://github.com/boostorg/boost.git")
set(OLP_SDK_CPP_BOOST_TAG "boost-1.82.0")

Expand All @@ -73,11 +69,6 @@ if(NOT TARGET GTest AND NOT GTest_FOUND)
add_subdirectory(googletest)
endif()

find_package(RapidJSON 1.1.0 QUIET)
if(NOT TARGET RapidJSON AND NOT RapidJSON_FOUND)
add_subdirectory(rapidjson)
endif()

if(OLP_SDK_ENABLE_DEFAULT_CACHE)
find_package(leveldb QUIET)
if(NOT TARGET leveldb AND NOT leveldb_FOUND)
Expand All @@ -97,7 +88,7 @@ if(OLP_SDK_ENABLE_DEFAULT_CACHE_LMDB)
endif()
endif()

find_package(Boost QUIET)
find_package(Boost 1.82.0 QUIET)
if(NOT TARGET Boost AND NOT Boost_FOUND)
add_subdirectory(boost)
set(BOOST_ROOT ${EXTERNAL_BOOST_ROOT} PARENT_SCOPE)
Expand Down
8 changes: 7 additions & 1 deletion external/boost/CMakeLists.txt.boost.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ include(ExternalProject)
ExternalProject_Add(boost-download
GIT_REPOSITORY @OLP_SDK_CPP_BOOST_URL@
GIT_TAG @OLP_SDK_CPP_BOOST_TAG@
GIT_SUBMODULES libs/any
GIT_SUBMODULES libs/align
libs/any
libs/assert
libs/config
libs/container
libs/container_hash
libs/core
libs/detail
Expand All @@ -35,8 +37,10 @@ ExternalProject_Add(boost-download
libs/function_types
libs/headers
libs/integer
libs/intrusive
libs/io
libs/iterator
libs/json
libs/move
libs/mpl
libs/mp11
Expand All @@ -48,12 +52,14 @@ ExternalProject_Add(boost-download
libs/serialization
libs/smart_ptr
libs/static_assert
libs/system
libs/throw_exception
libs/tti
libs/type_index
libs/type_traits
libs/utility
libs/uuid
libs/variant2
libs/winapi
tools/build
tools/boost_install
Expand Down
35 changes: 0 additions & 35 deletions external/rapidjson/CMakeLists.txt

This file was deleted.

38 changes: 0 additions & 38 deletions external/rapidjson/CMakeLists.txt.rapidjson.in

This file was deleted.

Loading
Loading