Skip to content

Commit

Permalink
Update core to 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej committed Sep 23, 2024
1 parent 28aacf8 commit fce1eb2
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
CB_SCAN_BUILD: /usr/bin/scan-build-18
- name: Upload scan-build report
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: report
path: ext/cmake-build-report.tar.gz
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ task :cache_cxx_dependencies do
"asio/*/asio/COPYING",
"asio/*/asio/asio/include/*.hpp",
"asio/*/asio/asio/include/asio/**/*.[hi]pp",
"asio/*/asio/asio/src/*.cpp",
"boringssl/*/boringssl/**/*.{cc,h,c,asm,S}",
"boringssl/*/boringssl/**/CMakeLists.txt",
"boringssl/*/boringssl/LICENSE",
Expand Down
2 changes: 2 additions & 0 deletions bin/check-clang-static-analyzer
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ ${CB_SCAN_BUILD} ${SCAN_BUILD_ARGS} ${CB_CMAKE} \
-DENABLE_CACHE=OFF \
-DRUBY_HDR_DIR="${RUBY_HDR_DIR}" \
-DRUBY_ARCH_HDR_DIR="${RUBY_ARCH_HDR_DIR}" \
-DCOUCHBASE_CXX_CLIENT_INSTALL=ON \
-DCOUCHBASE_CXX_CLIENT_BUILD_SHARED=ON \
-DCOUCHBASE_CXX_CLIENT_BUILD_TESTS=OFF \
-DCOUCHBASE_CXX_CLIENT_BUILD_DOCS=OFF \
-DCOUCHBASE_CXX_CLIENT_BUILD_EXAMPLES=OFF \
Expand Down
9 changes: 7 additions & 2 deletions ext/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,20 @@ add_library(
rcb_version.cxx
rcb_views.cxx)
target_include_directories(couchbase PRIVATE ${PROJECT_BINARY_DIR}/generated)
target_include_directories(couchbase PRIVATE SYSTEM ${RUBY_INCLUDE_DIR})
target_include_directories(couchbase PRIVATE SYSTEM ${RUBY_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/couchbase
${PROJECT_SOURCE_DIR}/couchbase/third_party/cxx_function
${PROJECT_SOURCE_DIR}/couchbase/third_party/expected/include)
target_link_libraries(
couchbase
PRIVATE project_options
project_warnings
couchbase_cxx_client
couchbase_cxx_client_static
Microsoft.GSL::GSL
asio
taocpp::json
fmt::fmt
spdlog::spdlog
snappy)
if(RUBY_LIBRUBY)
target_link_directories(couchbase PRIVATE "${RUBY_LIBRARY_DIR}")
Expand Down
2 changes: 1 addition & 1 deletion ext/couchbase
3 changes: 3 additions & 0 deletions ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ def sys(*cmd)
"-DRUBY_ARCH_HDR_DIR=#{RbConfig::CONFIG['rubyarchhdrdir']}",
"-DRUBY_LIBRARY_DIR=#{RbConfig::CONFIG['libdir']}",
"-DRUBY_LIBRUBYARG=#{RbConfig::CONFIG['LIBRUBYARG_SHARED']}",
"-DCOUCHBASE_CXX_CLIENT_BUILD_STATIC=ON",
"-DCOUCHBASE_CXX_CLIENT_BUILD_SHARED=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_TESTS=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_DOCS=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_TOOLS=OFF",
"-DCOUCHBASE_CXX_CLIENT_BUILD_EXAMPLES=OFF",
"-DCOUCHBASE_CXX_CLIENT_INSTALL=OFF",
]

extconf_include = File.expand_path("cache/extconf_include.rb", __dir__)
Expand Down
1 change: 0 additions & 1 deletion ext/rcb_backend.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ initialize_cluster_options(const core::utils::connection_string& connstr,
static const auto sym_network = rb_id2sym(rb_intern("network"));
if (auto param = options::get_string(options, sym_network); param) {
cluster_options.network().preferred_network(param.value());
cluster_options.behavior().network(param.value());
}

static const auto sym_use_ip_protocol = rb_id2sym(rb_intern("use_ip_protocol"));
Expand Down
2 changes: 2 additions & 0 deletions ext/rcb_crud.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
#include <core/operations/document_touch.hxx>
#include <core/operations/document_unlock.hxx>
#include <core/utils/json.hxx>

#include <couchbase/cluster.hxx>
#include <couchbase/codec/encoded_value.hxx>
#include <couchbase/codec/tao_json_serializer.hxx>
#include <couchbase/codec/transcoder_traits.hxx>

#include <future>
Expand Down
3 changes: 2 additions & 1 deletion ext/rcb_version.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ init_version(VALUE mCouchbase)
name == "mozilla_ca_bundle_size") {
rb_hash_aset(cb_CoreInfo, rb_id2sym(rb_intern(name.c_str())), INT2FIX(std::stoi(value)));
} else if (name == "snapshot" || name == "static_stdlib" || name == "static_openssl" ||
name == "static_boringssl" || name == "mozilla_ca_bundle_embedded") {
name == "static_boringssl" || name == "columnar" || name == "static_target" ||
name == "mozilla_ca_bundle_embedded") {
rb_hash_aset(
cb_CoreInfo, rb_id2sym(rb_intern(name.c_str())), value == "true" ? Qtrue : Qfalse);
} else {
Expand Down

0 comments on commit fce1eb2

Please sign in to comment.