Skip to content

Commit

Permalink
Merge remote-tracking branch 'gh/develop' into feature/ci-mac
Browse files Browse the repository at this point in the history
  • Loading branch information
segoon committed Oct 22, 2024
2 parents 335d403 + 0d756f2 commit a8b6f45
Show file tree
Hide file tree
Showing 2,993 changed files with 195,462 additions and 201,212 deletions.
14 changes: 13 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
BasedOnStyle: google
BasedOnStyle: Google
DerivePointerAlignment: false
IncludeBlocks: Preserve
AttributeMacros: ["noexcept"]
IndentRequires: false
ColumnLimit: 120
IndentWidth: 4
TabWidth: 4
AccessModifierOffset: -4
BinPackParameters: false
BinPackArguments: false
AllowAllParametersOfDeclarationOnNextLine: false
AlignAfterOpenBracket: BlockIndent
AlwaysBreakAfterDefinitionReturnType: None
PenaltyReturnTypeOnItsOwnLine: 200
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/build*/
/cmake-build-*/
/docs/
/third_party/
CMakeLists.txt.user
compile_commands.json
tags
Expand Down
43 changes: 36 additions & 7 deletions .mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -1865,6 +1865,7 @@
"grpc/include/userver/ugrpc/impl/deadline_timepoint.hpp":"taxi/uservices/userver/grpc/include/userver/ugrpc/impl/deadline_timepoint.hpp",
"grpc/include/userver/ugrpc/impl/internal_tag_fwd.hpp":"taxi/uservices/userver/grpc/include/userver/ugrpc/impl/internal_tag_fwd.hpp",
"grpc/include/userver/ugrpc/impl/maybe_owned_string.hpp":"taxi/uservices/userver/grpc/include/userver/ugrpc/impl/maybe_owned_string.hpp",
"grpc/include/userver/ugrpc/impl/protobuf_collector.hpp":"taxi/uservices/userver/grpc/include/userver/ugrpc/impl/protobuf_collector.hpp",
"grpc/include/userver/ugrpc/impl/queue_runner.hpp":"taxi/uservices/userver/grpc/include/userver/ugrpc/impl/queue_runner.hpp",
"grpc/include/userver/ugrpc/impl/span.hpp":"taxi/uservices/userver/grpc/include/userver/ugrpc/impl/span.hpp",
"grpc/include/userver/ugrpc/impl/static_metadata.hpp":"taxi/uservices/userver/grpc/include/userver/ugrpc/impl/static_metadata.hpp",
Expand Down Expand Up @@ -1958,6 +1959,7 @@
"grpc/src/ugrpc/impl/internal_tag.hpp":"taxi/uservices/userver/grpc/src/ugrpc/impl/internal_tag.hpp",
"grpc/src/ugrpc/impl/logging.cpp":"taxi/uservices/userver/grpc/src/ugrpc/impl/logging.cpp",
"grpc/src/ugrpc/impl/logging.hpp":"taxi/uservices/userver/grpc/src/ugrpc/impl/logging.hpp",
"grpc/src/ugrpc/impl/protobuf_collector.cpp":"taxi/uservices/userver/grpc/src/ugrpc/impl/protobuf_collector.cpp",
"grpc/src/ugrpc/impl/protobuf_utils.cpp":"taxi/uservices/userver/grpc/src/ugrpc/impl/protobuf_utils.cpp",
"grpc/src/ugrpc/impl/protobuf_utils.hpp":"taxi/uservices/userver/grpc/src/ugrpc/impl/protobuf_utils.hpp",
"grpc/src/ugrpc/impl/queue_runner.cpp":"taxi/uservices/userver/grpc/src/ugrpc/impl/queue_runner.cpp",
Expand Down Expand Up @@ -2030,6 +2032,7 @@
"grpc/tests/generic_server_test.cpp":"taxi/uservices/userver/grpc/tests/generic_server_test.cpp",
"grpc/tests/logging_test.cpp":"taxi/uservices/userver/grpc/tests/logging_test.cpp",
"grpc/tests/middlewares_test.cpp":"taxi/uservices/userver/grpc/tests/middlewares_test.cpp",
"grpc/tests/protobuf_collector_test.cpp":"taxi/uservices/userver/grpc/tests/protobuf_collector_test.cpp",
"grpc/tests/protobuf_visit_test.cpp":"taxi/uservices/userver/grpc/tests/protobuf_visit_test.cpp",
"grpc/tests/secret_fields_test.cpp":"taxi/uservices/userver/grpc/tests/secret_fields_test.cpp",
"grpc/tests/serialization_test.cpp":"taxi/uservices/userver/grpc/tests/serialization_test.cpp",
Expand Down Expand Up @@ -3522,17 +3525,43 @@
"third_party/librseq/CMakeLists.txt":"taxi/uservices/userver/third_party/librseq/CMakeLists.txt",
"third_party/librseq/LICENSE.md":"taxi/uservices/userver/third_party/librseq/LICENSE.md",
"third_party/librseq/README.md":"taxi/uservices/userver/third_party/librseq/README.md",
"third_party/librseq/include/rseq/abi.h":"taxi/uservices/userver/third_party/librseq/include/rseq/abi.h",
"third_party/librseq/include/rseq/arch.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch.h",
"third_party/librseq/include/rseq/arch/aarch64.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/aarch64.h",
"third_party/librseq/include/rseq/arch/aarch64/bits.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/aarch64/bits.h",
"third_party/librseq/include/rseq/arch/arm.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/arm.h",
"third_party/librseq/include/rseq/arch/arm/bits.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/arm/bits.h",
"third_party/librseq/include/rseq/arch/generic/common.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/generic/common.h",
"third_party/librseq/include/rseq/arch/generic/thread-pointer.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/generic/thread-pointer.h",
"third_party/librseq/include/rseq/arch/mips.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/mips.h",
"third_party/librseq/include/rseq/arch/mips/bits.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/mips/bits.h",
"third_party/librseq/include/rseq/arch/ppc.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/ppc.h",
"third_party/librseq/include/rseq/arch/ppc/bits.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/ppc/bits.h",
"third_party/librseq/include/rseq/arch/ppc/thread-pointer.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/ppc/thread-pointer.h",
"third_party/librseq/include/rseq/arch/riscv.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/riscv.h",
"third_party/librseq/include/rseq/arch/riscv/bits.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/riscv/bits.h",
"third_party/librseq/include/rseq/arch/riscv/thread-pointer.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/riscv/thread-pointer.h",
"third_party/librseq/include/rseq/arch/s390.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/s390.h",
"third_party/librseq/include/rseq/arch/s390/bits.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/s390/bits.h",
"third_party/librseq/include/rseq/arch/templates/bits-reset.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/templates/bits-reset.h",
"third_party/librseq/include/rseq/arch/templates/bits.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/templates/bits.h",
"third_party/librseq/include/rseq/arch/x86.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/x86.h",
"third_party/librseq/include/rseq/arch/x86/bits.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/x86/bits.h",
"third_party/librseq/include/rseq/arch/x86/thread-pointer.h":"taxi/uservices/userver/third_party/librseq/include/rseq/arch/x86/thread-pointer.h",
"third_party/librseq/include/rseq/compiler.h":"taxi/uservices/userver/third_party/librseq/include/rseq/compiler.h",
"third_party/librseq/include/rseq/rseq-abi.h":"taxi/uservices/userver/third_party/librseq/include/rseq/rseq-abi.h",
"third_party/librseq/include/rseq/rseq-bits-reset.h":"taxi/uservices/userver/third_party/librseq/include/rseq/rseq-bits-reset.h",
"third_party/librseq/include/rseq/rseq-bits-template.h":"taxi/uservices/userver/third_party/librseq/include/rseq/rseq-bits-template.h",
"third_party/librseq/include/rseq/rseq-thread-pointer.h":"taxi/uservices/userver/third_party/librseq/include/rseq/rseq-thread-pointer.h",
"third_party/librseq/include/rseq/rseq-x86-bits.h":"taxi/uservices/userver/third_party/librseq/include/rseq/rseq-x86-bits.h",
"third_party/librseq/include/rseq/rseq-x86-thread-pointer.h":"taxi/uservices/userver/third_party/librseq/include/rseq/rseq-x86-thread-pointer.h",
"third_party/librseq/include/rseq/rseq-x86.h":"taxi/uservices/userver/third_party/librseq/include/rseq/rseq-x86.h",
"third_party/librseq/include/rseq/inject.h":"taxi/uservices/userver/third_party/librseq/include/rseq/inject.h",
"third_party/librseq/include/rseq/mempool.h":"taxi/uservices/userver/third_party/librseq/include/rseq/mempool.h",
"third_party/librseq/include/rseq/pseudocode.h":"taxi/uservices/userver/third_party/librseq/include/rseq/pseudocode.h",
"third_party/librseq/include/rseq/rseq.h":"taxi/uservices/userver/third_party/librseq/include/rseq/rseq.h",
"third_party/librseq/include/rseq/thread-pointer.h":"taxi/uservices/userver/third_party/librseq/include/rseq/thread-pointer.h",
"third_party/librseq/include/rseq/utils.h":"taxi/uservices/userver/third_party/librseq/include/rseq/utils.h",
"third_party/librseq/src/config.h":"taxi/uservices/userver/third_party/librseq/src/config.h",
"third_party/librseq/src/list.h":"taxi/uservices/userver/third_party/librseq/src/list.h",
"third_party/librseq/src/rseq-mempool.c":"taxi/uservices/userver/third_party/librseq/src/rseq-mempool.c",
"third_party/librseq/src/rseq-utils.h":"taxi/uservices/userver/third_party/librseq/src/rseq-utils.h",
"third_party/librseq/src/rseq.c":"taxi/uservices/userver/third_party/librseq/src/rseq.c",
"third_party/librseq/src/smp.c":"taxi/uservices/userver/third_party/librseq/src/smp.c",
"third_party/librseq/src/smp.h":"taxi/uservices/userver/third_party/librseq/src/smp.h",
"third_party/llhttp/CMakeLists.txt":"taxi/uservices/userver/third_party/llhttp/CMakeLists.txt",
"third_party/llhttp/LICENSE-MIT":"taxi/uservices/userver/third_party/llhttp/LICENSE-MIT",
"third_party/llhttp/README.md":"taxi/uservices/userver/third_party/llhttp/README.md",
Expand Down
3 changes: 2 additions & 1 deletion .piglet-meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"project":"userver"
"project":"userver",
"repository":"arcadia"
}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CMAKE_COMMON_FLAGS ?= -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
CMAKE_DEBUG_FLAGS ?= -DUSERVER_SANITIZE=addr;ub
CMAKE_DEBUG_FLAGS ?= '-DUSERVER_SANITIZE=addr;ub'
CMAKE_RELEASE_FLAGS ?=
KERNEL := $(shell uname -s)
NPROCS ?= $(shell nproc)
Expand Down
156 changes: 64 additions & 92 deletions chaotic/golden_tests/output/schemas/allof/allof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,139 +7,111 @@
namespace ns {

bool operator==(const ns::AllOf::Foo__P0& lhs, const ns::AllOf::Foo__P0& rhs) {
return lhs.foo == rhs.foo && lhs.extra == rhs.extra &&
return lhs.foo == rhs.foo && lhs.extra == rhs.extra &&

true;
true;
}

bool operator==(const ns::AllOf::Foo__P1& lhs, const ns::AllOf::Foo__P1& rhs) {
return lhs.bar == rhs.bar && lhs.extra == rhs.extra &&
return lhs.bar == rhs.bar && lhs.extra == rhs.extra &&

true;
true;
}

bool operator==(const ns::AllOf::Foo& lhs, const ns::AllOf::Foo& rhs) {
return static_cast<const ns::AllOf::Foo__P0&>(lhs) ==
static_cast<const ns::AllOf::Foo__P0&>(rhs) &&
static_cast<const ns::AllOf::Foo__P1&>(lhs) ==
static_cast<const ns::AllOf::Foo__P1&>(rhs);
return static_cast<const ns::AllOf::Foo__P0&>(lhs) == static_cast<const ns::AllOf::Foo__P0&>(rhs) &&
static_cast<const ns::AllOf::Foo__P1&>(lhs) == static_cast<const ns::AllOf::Foo__P1&>(rhs);
}

bool operator==(const ns::AllOf& lhs, const ns::AllOf& rhs) {
return lhs.foo == rhs.foo && true;
}
bool operator==(const ns::AllOf& lhs, const ns::AllOf& rhs) { return lhs.foo == rhs.foo && true; }

USERVER_NAMESPACE::logging::LogHelper& operator<<(
USERVER_NAMESPACE::logging::LogHelper& lh,
const ns::AllOf::Foo__P0& value) {
return lh << ToString(USERVER_NAMESPACE::formats::json::ValueBuilder(value)
.ExtractValue());
USERVER_NAMESPACE::logging::LogHelper&
operator<<(USERVER_NAMESPACE::logging::LogHelper& lh, const ns::AllOf::Foo__P0& value) {
return lh << ToString(USERVER_NAMESPACE::formats::json::ValueBuilder(value).ExtractValue());
}

USERVER_NAMESPACE::logging::LogHelper& operator<<(
USERVER_NAMESPACE::logging::LogHelper& lh,
const ns::AllOf::Foo__P1& value) {
return lh << ToString(USERVER_NAMESPACE::formats::json::ValueBuilder(value)
.ExtractValue());
USERVER_NAMESPACE::logging::LogHelper&
operator<<(USERVER_NAMESPACE::logging::LogHelper& lh, const ns::AllOf::Foo__P1& value) {
return lh << ToString(USERVER_NAMESPACE::formats::json::ValueBuilder(value).ExtractValue());
}

USERVER_NAMESPACE::logging::LogHelper& operator<<(
USERVER_NAMESPACE::logging::LogHelper& lh, const ns::AllOf::Foo& value) {
return lh << ToString(USERVER_NAMESPACE::formats::json::ValueBuilder(value)
.ExtractValue());
USERVER_NAMESPACE::logging::LogHelper&
operator<<(USERVER_NAMESPACE::logging::LogHelper& lh, const ns::AllOf::Foo& value) {
return lh << ToString(USERVER_NAMESPACE::formats::json::ValueBuilder(value).ExtractValue());
}

USERVER_NAMESPACE::logging::LogHelper& operator<<(
USERVER_NAMESPACE::logging::LogHelper& lh, const ns::AllOf& value) {
return lh << ToString(USERVER_NAMESPACE::formats::json::ValueBuilder(value)
.ExtractValue());
USERVER_NAMESPACE::logging::LogHelper& operator<<(USERVER_NAMESPACE::logging::LogHelper& lh, const ns::AllOf& value) {
return lh << ToString(USERVER_NAMESPACE::formats::json::ValueBuilder(value).ExtractValue());
}

AllOf::Foo__P0 Parse(
USERVER_NAMESPACE::formats::json::Value json,
USERVER_NAMESPACE::formats::parse::To<ns::AllOf::Foo__P0> to) {
return Parse<USERVER_NAMESPACE::formats::json::Value>(json, to);
AllOf::Foo__P0
Parse(USERVER_NAMESPACE::formats::json::Value json, USERVER_NAMESPACE::formats::parse::To<ns::AllOf::Foo__P0> to) {
return Parse<USERVER_NAMESPACE::formats::json::Value>(json, to);
}

AllOf::Foo__P1 Parse(
USERVER_NAMESPACE::formats::json::Value json,
USERVER_NAMESPACE::formats::parse::To<ns::AllOf::Foo__P1> to) {
return Parse<USERVER_NAMESPACE::formats::json::Value>(json, to);
AllOf::Foo__P1
Parse(USERVER_NAMESPACE::formats::json::Value json, USERVER_NAMESPACE::formats::parse::To<ns::AllOf::Foo__P1> to) {
return Parse<USERVER_NAMESPACE::formats::json::Value>(json, to);
}

AllOf::Foo Parse(USERVER_NAMESPACE::formats::json::Value json,
USERVER_NAMESPACE::formats::parse::To<ns::AllOf::Foo> to) {
return Parse<USERVER_NAMESPACE::formats::json::Value>(json, to);
AllOf::Foo
Parse(USERVER_NAMESPACE::formats::json::Value json, USERVER_NAMESPACE::formats::parse::To<ns::AllOf::Foo> to) {
return Parse<USERVER_NAMESPACE::formats::json::Value>(json, to);
}

AllOf Parse(USERVER_NAMESPACE::formats::json::Value json,
USERVER_NAMESPACE::formats::parse::To<ns::AllOf> to) {
return Parse<USERVER_NAMESPACE::formats::json::Value>(json, to);
AllOf Parse(USERVER_NAMESPACE::formats::json::Value json, USERVER_NAMESPACE::formats::parse::To<ns::AllOf> to) {
return Parse<USERVER_NAMESPACE::formats::json::Value>(json, to);
}

/* Parse(USERVER_NAMESPACE::formats::yaml::Value, To<ns::AllOf>) was not
* generated: ns::AllOf::Foo__P0 has JSON-specific field "extra" */
/* Parse(USERVER_NAMESPACE::formats::yaml::Value, To<ns::AllOf>) was not generated: ns::AllOf::Foo__P0 has JSON-specific
* field "extra" */

/* Parse(USERVER_NAMESPACE::yaml_config::Value, To<ns::AllOf>) was not
* generated: ns::AllOf::Foo__P0 has JSON-specific field "extra" */
/* Parse(USERVER_NAMESPACE::yaml_config::Value, To<ns::AllOf>) was not generated: ns::AllOf::Foo__P0 has JSON-specific
* field "extra" */

USERVER_NAMESPACE::formats::json::Value Serialize(
[[maybe_unused]] const ns::AllOf::Foo__P0& value,
USERVER_NAMESPACE::formats::serialize::To<
USERVER_NAMESPACE::formats::json::Value>) {
USERVER_NAMESPACE::formats::json::ValueBuilder vb = value.extra;
USERVER_NAMESPACE::formats::json::Value
Serialize([[maybe_unused]] const ns::AllOf::Foo__P0& value, USERVER_NAMESPACE::formats::serialize::To<USERVER_NAMESPACE::formats::json::Value>) {
USERVER_NAMESPACE::formats::json::ValueBuilder vb = value.extra;

if (value.foo) {
vb["foo"] = USERVER_NAMESPACE::chaotic::Primitive<std::string>{*value.foo};
}
if (value.foo) {
vb["foo"] = USERVER_NAMESPACE::chaotic::Primitive<std::string>{*value.foo};
}

return vb.ExtractValue();
return vb.ExtractValue();
}

USERVER_NAMESPACE::formats::json::Value Serialize(
[[maybe_unused]] const ns::AllOf::Foo__P1& value,
USERVER_NAMESPACE::formats::serialize::To<
USERVER_NAMESPACE::formats::json::Value>) {
USERVER_NAMESPACE::formats::json::ValueBuilder vb = value.extra;
USERVER_NAMESPACE::formats::json::Value
Serialize([[maybe_unused]] const ns::AllOf::Foo__P1& value, USERVER_NAMESPACE::formats::serialize::To<USERVER_NAMESPACE::formats::json::Value>) {
USERVER_NAMESPACE::formats::json::ValueBuilder vb = value.extra;

if (value.bar) {
vb["bar"] = USERVER_NAMESPACE::chaotic::Primitive<int>{*value.bar};
}
if (value.bar) {
vb["bar"] = USERVER_NAMESPACE::chaotic::Primitive<int>{*value.bar};
}

return vb.ExtractValue();
return vb.ExtractValue();
}

USERVER_NAMESPACE::formats::json::Value Serialize(
const ns::AllOf::Foo& value, USERVER_NAMESPACE::formats::serialize::To<
USERVER_NAMESPACE::formats::json::Value>) {
USERVER_NAMESPACE::formats::json::ValueBuilder vb =
USERVER_NAMESPACE::formats::common::Type::kObject;
USERVER_NAMESPACE::formats::common::Merge(
vb,
USERVER_NAMESPACE::formats::json::ValueBuilder{
static_cast<ns::AllOf::Foo__P0>(value)}
.ExtractValue());
USERVER_NAMESPACE::formats::common::Merge(
vb,
USERVER_NAMESPACE::formats::json::ValueBuilder{
static_cast<ns::AllOf::Foo__P1>(value)}
.ExtractValue());
return vb.ExtractValue();
USERVER_NAMESPACE::formats::json::Value
Serialize(const ns::AllOf::Foo& value, USERVER_NAMESPACE::formats::serialize::To<USERVER_NAMESPACE::formats::json::Value>) {
USERVER_NAMESPACE::formats::json::ValueBuilder vb = USERVER_NAMESPACE::formats::common::Type::kObject;
USERVER_NAMESPACE::formats::common::Merge(
vb, USERVER_NAMESPACE::formats::json::ValueBuilder{static_cast<ns::AllOf::Foo__P0>(value)}.ExtractValue()
);
USERVER_NAMESPACE::formats::common::Merge(
vb, USERVER_NAMESPACE::formats::json::ValueBuilder{static_cast<ns::AllOf::Foo__P1>(value)}.ExtractValue()
);
return vb.ExtractValue();
}

USERVER_NAMESPACE::formats::json::Value Serialize(
[[maybe_unused]] const ns::AllOf& value,
USERVER_NAMESPACE::formats::serialize::To<
USERVER_NAMESPACE::formats::json::Value>) {
USERVER_NAMESPACE::formats::json::ValueBuilder vb =
USERVER_NAMESPACE::formats::common::Type::kObject;
USERVER_NAMESPACE::formats::json::Value
Serialize([[maybe_unused]] const ns::AllOf& value, USERVER_NAMESPACE::formats::serialize::To<USERVER_NAMESPACE::formats::json::Value>) {
USERVER_NAMESPACE::formats::json::ValueBuilder vb = USERVER_NAMESPACE::formats::common::Type::kObject;

if (value.foo) {
vb["foo"] =
USERVER_NAMESPACE::chaotic::Primitive<ns::AllOf::Foo>{*value.foo};
}
if (value.foo) {
vb["foo"] = USERVER_NAMESPACE::chaotic::Primitive<ns::AllOf::Foo>{*value.foo};
}

return vb.ExtractValue();
return vb.ExtractValue();
}

} // namespace ns
Loading

0 comments on commit a8b6f45

Please sign in to comment.