Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazizonoki committed Aug 22, 2024
1 parent 6ddc1f8 commit a1d771a
Show file tree
Hide file tree
Showing 38 changed files with 109 additions and 80 deletions.
3 changes: 3 additions & 0 deletions cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ function(_ydb_sdk_add_library Tgt)
$<BUILD_INTERFACE:${YDB_SDK_BINARY_DIR}>
$<BUILD_INTERFACE:${YDB_SDK_SOURCE_DIR}/include>
)
target_compile_definitions(${Tgt} ${includeMode}
YDB_SDK_USE_STD_STRING
)
endfunction()

function(_ydb_sdk_validate_public_headers)
Expand Down
4 changes: 2 additions & 2 deletions examples/vector_index/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ add_executable(vector_index)

target_link_libraries(vector_index PUBLIC
yutil
library-getopt
getopt
YDB-CPP-SDK::Table
)

Expand All @@ -15,7 +15,7 @@ vcs_info(vector_index)

if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
target_link_libraries(vector_index PUBLIC
library-cpuid_check
cpuid_check
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/client/topic/errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <ydb-cpp-sdk/client/types/status/status.h>
#include <ydb-cpp-sdk/client/types/status_codes.h>

#include <library/cpp/retry/retry_policy.h>
#include <ydb-cpp-sdk/library/retry/retry_policy.h>

namespace NYdb::NTopic {

Expand Down
2 changes: 1 addition & 1 deletion include/ydb-cpp-sdk/client/topic/retry_policy.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <ydb-cpp-sdk/client/types/status_codes.h>
#include <library/cpp/retry/retry_policy.h>
#include <ydb-cpp-sdk/library/retry/retry_policy.h>
#include <util/generic/ptr.h>

namespace NYdb::NTopic {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <ydb/public/sdk/cpp/src/library/yql_common/issue/protos/issue_severity.pb.h>
#include <src/library/yql_common/issue/protos/issue_severity.pb.h>

namespace NYql {

Expand Down
14 changes: 9 additions & 5 deletions include/ydb-cpp-sdk/type_switcher.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#pragma once

#ifdef YDB_SDK_USE_TSTRING
#include <util/generic/string.h>
#ifdef YDB_SDK_USE_STD_STRING

#include <string>
namespace NYdb {
using TStringType = TString;
using TStringType = std::string;
}

#else
#include <string>

#include <util/generic/string.h>
namespace NYdb {
using TStringType = std::string;
using TStringType = TString;
}

#endif
2 changes: 1 addition & 1 deletion src/api/protos/ydb_issue_message.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ message IssueMessage {
string message = 2;
Position end_position = 3;
uint32 issue_code = 4;
// Severity values from ydb/public/sdk/cpp/src/library/yql_common/issue/protos/issue_severity.proto
// Severity values from src/library/yql_common/issue/protos/issue_severity.proto
// FATAL = 0;
// ERROR = 1;
// WARNING = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ _ydb_sdk_add_library(impl-ydb_internal-kqp_session_common)
target_link_libraries(impl-ydb_internal-kqp_session_common PUBLIC
yutil
threading-future
lib-operation_id-protos
library-operation_id
client-impl-ydb_endpoints
)

Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/impl/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <ydb-cpp-sdk/client/types/status_codes.h>

#include <library/cpp/retry/retry_policy.h>
#include <ydb-cpp-sdk/library/retry/retry_policy.h>

namespace NYdb::NPersQueue {
ERetryErrorClass GetRetryErrorClass(EStatus status);
Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/basic_usage_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/ut_utils.h>
#include <src/client/persqueue_public/ut/ut_utils/ut_utils.h>

#include <library/cpp/testing/unittest/registar.h>
#include <library/cpp/threading/future/future.h>
Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/common_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <ydb/public/sdk/cpp/src/client/topic/impl/common.h>
#include <src/client/topic/impl/common.h>

#include <library/cpp/testing/unittest/registar.h>

Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/compress_executor_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/ut_utils.h>
#include <src/client/persqueue_public/ut/ut_utils/ut_utils.h>

namespace NYdb::NPersQueue::NTests {

Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/compression_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/ut_utils.h>
#include <src/client/persqueue_public/ut/ut_utils/ut_utils.h>

namespace NYdb::NPersQueue::NTests {

Expand Down
8 changes: 4 additions & 4 deletions src/client/persqueue_public/ut/read_session_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/ut_utils.h>
#include <src/client/persqueue_public/ut/ut_utils/ut_utils.h>

#define INCLUDE_YDB_INTERNAL_H
#include <ydb/public/sdk/cpp/src/client/impl/ydb_internal/logger/log.h>
#include <src/client/impl/ydb_internal/logger/log.h>
#undef INCLUDE_YDB_INTERNAL_H

#include <ydb/public/sdk/cpp/src/client/persqueue_public/persqueue.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/impl/read_session.h>
#include <src/client/persqueue_public/persqueue.h>
#include <src/client/persqueue_public/impl/read_session.h>

#include <library/cpp/streams/zstd/zstd.h>
#include <library/cpp/testing/gmock_in_unittest/gmock.h>
Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/retry_policy_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/ut_utils.h>
#include <src/client/persqueue_public/ut/ut_utils/ut_utils.h>

#include <library/cpp/threading/future/future.h>
#include <library/cpp/testing/unittest/registar.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <ydb-cpp-sdk/client/driver/driver.h>
#include <ydb-cpp-sdk/client/table/table.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/persqueue.h>
#include <src/client/persqueue_public/persqueue.h>

namespace NKikimr::NPersQueueTests {

Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/ut_utils/sdk_test_setup.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "test_server.h"
#include <ydb/public/sdk/cpp/src/library/persqueue/topic_parser_public/topic_parser.h>
#include <src/library/persqueue/topic_parser_public/topic_parser.h>
#include <library/cpp/logger/log.h>
#include <util/system/tempfile.h>

Expand Down
2 changes: 1 addition & 1 deletion src/client/persqueue_public/ut/ut_utils/test_server.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include <ydb/core/testlib/test_pq_client.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/persqueue.h>
#include <src/client/persqueue_public/persqueue.h>

#include <ydb/library/grpc/server/grpc_server.h>

Expand Down
10 changes: 5 additions & 5 deletions src/client/persqueue_public/ut/ut_utils/ut_utils.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/test_utils.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/sdk_test_setup.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/include/aliases.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/impl/write_session.h>
#include <src/client/persqueue_public/ut/ut_utils/test_utils.h>
#include <src/client/persqueue_public/ut/ut_utils/sdk_test_setup.h>
#include <src/client/persqueue_public/include/aliases.h>
#include <src/client/persqueue_public/impl/write_session.h>

#include <ydb/public/sdk/cpp/src/client/topic/common/executor_impl.h>
#include <src/client/topic/common/executor_impl.h>

using namespace NKikimr;
using namespace NKikimr::NPersQueueTests;
Expand Down
2 changes: 1 addition & 1 deletion src/client/proto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ target_link_libraries(client-ydb_proto PUBLIC
api-grpc
api-grpc-draft
api-protos
lib-operation_id-protos
library-operation_id
client-ydb_params
client-ydb_value
yql-public-issue-protos
Expand Down
2 changes: 1 addition & 1 deletion src/client/table/impl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ target_link_libraries(client-ydb_table-impl
threading-future
api-protos
api-grpc
lib-operation_id-protos
library-operation_id
client-impl-ydb_endpoints
impl-ydb_internal-session_pool
client-ydb_table-query_stats
Expand Down
12 changes: 6 additions & 6 deletions src/client/topic/ut/basic_usage_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include "ut_utils/managed_executor.h"
#include "ut_utils/topic_sdk_test_setup.h"
#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/ut_utils.h>
#include <src/client/persqueue_public/ut/ut_utils/ut_utils.h>

#include <ydb-cpp-sdk/client/topic/client.h>

#include <ydb/public/sdk/cpp/src/client/persqueue_public/persqueue.h>
#include <src/client/persqueue_public/persqueue.h>

#include <ydb/public/sdk/cpp/src/client/topic/impl/common.h>
#include <ydb/public/sdk/cpp/src/client/topic/common/executor_impl.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/impl/write_session.h>
#include <ydb/public/sdk/cpp/src/client/topic/impl/write_session.h>
#include <src/client/topic/impl/common.h>
#include <src/client/topic/common/executor_impl.h>
#include <src/client/persqueue_public/impl/write_session.h>
#include <src/client/topic/impl/write_session.h>

#include <library/cpp/testing/unittest/registar.h>
#include <library/cpp/testing/unittest/tests_data.h>
Expand Down
8 changes: 4 additions & 4 deletions src/client/topic/ut/describe_topic_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "ut_utils/topic_sdk_test_setup.h"

#include <format>
#include <ydb/public/sdk/cpp/src/library/persqueue/topic_parser_public/topic_parser.h>
#include <src/library/persqueue/topic_parser_public/topic_parser.h>
#include <src/api/protos/persqueue_error_codes_v1.pb.h>
#include <ydb-cpp-sdk/client/topic/client.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/persqueue.h>
#include <ydb/public/sdk/cpp/src/client/topic/common/log_lazy.h>
#include <ydb/public/sdk/cpp/src/client/topic/impl/common.h>
#include <src/client/persqueue_public/persqueue.h>
#include <src/client/topic/common/log_lazy.h>
#include <src/client/topic/impl/common.h>

#include <library/cpp/testing/unittest/registar.h>
#include <library/cpp/testing/unittest/tests_data.h>
Expand Down
12 changes: 6 additions & 6 deletions src/client/topic/ut/local_partition_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

#include <ydb/core/persqueue/ut/common/autoscaling_ut_common.h>

#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/ut_utils.h>
#include <src/client/persqueue_public/ut/ut_utils/ut_utils.h>

#include <ydb/public/sdk/cpp/src/client/topic/common/trace_lazy.h>
#include <src/client/topic/common/trace_lazy.h>
#include <ydb-cpp-sdk/client/topic/client.h>
#include <ydb/public/sdk/cpp/src/client/topic/ut/ut_utils/trace.h>
#include <src/client/topic/ut/ut_utils/trace.h>

#include <ydb/public/sdk/cpp/src/client/persqueue_public/persqueue.h>
#include <src/client/persqueue_public/persqueue.h>

#include <ydb/public/sdk/cpp/src/client/topic/impl/common.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/impl/write_session.h>
#include <src/client/topic/impl/common.h>
#include <src/client/persqueue_public/impl/write_session.h>

#include <library/cpp/testing/unittest/registar.h>
#include <library/cpp/testing/unittest/tests_data.h>
Expand Down
2 changes: 1 addition & 1 deletion src/client/topic/ut/topic_to_table_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <ydb-cpp-sdk/client/topic/client.h>
#include <ydb-cpp-sdk/client/table/table.h>
#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/ut_utils.h>
#include <src/client/persqueue_public/ut/ut_utils/ut_utils.h>
#include <ydb/core/keyvalue/keyvalue_events.h>
#include <ydb/core/persqueue/key.h>
#include <ydb/core/persqueue/blob.h>
Expand Down
2 changes: 1 addition & 1 deletion src/client/topic/ut/trace_ut.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <library/cpp/testing/unittest/registar.h>

#include <ydb/public/sdk/cpp/src/client/topic/ut/ut_utils/trace.h>
#include <src/client/topic/ut/ut_utils/trace.h>

namespace NYdb::NTopic::NTests {

Expand Down
4 changes: 2 additions & 2 deletions src/client/topic/ut/ut_utils/topic_sdk_test_setup.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include <ydb/public/sdk/cpp/src/client/persqueue_public/ut/ut_utils/test_server.h>
#include <src/client/persqueue_public/ut/ut_utils/test_server.h>

#include <ydb/public/sdk/cpp/src/client/topic/impl/write_session.h>
#include <src/client/topic/impl/write_session.h>

namespace NYdb::NTopic::NTests {

Expand Down
2 changes: 1 addition & 1 deletion src/client/topic/ut/ut_utils/trace.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <mutex>
#include <ydb/public/sdk/cpp/src/client/topic/ut/ut_utils/trace.h>
#include <src/client/topic/ut/ut_utils/trace.h>

#include "library/cpp/testing/unittest/registar.h"

Expand Down
2 changes: 1 addition & 1 deletion src/client/topic/ut/ut_utils/trace.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "ydb/public/sdk/cpp/src/client/topic/common/trace_lazy.h"
#include "src/client/topic/common/trace_lazy.h"

#include "library/cpp/logger/backend.h"
#include "library/cpp/logger/record.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <library/cpp/http/simple/http_client.h>
#include <library/cpp/json/json_reader.h>
#include <library/cpp/uri/uri.h>
#include <library/cpp/retry/retry_policy.h>
#include <ydb-cpp-sdk/library/retry/retry_policy.h>

#include <util/datetime/base.h>
#include <util/string/builder.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ TOauth2TokenExchangeParams ReadOauth2ConfigJson(const std::string& configJson, c
}

TOauth2TokenExchangeParams ReadOauth2ConfigFile(const std::string& configFilePath, const std::string& tokenEndpoint) {
return ReadOauth2ConfigJson(TFileInput(TStringType{configFilePath}).ReadAll(), tokenEndpoint);
return ReadOauth2ConfigJson(TFileInput(TString{configFilePath}).ReadAll(), tokenEndpoint);
}

} // namespace
Expand Down
2 changes: 1 addition & 1 deletion src/library/json_value/ydb_json_value.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <ydb-cpp-sdk/library/json_value/ydb_json_value.h>

#include <library/cpp/string_utils/base64/base64.h>
#include <src/library/string_utils/base64/base64.h>

#include <library/cpp/json/json_reader.h>
#include <util/string/builder.h>
Expand Down
2 changes: 1 addition & 1 deletion src/library/retry/retry.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <ydb-cpp-sdk/library/retry/retry_policy.h>
#include "utils.h"

#include <ydb/public/sdk/cpp/src/library/retry/protos/retry_options.pb.h>
#include <src/library/retry/protos/retry_options.pb.h>

#include <util/datetime/base.h>
#include <util/generic/typetraits.h>
Expand Down
32 changes: 17 additions & 15 deletions src/library/yql_common/issue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ add_subdirectory(protos)

_ydb_sdk_add_library(yql-public-issue)

target_link_libraries(yql-public-issue PUBLIC
yutil
protobuf::libprotobuf
colorizer
resource
api-protos
yql-public-issue-protos
yql-utils
enum_serialization_runtime
string_utils-misc
target_link_libraries(yql-public-issue
PUBLIC
yutil
protobuf::libprotobuf
colorizer
resource
api-protos
yql-public-issue-protos
yql-utils
enum_serialization_runtime
string_utils-misc
)

target_sources(yql-public-issue PRIVATE
yql_issue_id.cpp
yql_issue_message.cpp
yql_issue.cpp
out.cpp
target_sources(yql-public-issue
PRIVATE
yql_issue_id.cpp
yql_issue_message.cpp
yql_issue.cpp
out.cpp
)

_ydb_sdk_install_targets(TARGETS yql-public-issue)
Loading

0 comments on commit a1d771a

Please sign in to comment.