diff --git a/build/conf/go.conf b/build/conf/go.conf index 44fdb693e3f5..c58492e17cdd 100644 --- a/build/conf/go.conf +++ b/build/conf/go.conf @@ -250,13 +250,11 @@ GO_LINK_EXE= GO_LINK_EXE+=$GENERATE_MF GO_LINK_EXE+=&& $GENERATE_VCS_C_INFO_NODEP GO_LINK_EXE+=&& $GENERATE_VCS_GO_INFO_NODEP -GO_LINK_EXE+=&& $COPY_PROFILE_RUNTIME GO_LINK_EXE+=&& $_GO_LINK_EXE_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS) GO_LINK_TEST= GO_LINK_TEST+=$GENERATE_VCS_C_INFO_NODEP GO_LINK_TEST+=&& $GENERATE_VCS_GO_INFO_NODEP -GO_LINK_TEST+=&& $COPY_PROFILE_RUNTIME GO_LINK_TEST+=&& $_GO_LINK_TEST_IMPL($_GO_SRCS_VALUE CGO_FILES $_CGO_SRCS_VALUE EXTRA_TEXT_INPUTS $_GO_EMBED_INPUTS GO_TEST_FILES $_GO_TEST_SRCS_VALUE GO_XTEST_FILES $_GO_XTEST_SRCS_VALUE) GO_LINK_DLL= @@ -873,11 +871,6 @@ module GO_PROGRAM: _GO_BASE_UNIT { _GO_BUILDMODE=++buildmode=pie } - when ($NEED_PROFILE_RUNTIME == "yes") { - LDFLAGS+=-resource-dir=contrib/libs/clang-rt - PEERDIR+=contrib/libs/clang${CLANG_VER}-rt/lib/profile - } - when ($OPENSOURCE == "yes" && $AUTOCHECK == "yes") { # FIXME: Replace AUTOCHECK == yes with _not a host platform_ check after YMAKE-218 MODULE_LICENSES_RESTRICTION_TYPES = ALLOW_ONLY diff --git a/build/external_resources/yexport/resources.json b/build/external_resources/yexport/resources.json index 837dc6a6530c..4d3bedd7a4ea 100644 --- a/build/external_resources/yexport/resources.json +++ b/build/external_resources/yexport/resources.json @@ -1,13 +1,13 @@ { "by_platform": { "darwin": { - "uri": "sbr:5562968267" + "uri": "sbr:5641379824" }, "darwin-arm64": { - "uri": "sbr:5562965675" + "uri": "sbr:5641378801" }, "linux": { - "uri": "sbr:5562947428" + "uri": "sbr:5641398951" } } } diff --git a/build/external_resources/ymake/public.resources.json b/build/external_resources/ymake/public.resources.json index cfe29ad8eb24..b695ea101efa 100644 --- a/build/external_resources/ymake/public.resources.json +++ b/build/external_resources/ymake/public.resources.json @@ -1,19 +1,19 @@ { "by_platform": { "darwin": { - "uri": "sbr:5569062376" + "uri": "sbr:5622651213" }, "darwin-arm64": { - "uri": "sbr:5569072879" + "uri": "sbr:5622657921" }, "linux": { - "uri": "sbr:5569070627" + "uri": "sbr:5622653964" }, "linux-aarch64": { - "uri": "sbr:5569095361" + "uri": "sbr:5622652638" }, "win32-clang-cl": { - "uri": "sbr:5569066861" + "uri": "sbr:5622653810" } } } diff --git a/build/external_resources/ymake/resources.json b/build/external_resources/ymake/resources.json index 0e5983e05659..cf0a575548a7 100644 --- a/build/external_resources/ymake/resources.json +++ b/build/external_resources/ymake/resources.json @@ -1,19 +1,19 @@ { "by_platform": { "darwin": { - "uri": "sbr:5569055879" + "uri": "sbr:5622649543" }, "darwin-arm64": { - "uri": "sbr:5569046692" + "uri": "sbr:5622648352" }, "linux": { - "uri": "sbr:5569080477" + "uri": "sbr:5622649049" }, "linux-aarch64": { - "uri": "sbr:5569058127" + "uri": "sbr:5622653320" }, "win32-clang-cl": { - "uri": "sbr:5569069854" + "uri": "sbr:5622653040" } } } diff --git a/build/mapping.conf.json b/build/mapping.conf.json index 0ffef2708488..c02eb6afe580 100644 --- a/build/mapping.conf.json +++ b/build/mapping.conf.json @@ -127,34 +127,42 @@ "5498749381": "https://devtools-registry.s3.yandex.net/5498749381", "5534092912": "https://devtools-registry.s3.yandex.net/5534092912", "5562971772": "https://devtools-registry.s3.yandex.net/5562971772", + "5641388522": "https://devtools-registry.s3.yandex.net/5641388522", "5486590469": "https://devtools-registry.s3.yandex.net/5486590469", "5498750509": "https://devtools-registry.s3.yandex.net/5498750509", "5534043120": "https://devtools-registry.s3.yandex.net/5534043120", "5562958333": "https://devtools-registry.s3.yandex.net/5562958333", + "5641392899": "https://devtools-registry.s3.yandex.net/5641392899", "5486590393": "https://devtools-registry.s3.yandex.net/5486590393", "5498735180": "https://devtools-registry.s3.yandex.net/5498735180", "5534059422": "https://devtools-registry.s3.yandex.net/5534059422", "5562961825": "https://devtools-registry.s3.yandex.net/5562961825", + "5641386025": "https://devtools-registry.s3.yandex.net/5641386025", "5476908047": "https://devtools-registry.s3.yandex.net/5476908047", "5509380757": "https://devtools-registry.s3.yandex.net/5509380757", "5550834592": "https://devtools-registry.s3.yandex.net/5550834592", "5569062376": "https://devtools-registry.s3.yandex.net/5569062376", + "5622651213": "https://devtools-registry.s3.yandex.net/5622651213", "5476891477": "https://devtools-registry.s3.yandex.net/5476891477", "5509369518": "https://devtools-registry.s3.yandex.net/5509369518", "5550838146": "https://devtools-registry.s3.yandex.net/5550838146", "5569072879": "https://devtools-registry.s3.yandex.net/5569072879", + "5622657921": "https://devtools-registry.s3.yandex.net/5622657921", "5476896849": "https://devtools-registry.s3.yandex.net/5476896849", "5509364024": "https://devtools-registry.s3.yandex.net/5509364024", "5550826871": "https://devtools-registry.s3.yandex.net/5550826871", "5569070627": "https://devtools-registry.s3.yandex.net/5569070627", + "5622653964": "https://devtools-registry.s3.yandex.net/5622653964", "5476895322": "https://devtools-registry.s3.yandex.net/5476895322", "5509360013": "https://devtools-registry.s3.yandex.net/5509360013", "5550843115": "https://devtools-registry.s3.yandex.net/5550843115", "5569095361": "https://devtools-registry.s3.yandex.net/5569095361", + "5622652638": "https://devtools-registry.s3.yandex.net/5622652638", "5476896707": "https://devtools-registry.s3.yandex.net/5476896707", "5509388614": "https://devtools-registry.s3.yandex.net/5509388614", "5550838970": "https://devtools-registry.s3.yandex.net/5550838970", "5569066861": "https://devtools-registry.s3.yandex.net/5569066861", + "5622653810": "https://devtools-registry.s3.yandex.net/5622653810", "2980468199": "https://devtools-registry.s3.yandex.net/2980468199", "5562224408": "https://devtools-registry.s3.yandex.net/5562224408" }, @@ -285,34 +293,42 @@ "5498749381": "yexport for darwin", "5534092912": "yexport for darwin", "5562971772": "yexport for darwin", + "5641388522": "yexport for darwin", "5486590469": "yexport for darwin-arm64", "5498750509": "yexport for darwin-arm64", "5534043120": "yexport for darwin-arm64", "5562958333": "yexport for darwin-arm64", + "5641392899": "yexport for darwin-arm64", "5486590393": "yexport for linux", "5498735180": "yexport for linux", "5534059422": "yexport for linux", "5562961825": "yexport for linux", + "5641386025": "yexport for linux", "5476908047": "ymake for darwin", "5509380757": "ymake for darwin", "5550834592": "ymake for darwin", "5569062376": "ymake for darwin", + "5622651213": "ymake for darwin", "5476891477": "ymake for darwin-arm64", "5509369518": "ymake for darwin-arm64", "5550838146": "ymake for darwin-arm64", "5569072879": "ymake for darwin-arm64", + "5622657921": "ymake for darwin-arm64", "5476896849": "ymake for linux", "5509364024": "ymake for linux", "5550826871": "ymake for linux", "5569070627": "ymake for linux", + "5622653964": "ymake for linux", "5476895322": "ymake for linux-aarch64", "5509360013": "ymake for linux-aarch64", "5550843115": "ymake for linux-aarch64", "5569095361": "ymake for linux-aarch64", + "5622652638": "ymake for linux-aarch64", "5476896707": "ymake.exe for win32-clang-cl", "5509388614": "ymake.exe for win32-clang-cl", "5550838970": "ymake.exe for win32-clang-cl", "5569066861": "ymake.exe for win32-clang-cl", + "5622653810": "ymake.exe for win32-clang-cl", "2980468199": "ytexec for linux", "5562224408": "ytexec for linux" }, diff --git a/build/plugins/lib/test_const/__init__.py b/build/plugins/lib/test_const/__init__.py index e928f601551c..d17a8a652bd5 100644 --- a/build/plugins/lib/test_const/__init__.py +++ b/build/plugins/lib/test_const/__init__.py @@ -139,6 +139,7 @@ "coverage_extractor", "exectest", "gtest", + "go_test", # java tests might use shared libraries "java", "py2test", diff --git a/build/plugins/yql_python_udf.py b/build/plugins/yql_python_udf.py index 5a0bb69c6301..c45e5b7696fe 100644 --- a/build/plugins/yql_python_udf.py +++ b/build/plugins/yql_python_udf.py @@ -44,7 +44,7 @@ def onregister_yql_python_udf(unit, *args): path = name + '.yql_python_udf.cpp' libra_flag = '1' if add_libra_modules else '0' - unit.onpython( + unit.onrun_python2( [ 'build/scripts/gen_yql_python_udf.py', flavor, diff --git a/build/scripts/clang_static_analyzer.py b/build/scripts/clang_static_analyzer.py index 65df8816af15..128d45fdad65 100644 --- a/build/scripts/clang_static_analyzer.py +++ b/build/scripts/clang_static_analyzer.py @@ -3,9 +3,9 @@ import os import re import argparse -import yaml +import json -CLANG_SA_CONFIG='static_analyzer.yaml' +CLANG_SA_CONFIG='static_analyzer.json' def parse_args(): parser = argparse.ArgumentParser() @@ -31,7 +31,7 @@ def parse_config(config_file): conf = None try: with open(config_file, 'r') as afile: - conf = yaml.safe_load(afile) + conf = json.load(afile) except: conf = None return conf @@ -61,6 +61,10 @@ def main(): config_file = find_config(args.config_file) conf = parse_config(config_file) + # Ensure we can read config + if not conf: + raise ValueError(f"Cant parse config file, check its syntax: {config_file}") + # Ensure we have at least one check if ('checks' not in conf) or (not conf['checks']): raise ValueError("There are no checks in the config file") diff --git a/build/scripts/create_recursive_library_for_cmake.py b/build/scripts/create_recursive_library_for_cmake.py new file mode 100644 index 000000000000..0023e7d02a1d --- /dev/null +++ b/build/scripts/create_recursive_library_for_cmake.py @@ -0,0 +1,201 @@ +# Custom script is necessary because CMake does not yet support creating static libraries combined with dependencies +# https://gitlab.kitware.com/cmake/cmake/-/issues/22975 +# +# This script is intended to be used set as a CXX_LINKER_LAUNCHER property for recursive library targets. +# It parses the linking command and transforms it to archiving commands combining static libraries from dependencies. + +import argparse +import os +import shlex +import subprocess +import sys +import tempfile + + +class Opts(object): + def __init__(self, args): + argparser = argparse.ArgumentParser(allow_abbrev=False) + argparser.add_argument('--cmake-binary-dir', required=True) + argparser.add_argument('--cmake-ar', required=True) + argparser.add_argument('--cmake-ranlib', required=True) + argparser.add_argument('--cmake-host-system-name', required=True) + argparser.add_argument('--cmake-cxx-standard-libraries') + argparser.add_argument('--global-part-suffix', required=True) + self.parsed_args, other_args = argparser.parse_known_args(args=args) + + if len(other_args) < 2: + # must contain at least '--linking-cmdline' and orginal linking tool name + raise Exception('not enough arguments') + if other_args[0] != '--linking-cmdline': + raise Exception("expected '--linking-cmdline' arg, got {}".format(other_args[0])) + + self.is_msvc_linker = other_args[1].endswith('\\link.exe') + + is_host_system_windows = self.parsed_args.cmake_host_system_name == 'Windows' + std_libraries_to_exclude_from_input = ( + set(self.parsed_args.cmake_cxx_standard_libraries.split()) + if self.parsed_args.cmake_cxx_standard_libraries is not None + else set() + ) + msvc_preserved_option_prefixes = [ + 'errorreport', + 'machine:', + 'nodefaultlib', + 'nologo', + 'subsystem', + ] + + self.preserved_options = [] + + # these variables can contain paths absolute or relative to CMAKE_BINARY_DIR + self.global_libs_and_objects_input = [] + self.non_global_libs_input = [] + self.output = None + + def is_external_library(path): + """ + Check whether this library has been built in this CMake project or came from Conan-provided dependencies + (these use absolute paths). + If it is a library that is added from some other path (like CUDA) return True + """ + return not (os.path.exists(path) or os.path.exists(os.path.join(self.parsed_args.cmake_binary_dir, path))) + + def process_input(args): + i = 0 + is_in_whole_archive = False + + while i < len(args): + arg = args[i] + if is_host_system_windows and ((arg[0] == '/') or (arg[0] == '-')): + arg_wo_specifier_lower = arg[1:].lower() + if arg_wo_specifier_lower.startswith('out:'): + self.output = arg[len('/out:') :] + elif arg_wo_specifier_lower.startswith('wholearchive:'): + lib_path = arg[len('/wholearchive:') :] + if not is_external_library(lib_path): + self.global_libs_and_objects_input.append(lib_path) + else: + for preserved_option_prefix in msvc_preserved_option_prefixes: + if arg_wo_specifier_lower.startswith(preserved_option_prefix): + self.preserved_options.append(arg) + break + # other flags are non-linking related and just ignored + elif arg[0] == '-': + if arg == '-o': + if (i + 1) >= len(args): + raise Exception('-o flag without an argument') + self.output = args[i + 1] + i += 1 + elif arg == '-Wl,--whole-archive': + is_in_whole_archive = True + elif arg == '-Wl,--no-whole-archive': + is_in_whole_archive = False + elif arg.startswith('-Wl,-force_load,'): + lib_path = arg[len('-Wl,-force_load,') :] + if not is_external_library(lib_path): + self.global_libs_and_objects_input.append(lib_path) + elif arg == '-isysroot': + i += 1 + # other flags are non-linking related and just ignored + elif arg[0] == '@': + # response file with args + with open(arg[1:]) as response_file: + parsed_args = shlex.shlex(response_file, posix=False, punctuation_chars=False) + parsed_args.whitespace_split = True + args_in_response_file = list(arg.strip('"') for arg in parsed_args) + process_input(args_in_response_file) + elif not is_external_library(arg): + if is_in_whole_archive or arg.endswith('.o') or arg.endswith('.obj'): + self.global_libs_and_objects_input.append(arg) + elif arg not in std_libraries_to_exclude_from_input: + self.non_global_libs_input.append(arg) + i += 1 + + process_input(other_args[2:]) + + if self.output is None: + raise Exception("No output specified") + + if (len(self.global_libs_and_objects_input) == 0) and (len(self.non_global_libs_input) == 0): + raise Exception("List of input objects and libraries is empty") + + +class FilesCombiner(object): + def __init__(self, opts): + self.opts = opts + + archiver_tool_path = opts.parsed_args.cmake_ar + if sys.platform.startswith('darwin'): + # force LIBTOOL even if CMAKE_AR is defined because 'ar' under Darwin does not contain the necessary options + arch_type = 'LIBTOOL' + archiver_tool_path = 'libtool' + elif opts.is_msvc_linker: + arch_type = 'LIB' + elif opts.parsed_args.cmake_ar.endswith('llvm-ar'): + arch_type = 'LLVM_AR' + elif opts.parsed_args.cmake_ar.endswith('ar'): + arch_type = 'GNU_AR' + else: + raise Exception('Unsupported arch type for CMAKE_AR={}'.format(opts.parsed_args.cmake_ar)) + + self.archiving_cmd_prefix = [ + sys.executable, + os.path.join(os.path.dirname(os.path.abspath(__file__)), 'link_lib.py'), + archiver_tool_path, + arch_type, + 'gnu', # llvm_ar_format, used only if arch_type == 'LLVM_AR' + opts.parsed_args.cmake_binary_dir, + 'None', # plugin. Unused for now + ] + # the remaining archiving cmd args are [output, .. input .. ] + + def do(self, output, input_list): + input_file_path = None + try: + if self.opts.is_msvc_linker: + # use response file for input (because of Windows cmdline length limitations) + + # can't use NamedTemporaryFile because of permissions issues on Windows + input_file_fd, input_file_path = tempfile.mkstemp() + try: + input_file = os.fdopen(input_file_fd, 'w') + for input in input_list: + if ' ' in input: + input_file.write('"{}" '.format(input)) + else: + input_file.write('{} '.format(input)) + input_file.flush() + finally: + os.close(input_file_fd) + input_args = ['@' + input_file_path] + else: + input_args = input_list + + cmd = self.archiving_cmd_prefix + [output] + self.opts.preserved_options + input_args + subprocess.check_call(cmd) + finally: + if input_file_path is not None: + os.remove(input_file_path) + + if not self.opts.is_msvc_linker: + subprocess.check_call([self.opts.parsed_args.cmake_ranlib, output]) + + +if __name__ == "__main__": + opts = Opts(sys.argv[1:]) + + output_prefix, output_ext = os.path.splitext(opts.output) + globals_output = output_prefix + opts.parsed_args.global_part_suffix + output_ext + + if os.path.exists(globals_output): + os.remove(globals_output) + if os.path.exists(opts.output): + os.remove(opts.output) + + files_combiner = FilesCombiner(opts) + + if len(opts.global_libs_and_objects_input) > 0: + files_combiner.do(globals_output, opts.global_libs_and_objects_input) + + if len(opts.non_global_libs_input) > 0: + files_combiner.do(opts.output, opts.non_global_libs_input) diff --git a/build/scripts/gather_swig_java.cmake b/build/scripts/gather_swig_java.cmake new file mode 100644 index 000000000000..fa0acf42c125 --- /dev/null +++ b/build/scripts/gather_swig_java.cmake @@ -0,0 +1,3 @@ +file(GLOB JAVA_FILES ${JAVA_SRC_DIR}/*.java) +list(JOIN JAVA_FILES "\n" JAVA_LST_CONTENT) +file(WRITE ${JAVA_LST} ${JAVA_LST_CONTENT}) diff --git a/build/scripts/go_tool.py b/build/scripts/go_tool.py index 05db99149801..26920553b587 100644 --- a/build/scripts/go_tool.py +++ b/build/scripts/go_tool.py @@ -26,6 +26,7 @@ FIXED_CGO1_SUFFIX = '.fixed.cgo1.go' COMPILE_OPTIMIZATION_FLAGS = ('-N',) +IGNORED_FLAGS = ['-fprofile-instr-generate', '-fcoverage-mapping'] def get_trimpath_args(args): @@ -117,7 +118,8 @@ def preprocess_args(args): args.srcs = srcs if args.extldflags: - args.extldflags = pwa.ProcessWholeArchiveOption(args.targ_os).construct_cmd(args.extldflags) + tmp = [flag for flag in args.extldflags if flag not in IGNORED_FLAGS] + args.extldflags = pwa.ProcessWholeArchiveOption(args.targ_os).construct_cmd(tmp) classify_srcs(args.srcs, args) diff --git a/build/sysincl/unsorted.yml b/build/sysincl/unsorted.yml index aad6f810b71a..224064c6612d 100644 --- a/build/sysincl/unsorted.yml +++ b/build/sysincl/unsorted.yml @@ -917,35 +917,6 @@ - WinNT.h - ../../VC/include/stdio.h - ../ucrt/stdio.h - #if defined(BUILDING_LIBCURL) - - axTLS/ssl.h - - certdb.h - - cert.h - - cyassl/error.h - - cyassl/openssl/ssl.h - - cyassl/ssl.h - - nspr.h - - polarssl/certs.h - - polarssl/ctr_drbg.h - - polarssl/entropy.h - - polarssl/error.h - - polarssl/havege.h - - polarssl/net.h - - polarssl/ssl.h - - polarssl/version.h - - polarssl/x509.h - - prerror.h - - prio.h - - prtypes.h - - qsossl.h - - secerr.h - - secitem.h - - secmod.h - - secport.h - - spnegohelp.h - - sslerr.h - - sslproto.h - #endif - Activation.h - android/native_window.h - Windows.System.Threading.h diff --git a/build/ymake.core.conf b/build/ymake.core.conf index e2de30a050c8..e16ce95cf4c3 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -4418,7 +4418,7 @@ macro RUN_LUA(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_N } # tag:python-specific -### @usage: PYTHON(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN[_NOPARSE] inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [INDUCED_DEPS $VARs...]) +### @usage: RUN_PYTHON2(script_path args... [CWD dir] [ENV key=value...] [TOOL tools...] [IN[_NOPARSE] inputs...] [OUT[_NOAUTO] outputs...] [STDOUT[_NOAUTO] output] [OUTPUT_INCLUDES output_includes...] [INDUCED_DEPS $VARs...]) ### ### Run a python script with $(PYTHON)/python built from devtools/huge_python. ### These macros are similar: RUN_PROGRAM, RUN_LUA, PYTHON. @@ -4438,7 +4438,7 @@ macro RUN_LUA(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_N ### ### For absolute paths use ${ARCADIA_ROOT} and ${ARCADIA_BUILD_ROOT}, or ### ${CURDIR} and ${BINDIR} which are expanded where the outputs are used. -macro PYTHON(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], INDUCED_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], Args...) { +macro RUN_PYTHON2(ScriptPath, IN{input}[], IN_NOPARSE{input}[], OUT{output}[], OUT_NOAUTO{output}[], TOOL{tool}[], OUTPUT_INCLUDES[], INDUCED_DEPS[], STDOUT="", STDOUT_NOAUTO="", CWD="", ENV[], Args...) { .CMD=${cwd:CWD} ${env:ENV} $YMAKE_PYTHON ${input:ScriptPath} $Args ${input;hide:IN} ${input;context=TEXT;hide:IN_NOPARSE} ${output_include;hide:OUTPUT_INCLUDES} $INDUCED_DEPS ${tool;hide:TOOL} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${output;stdout:STDOUT} ${output;stdout;noauto:STDOUT_NOAUTO} ${kv;hide:"p PY"} ${kv;hide:"pc yellow"} ${kv;hide:"show_out"} .SEM=find_package Python2 && add_custom_command $_SET_ENV_FOR_CUSTOM_COMMAND($ENV) OUTPUT ${output:OUT} ${output;noauto:OUT_NOAUTO} ${output:STDOUT} ${output;noauto:STDOUT_NOAUTO} DEPENDS ${input:IN} ${input;context=TEXT:IN_NOPARSE} ${input:ScriptPath} ${tool:TOOL} ${pre=WORKING_DIRECTORY :CWD} COMMAND Python2::Interpreter ${input:ScriptPath} $Args ${pre=> :STDOUT} ${pre=> :STDOUT_NOAUTO} $_TARGET_SOURCES_FOR_HEADERS($OUT $OUT_NOAUTO $STDOUT $STDOUT_NOAUTO) } diff --git a/cmake/FindJNITarget.cmake b/cmake/FindJNITarget.cmake new file mode 100644 index 000000000000..1c7f7d59a685 --- /dev/null +++ b/cmake/FindJNITarget.cmake @@ -0,0 +1,33 @@ +if(JNITarget_FIND_QUIETLY) + find_package(JNI QUIET) +elseif(JNITarget_FIND_REQUIRED) + find_package(JNI REQUIRED) +else() + find_package(JNI) +endif() + +set(JNI_TARGET_INCLUDE_DIRS ${JNI_INCLUDE_DIRS}) +set(JNI_TARGET_LIBRARIES ${JNI_LIBRARIES}) + +if (JNI_FOUND) + add_library(JNITarget::jni IMPORTED UNKNOWN) + set_property(TARGET JNITarget::jni PROPERTY + IMPORTED_LOCATION ${JAVA_JVM_LIBRARY} + ) + set_property(TARGET JNITarget::jni PROPERTY + INTERFACE_INCLUDE_DIRECTORIES ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} + ) + + add_library(JNITarget::jni_awt IMPORTED UNKNOWN) + set_property(TARGET JNITarget::jni_awt PROPERTY + IMPORTED_LOCATION ${JAVA_AWT_LIBRARY} + ) + set_property(TARGET JNITarget::jni_awt PROPERTY + INTERFACE_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_PATH} + ) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(JNITarget DEFAULT_MSG JNI_TARGET_LIBRARIES JNI_TARGET_INCLUDE_DIRS) + +mark_as_advanced(JNI_TARGET_INCLUDE_DIRS JNI_TARGET_LIBRARIES) diff --git a/cmake/conan-profiles/linux.aarch64.profile b/cmake/conan-profiles/linux.aarch64.profile deleted file mode 100644 index 6945b1d777db..000000000000 --- a/cmake/conan-profiles/linux.aarch64.profile +++ /dev/null @@ -1,28 +0,0 @@ -include(default) - -target_host=aarch64-linux-gnu - -[settings] -arch=armv8 -build_type=Release -compiler=gcc -compiler.libcxx=libstdc++11 -compiler.version=12 -compiler.cppstd=20 -os=Linux -[options] - -[env] -CONAN_CMAKE_FIND_ROOT_PATH=/usr/$target_host -CONAN_CMAKE_SYSROOT=/usr/$target_host -SYSROOT=/usr/$target_host -CC=$target_host-gcc -CXX=$target_host-g++ -CXXFLAGS="-I/usr/$target_host/include/" -CFLAGS="-I/usr/$target_host/include/" -CHOST=$target_host -AR=$target_host-ar -AS=$target_host-as -RANLIB=$target_host-ranlib -LD=$target_host-ld -STRIP=$target_host-strip diff --git a/cmake/conan-profiles/macos.arm64.profile b/cmake/conan-profiles/macos.arm64.profile deleted file mode 100644 index 52ba46ab977d..000000000000 --- a/cmake/conan-profiles/macos.arm64.profile +++ /dev/null @@ -1,11 +0,0 @@ -include(default) -[settings] -arch=armv8 -build_type=Release -compiler=clang -compiler.libcxx=libc++ -compiler.version=14 -compiler.cppstd=20 -os=Macos -[options] -[env] diff --git a/cmake/cuda.cmake b/cmake/cuda.cmake new file mode 100644 index 000000000000..5764bb65c3aa --- /dev/null +++ b/cmake/cuda.cmake @@ -0,0 +1,188 @@ +if (HAVE_CUDA) + if(${CMAKE_VERSION} VERSION_LESS "3.17.0") + message(FATAL_ERROR "Build with CUDA requires at least cmake 3.17.0") + endif() + + enable_language(CUDA) + + include(global_flags) + include(common) + + function(quote_if_contains_spaces OutVar Var) + if (Var MATCHES ".*[ ].*") + set(${OutVar} "\"${Var}\"" PARENT_SCOPE) + else() + set(${OutVar} ${Var} PARENT_SCOPE) + endif() + endfunction() + + function(get_cuda_flags_from_cxx_flags OutCudaFlags CxxFlags) + # OutCudaFlags is an output string + # CxxFlags is a string + + set(skipList + -gline-tables-only + # clang coverage + -fprofile-instr-generate + -fcoverage-mapping + /Zc:inline # disable unreferenced functions (kernel registrators) remove + -Wno-c++17-extensions + -flto + -faligned-allocation + -fsized-deallocation + # While it might be reasonable to compile host part of .cu sources with these optimizations enabled, + # nvcc passes these options down towards cicc which lacks x86_64 extensions support. + -msse2 + -msse3 + -mssse3 + -msse4.1 + -msse4.2 + ) + + set(skipPrefixRegexp + "(-fsanitize=|-fsanitize-coverage=|-fsanitize-blacklist=|--system-header-prefix|(/|-)std(:|=)c\\+\\+).*" + ) + + string(FIND "${CMAKE_CUDA_HOST_COMPILER}" clang hostCompilerIsClangPos) + string(COMPARE NOTEQUAL ${hostCompilerIsClangPos} -1 isHostCompilerClang) + + + function(separate_arguments_with_special_symbols Output Src) + string(REPLACE ";" "$" LocalOutput "${Src}") + separate_arguments(LocalOutput NATIVE_COMMAND ${LocalOutput}) + set(${Output} ${LocalOutput} PARENT_SCOPE) + endfunction() + + separate_arguments_with_special_symbols(Separated_CxxFlags "${CxxFlags}") + + if (MSVC) + set(flagPrefixSymbol "/") + else() + set(flagPrefixSymbol "-") + endif() + + set(localCudaCommonFlags "") # non host compiler options + set(localCudaCompilerOptions "") + + while (Separated_CxxFlags) + list(POP_FRONT Separated_CxxFlags cxxFlag) + if ((cxxFlag IN_LIST skipList) OR (cxxFlag MATCHES ${skipPrefixRegexp})) + continue() + endif() + if ((cxxFlag STREQUAL -fopenmp=libomp) AND (NOT isHostCompilerClang)) + list(APPEND localCudaCompilerOptions -fopenmp) + continue() + endif() + if ((NOT isHostCompilerClang) AND (cxxFlag MATCHES "^\-\-target=.*")) + continue() + endif() + if (cxxFlag MATCHES "^${flagPrefixSymbol}(D[^ ]+)=(.+)") + set(key ${CMAKE_MATCH_1}) + quote_if_contains_spaces(safeValue "${CMAKE_MATCH_2}") + list(APPEND localCudaCommonFlags "-${key}=${safeValue}") + continue() + endif() + if (cxxFlag MATCHES "^${flagPrefixSymbol}([DI])(.*)") + set(key ${CMAKE_MATCH_1}) + if (CMAKE_MATCH_2) + set(value ${CMAKE_MATCH_2}) + set(sep "") + else() + list(POP_FRONT Separated_CxxFlags value) + set(sep " ") + endif() + quote_if_contains_spaces(safeValue "${value}") + list(APPEND localCudaCommonFlags "-${key}${sep}${safeValue}") + continue() + endif() + list(APPEND localCudaCompilerOptions ${cxxFlag}) + endwhile() + + if (isHostCompilerClang) + # nvcc concatenates the sources for clang, and clang reports unused + # things from .h files as if they they were defined in a .cpp file. + list(APPEND localCudaCommonFlags -Wno-unused-function -Wno-unused-parameter) + if (CMAKE_CXX_COMPILER_TARGET) + list(APPEND localCudaCompilerOptions "--target=${CMAKE_CXX_COMPILER_TARGET}") + endif() + endif() + + if (CMAKE_SYSROOT) + list(APPEND localCudaCompilerOptions "--sysroot=${CMAKE_SYSROOT}") + endif() + + list(JOIN localCudaCommonFlags " " joinedLocalCudaCommonFlags) + string(REPLACE "$" ";" joinedLocalCudaCommonFlags "${joinedLocalCudaCommonFlags}") + list(JOIN localCudaCompilerOptions , joinedLocalCudaCompilerOptions) + set(${OutCudaFlags} "${joinedLocalCudaCommonFlags} --compiler-options ${joinedLocalCudaCompilerOptions}" PARENT_SCOPE) + endfunction() + + get_cuda_flags_from_cxx_flags(CMAKE_CUDA_FLAGS "${CMAKE_CXX_FLAGS}") + + string(APPEND CMAKE_CUDA_FLAGS + # Allow __host__, __device__ annotations in lambda declaration. + " --expt-extended-lambda" + # Allow host code to invoke __device__ constexpr functions and vice versa + " --expt-relaxed-constexpr" + ) + + set(NVCC_STD_VER 14) + if(MSVC) + set(NVCC_STD "/std:c++${NVCC_STD_VER}") + else() + set(NVCC_STD "-std=c++${NVCC_STD_VER}") + endif() + string(APPEND CMAKE_CUDA_FLAGS " --compiler-options ${NVCC_STD}") + + string(APPEND CMAKE_CUDA_FLAGS " -DTHRUST_IGNORE_CUB_VERSION_CHECK") + + if(MSVC) + # default CMake flags differ from our configuration + set(CMAKE_CUDA_FLAGS_DEBUG "-D_DEBUG --compiler-options /Z7,/Ob0,/Od") + set(CMAKE_CUDA_FLAGS_MINSIZEREL "-DNDEBUG --compiler-options /O1,/Ob1") + set(CMAKE_CUDA_FLAGS_RELEASE "-DNDEBUG --compiler-options /Ox,/Ob2,/Oi") + set(CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-DNDEBUG --compiler-options /Z7,/Ox,/Ob1") + endif() + + # use versions from contrib, standard libraries from CUDA distibution are incompatible with MSVC and libcxx + set(CUDA_EXTRA_INCLUDE_DIRECTORIES + ${CMAKE_SOURCE_DIR}/contrib/libs/nvidia/thrust + ${CMAKE_SOURCE_DIR}/contrib/libs/nvidia/cub + ) + + find_package(CUDAToolkit REQUIRED) + + if(${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL "11.2") + string(APPEND CMAKE_CUDA_FLAGS " --threads 0") + endif() + + message(VERBOSE "CMAKE_CUDA_FLAGS = \"${CMAKE_CUDA_FLAGS}\"") + + enable_language(CUDA) + + function(target_cuda_flags Tgt) + set_property(TARGET ${Tgt} APPEND PROPERTY + CUDA_FLAGS ${ARGN} + ) + endfunction() + + function(target_cuda_cflags Tgt) + if (NOT ("${ARGN}" STREQUAL "")) + string(JOIN "," OPTIONS ${ARGN}) + set_property(TARGET ${Tgt} APPEND PROPERTY + CUDA_FLAGS --compiler-options ${OPTIONS} + ) + endif() + endfunction() + + function(target_cuda_sources Tgt Scope) + # add include directories on per-CMakeLists file level because some non-CUDA source files may want to include calls to CUDA libs + include_directories(${CUDA_EXTRA_INCLUDE_DIRECTORIES}) + + set_source_files_properties(${ARGN} PROPERTIES + COMPILE_OPTIONS "$>,;>" + ) + target_sources(${Tgt} ${Scope} ${ARGN}) + endfunction() + +endif() diff --git a/cmake/cython.cmake b/cmake/cython.cmake new file mode 100644 index 000000000000..d239c2dc58ae --- /dev/null +++ b/cmake/cython.cmake @@ -0,0 +1,41 @@ +function(target_cython_include_directories Tgt) + set_property(TARGET ${Tgt} APPEND PROPERTY + CYTHON_INCLUDE_DIRS ${ARGN} + ) +endfunction() + +function(target_cython_options Tgt) + set_property(TARGET ${Tgt} APPEND PROPERTY + CYTHON_OPTIONS ${ARGN} + ) +endfunction() + +macro(set_python_type_for_cython Tgt Type) + if (${Type} STREQUAL PY3) + find_package(Python3 REQUIRED COMPONENTS Interpreter) + set_property(TARGET ${Tgt} APPEND PROPERTY + CYTHON_PYTHON_INTERPRETER ${Python3_EXECUTABLE} + ) + else() + find_package(Python2 REQUIRED COMPONENTS Interpreter) + set_property(TARGET ${Tgt} APPEND PROPERTY + CYTHON_PYTHON_INTERPRETER ${Python2_EXECUTABLE} + ) + endif() +endmacro() + +function(target_cython_sources Tgt Scope) + foreach(Input ${ARGN}) + get_filename_component(OutputBase ${Input} NAME) + set(CppCythonOutput ${CMAKE_CURRENT_BINARY_DIR}/${OutputBase}.cpp) + add_custom_command( + OUTPUT ${CppCythonOutput} + COMMAND $> ${CMAKE_SOURCE_DIR}/contrib/tools/cython/cython.py ${Input} -o ${CppCythonOutput} + "$>,$>" + "-I$>,$-I>" + COMMAND_EXPAND_LISTS + DEPENDS ${OUTPUT_INCLUDES} + ) + target_sources(${Tgt} ${Scope} ${CppCythonOutput}) + endforeach() +endfunction() diff --git a/cmake/fat_object.cmake b/cmake/fat_object.cmake new file mode 100644 index 000000000000..ae81534e81b5 --- /dev/null +++ b/cmake/fat_object.cmake @@ -0,0 +1,8 @@ +function(add_fat_object Target) + add_executable(${Target} EXCLUDE_FROM_ALL) + set_property(TARGET ${Target} PROPERTY EchoString "Partial linking ${FAT_OBJECT_PREFIX}${Target}${FAT_OBJECT_SUFFIX}") + set_property(TARGET ${Target} PROPERTY SUFFIX ${FAT_OBJECT_SUFFIX}) + set_property(TARGET ${Target} PROPERTY PREFIX ${FAT_OBJECT_PREFIX}) + set_property(TARGET ${Target} PROPERTY POSITION_INDEPENDENT_CODE Off) + target_link_options(${Target} PRIVATE -Wl,-r -nodefaultlibs -nostartfiles) +endfunction() \ No newline at end of file diff --git a/cmake/global_vars.cmake b/cmake/global_vars.cmake deleted file mode 100644 index ebe4053b03c4..000000000000 --- a/cmake/global_vars.cmake +++ /dev/null @@ -1,41 +0,0 @@ - -# This file was generated by the build system used internally in the Yandex monorepo. -# Only simple modifications are allowed (adding source-files to targets, adding simple properties -# like target_include_directories). These modifications will be ported to original -# ya.make files by maintainers. Any complex modifications which can't be ported back to the -# original buildsystem will not be accepted. - - -if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND NOT HAVE_CUDA) - set(YASM_FLAGS -f elf64 -D UNIX -D _x86_64_ -D_YASM_ -g dwarf2) - set(BISON_FLAGS -v) - set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs) - set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/) -endif() - -if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND NOT HAVE_CUDA) - set(BISON_FLAGS -v) - set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs) - set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/) -endif() - -if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(YASM_FLAGS -f macho64 -D DARWIN -D UNIX -D _x86_64_ -D_YASM_) - set(BISON_FLAGS -v) - set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs) - set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/) -endif() - -if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") - set(BISON_FLAGS -v) - set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs) - set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/) -endif() - -if(WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64" AND NOT HAVE_CUDA) - set(YASM_FLAGS -f win64 -D WIN64 -D _x86_64_ -D_YASM_) - set(BISON_FLAGS -v) - set(FBS_CPP_FLAGS --no-warnings --cpp --keep-prefix --gen-mutable --schema -b --yandex-maps-iter --gen-object-api --filename-suffix .fbs) - set(RAGEL_FLAGS -L -I ${CMAKE_SOURCE_DIR}/) -endif() - diff --git a/cmake/recursive_library.cmake b/cmake/recursive_library.cmake new file mode 100644 index 000000000000..f3596edcbc9c --- /dev/null +++ b/cmake/recursive_library.cmake @@ -0,0 +1,50 @@ +function(add_recursive_library Target) + if (${CMAKE_VERSION} VERSION_LESS "3.21.0") + message(FATAL_ERROR "add_recursive_library requires at least cmake 3.21.0 (because it uses CXX_LINKER_LAUNCHER)") + endif() + + if (CMAKE_GENERATOR MATCHES "Visual.Studio.*") + message(FATAL_ERROR "add_recursive_library is incompatible with Visual Studio generators") + endif() + + find_package(Python3 REQUIRED) + + # this is not really an executable but we will use it to make CMake collect all dependencies to pass to the custom linking command (because there's no proper way to do it otherwise) + add_executable(${Target} EXCLUDE_FROM_ALL) + if (NOT (DEFINED CMAKE_POSITION_INDEPENDENT_CODE)) + # default should be the same as for usual static libraries - https://cmake.org/cmake/help/latest/prop_tgt/POSITION_INDEPENDENT_CODE.html + set_property(TARGET ${Target} PROPERTY POSITION_INDEPENDENT_CODE Off) + endif() + + set_property(TARGET ${Target} PROPERTY PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX}) + set_property(TARGET ${Target} PROPERTY SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX}) + + # the result will consist of two files at most (if there are no input files of particular type the resulting output files won't be created): + # ${PREFIX}${Target}${SUFFIX} - for objects not requiring global initialization + # ${PREFIX}${Target}${GLOBAL_PART_SUFFIX}${SUFFIX} - for objects requiring global initialization + set(GLOBAL_PART_SUFFIX ".global") + + if (MSVC) + # if this is not disabled CMake generates additional call to mt.exe after the linking command, manifests are needed only for real executables and dlls + target_link_options(${Target} PRIVATE "/MANIFEST:NO") + endif() + string(CONCAT CXX_LINKER_LAUNCHER_CMD "${Python3_EXECUTABLE}" + ";${CMAKE_SOURCE_DIR}/build/scripts/create_recursive_library_for_cmake.py" + ";--cmake-binary-dir;${CMAKE_BINARY_DIR}" + ";--cmake-ar;${CMAKE_AR}" + ";--cmake-ranlib;${CMAKE_RANLIB}" + ";--cmake-host-system-name;${CMAKE_HOST_SYSTEM_NAME}" + ";--global-part-suffix;${GLOBAL_PART_SUFFIX}" + ) + if (CMAKE_CXX_STANDARD_LIBRARIES) + # because they have to be excluded from input + string(APPEND CXX_LINKER_LAUNCHER_CMD ";--cmake-cxx-standard-libraries;${CMAKE_CXX_STANDARD_LIBRARIES}") + endif() + string(APPEND CXX_LINKER_LAUNCHER_CMD ";--linking-cmdline") # this must be the last argument + + set_property(TARGET ${Target} PROPERTY CXX_LINKER_LAUNCHER ${CXX_LINKER_LAUNCHER_CMD}) + set_property(TARGET ${Target} PROPERTY LINK_DEPENDS + "${CMAKE_SOURCE_DIR}/build/scripts/create_recursive_library_for_cmake.py" + ";${CMAKE_SOURCE_DIR}/build/scripts/link_lib.py" + ) +endfunction() diff --git a/cmake/swig.cmake b/cmake/swig.cmake new file mode 100644 index 000000000000..d4bb2a253677 --- /dev/null +++ b/cmake/swig.cmake @@ -0,0 +1,51 @@ +set(SWIG_EXECUTABLE ${CMAKE_BINARY_DIR}/bin/swig${CMAKE_EXECUTABLE_SUFFIX}) +set(SWIG_SOURCE_FILE_EXTENSIONS .swg) + +function(add_swig_jni_library TgtName) + set(opts "") + set(oneval_args GEN_JAVA_FILES_LIST) + set(multival_args SOURCES) + cmake_parse_arguments(SWIG_JNI_LIB + "${opts}" + "${oneval_args}" + "${multival_args}" + ${ARGN} + ) + + set_property(SOURCE + ${SWIG_JNI_LIB_SOURCES} + PROPERTY + CPLUSPLUS On + ) + + file(RELATIVE_PATH PathInProject ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + string(REPLACE "/" "." JVMPackageName ${PathInProject}) + string(REPLACE "-" "_" JVMPackageName ${JVMPackageName}) + string(PREPEND JVMPackageName "ru.yandex.") + + string(REPLACE "." "/" OutDir ${JVMPackageName}) + string(CONCAT OutDirAbs ${CMAKE_CURRENT_BINARY_DIR} "/java/" ${OutDir}) + + swig_add_library(${TgtName} + TYPE SHARED + LANGUAGE java + OUTPUT_DIR ${OutDirAbs} + OUTFILE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cpp + SOURCES + ${SWIG_JNI_LIB_SOURCES} + ) + + if(APPLE) + # for some legacy reason swig_add_library uses '.jnilib' suffix which has been replaced with '.dylib' since JDK7 + set_target_properties(${TgtName} PROPERTIES SUFFIX ".dylib") + endif() + + set_property(TARGET ${TgtName} PROPERTY SWIG_COMPILE_OPTIONS -package ${JVMPackageName}) + + add_custom_command(TARGET + ${TgtName} + POST_BUILD COMMAND + ${CMAKE_COMMAND} -DJAVA_SRC_DIR=${OutDirAbs} -DJAVA_LST=${CMAKE_CURRENT_BINARY_DIR}/swig_gen_java.lst -P ${CMAKE_SOURCE_DIR}/build/scripts/gather_swig_java.cmake + BYPRODUCTS ${SWIG_JNI_LIB_GEN_JAVA_FILES_LIST} + ) +endfunction() diff --git a/contrib/go/_std_1.21/src/crypto/dsa/dsa.go b/contrib/go/_std_1.21/src/crypto/dsa/dsa.go index 29dab1c9fc97..a83359996dc0 100644 --- a/contrib/go/_std_1.21/src/crypto/dsa/dsa.go +++ b/contrib/go/_std_1.21/src/crypto/dsa/dsa.go @@ -14,10 +14,11 @@ package dsa import ( - "crypto/internal/randutil" "errors" "io" "math/big" + + "crypto/internal/randutil" ) // Parameters represents the domain parameters for a key. These parameters can diff --git a/contrib/go/_std_1.21/src/crypto/x509/x509.go b/contrib/go/_std_1.21/src/crypto/x509/x509.go index af932b7577fe..9d80b1d8ba34 100644 --- a/contrib/go/_std_1.21/src/crypto/x509/x509.go +++ b/contrib/go/_std_1.21/src/crypto/x509/x509.go @@ -29,11 +29,6 @@ import ( "crypto/elliptic" "crypto/rsa" "crypto/sha1" - // Explicitly import these for their crypto.RegisterHash init side-effects. - // Keep these as blank imports, even if they're imported above. - _ "crypto/sha1" - _ "crypto/sha256" - _ "crypto/sha512" "crypto/x509/pkix" "encoding/asn1" "encoding/pem" @@ -48,6 +43,12 @@ import ( "time" "unicode" + // Explicitly import these for their crypto.RegisterHash init side-effects. + // Keep these as blank imports, even if they're imported above. + _ "crypto/sha1" + _ "crypto/sha256" + _ "crypto/sha512" + "golang.org/x/crypto/cryptobyte" cryptobyte_asn1 "golang.org/x/crypto/cryptobyte/asn1" ) diff --git a/contrib/go/_std_1.21/src/go/internal/srcimporter/srcimporter.go b/contrib/go/_std_1.21/src/go/internal/srcimporter/srcimporter.go index 7563d9f34fce..c96427486e87 100644 --- a/contrib/go/_std_1.21/src/go/internal/srcimporter/srcimporter.go +++ b/contrib/go/_std_1.21/src/go/internal/srcimporter/srcimporter.go @@ -20,7 +20,6 @@ import ( "strings" "sync" _ "unsafe" // for go:linkname - ) // An Importer provides the context for importing packages from source code. diff --git a/contrib/go/_std_1.21/src/internal/buildcfg/exp.go b/contrib/go/_std_1.21/src/internal/buildcfg/exp.go index 34fad035e9e7..513070c8af7b 100644 --- a/contrib/go/_std_1.21/src/internal/buildcfg/exp.go +++ b/contrib/go/_std_1.21/src/internal/buildcfg/exp.go @@ -6,9 +6,10 @@ package buildcfg import ( "fmt" - "internal/goexperiment" "reflect" "strings" + + "internal/goexperiment" ) // ExperimentFlags represents a set of GOEXPERIMENT flags relative to a baseline diff --git a/contrib/go/_std_1.21/src/internal/bytealg/compare_native.go b/contrib/go/_std_1.21/src/internal/bytealg/compare_native.go index e01643007500..34964e281c63 100644 --- a/contrib/go/_std_1.21/src/internal/bytealg/compare_native.go +++ b/contrib/go/_std_1.21/src/internal/bytealg/compare_native.go @@ -6,8 +6,7 @@ package bytealg -import _ "unsafe" -// For go:linkname +import _ "unsafe" // For go:linkname //go:noescape func Compare(a, b []byte) int diff --git a/contrib/go/_std_1.21/src/internal/fuzz/trace.go b/contrib/go/_std_1.21/src/internal/fuzz/trace.go index b4719148507d..a15c37006334 100644 --- a/contrib/go/_std_1.21/src/internal/fuzz/trace.go +++ b/contrib/go/_std_1.21/src/internal/fuzz/trace.go @@ -6,8 +6,7 @@ package fuzz -import _ "unsafe" -// for go:linkname +import _ "unsafe" // for go:linkname //go:linkname libfuzzerTraceCmp1 runtime.libfuzzerTraceCmp1 //go:linkname libfuzzerTraceCmp2 runtime.libfuzzerTraceCmp2 diff --git a/contrib/go/_std_1.21/src/internal/godebug/godebug.go b/contrib/go/_std_1.21/src/internal/godebug/godebug.go index 1265ed7e1e60..36bfeaccc421 100644 --- a/contrib/go/_std_1.21/src/internal/godebug/godebug.go +++ b/contrib/go/_std_1.21/src/internal/godebug/godebug.go @@ -40,7 +40,6 @@ import ( "sync/atomic" "unsafe" _ "unsafe" // go:linkname - ) // A Setting is a single setting in the $GODEBUG environment variable. diff --git a/contrib/go/_std_1.21/src/internal/poll/fd_opendir_darwin.go b/contrib/go/_std_1.21/src/internal/poll/fd_opendir_darwin.go index 81cfb29079f1..3ae2dc844821 100644 --- a/contrib/go/_std_1.21/src/internal/poll/fd_opendir_darwin.go +++ b/contrib/go/_std_1.21/src/internal/poll/fd_opendir_darwin.go @@ -7,7 +7,6 @@ package poll import ( "syscall" _ "unsafe" // for go:linkname - ) // OpenDir returns a pointer to a DIR structure suitable for diff --git a/contrib/go/_std_1.21/src/internal/poll/fd_poll_runtime.go b/contrib/go/_std_1.21/src/internal/poll/fd_poll_runtime.go index c80d0086f2de..b51535ecf2f0 100644 --- a/contrib/go/_std_1.21/src/internal/poll/fd_poll_runtime.go +++ b/contrib/go/_std_1.21/src/internal/poll/fd_poll_runtime.go @@ -12,7 +12,6 @@ import ( "syscall" "time" _ "unsafe" // for go:linkname - ) // runtimeNano returns the current value of the runtime clock in nanoseconds. diff --git a/contrib/go/_std_1.21/src/internal/poll/fd_writev_libc.go b/contrib/go/_std_1.21/src/internal/poll/fd_writev_libc.go index 1b35bd90523a..0a60473b3e60 100644 --- a/contrib/go/_std_1.21/src/internal/poll/fd_writev_libc.go +++ b/contrib/go/_std_1.21/src/internal/poll/fd_writev_libc.go @@ -9,7 +9,6 @@ package poll import ( "syscall" _ "unsafe" // for go:linkname - ) //go:linkname writev syscall.writev diff --git a/contrib/go/_std_1.21/src/internal/syscall/unix/at_libc2.go b/contrib/go/_std_1.21/src/internal/syscall/unix/at_libc2.go index 4eeb7717edb4..93d0cf4443f1 100644 --- a/contrib/go/_std_1.21/src/internal/syscall/unix/at_libc2.go +++ b/contrib/go/_std_1.21/src/internal/syscall/unix/at_libc2.go @@ -9,7 +9,6 @@ package unix import ( "syscall" _ "unsafe" // for linkname - ) func Unlinkat(dirfd int, path string, flags int) error { diff --git a/contrib/go/_std_1.21/src/internal/syscall/unix/fcntl_unix.go b/contrib/go/_std_1.21/src/internal/syscall/unix/fcntl_unix.go index 8422637dac0a..6f9e124394cf 100644 --- a/contrib/go/_std_1.21/src/internal/syscall/unix/fcntl_unix.go +++ b/contrib/go/_std_1.21/src/internal/syscall/unix/fcntl_unix.go @@ -9,7 +9,6 @@ package unix import ( "syscall" _ "unsafe" // for go:linkname - ) // Implemented in the runtime package. diff --git a/contrib/go/_std_1.21/src/math/rand/rand.go b/contrib/go/_std_1.21/src/math/rand/rand.go index 1a6a705be13f..cc1f95c88d5a 100644 --- a/contrib/go/_std_1.21/src/math/rand/rand.go +++ b/contrib/go/_std_1.21/src/math/rand/rand.go @@ -22,7 +22,6 @@ import ( "sync" "sync/atomic" _ "unsafe" // for go:linkname - ) // A Source represents a source of uniformly-distributed diff --git a/contrib/go/_std_1.21/src/mime/multipart/readmimeheader.go b/contrib/go/_std_1.21/src/mime/multipart/readmimeheader.go index e6be490c8cc4..25aa6e209286 100644 --- a/contrib/go/_std_1.21/src/mime/multipart/readmimeheader.go +++ b/contrib/go/_std_1.21/src/mime/multipart/readmimeheader.go @@ -6,7 +6,6 @@ package multipart import ( "net/textproto" _ "unsafe" // for go:linkname - ) // readMIMEHeader is defined in package net/textproto. diff --git a/contrib/go/_std_1.21/src/net/netip/netip.go b/contrib/go/_std_1.21/src/net/netip/netip.go index 890b94be6cc3..a44b09495549 100644 --- a/contrib/go/_std_1.21/src/net/netip/netip.go +++ b/contrib/go/_std_1.21/src/net/netip/netip.go @@ -13,11 +13,12 @@ package netip import ( "errors" + "math" + "strconv" + "internal/bytealg" "internal/intern" "internal/itoa" - "math" - "strconv" ) // Sizes: (64-bit) diff --git a/contrib/go/_std_1.21/src/os/file_unix.go b/contrib/go/_std_1.21/src/os/file_unix.go index fc711c1edd70..533a48404b9d 100644 --- a/contrib/go/_std_1.21/src/os/file_unix.go +++ b/contrib/go/_std_1.21/src/os/file_unix.go @@ -13,7 +13,6 @@ import ( "runtime" "syscall" _ "unsafe" // for go:linkname - ) const _UTIME_OMIT = unix.UTIME_OMIT diff --git a/contrib/go/_std_1.21/src/runtime/cgo/callbacks_traceback.go b/contrib/go/_std_1.21/src/runtime/cgo/callbacks_traceback.go index c8f25118c637..dae31a8fcde1 100644 --- a/contrib/go/_std_1.21/src/runtime/cgo/callbacks_traceback.go +++ b/contrib/go/_std_1.21/src/runtime/cgo/callbacks_traceback.go @@ -6,8 +6,7 @@ package cgo -import _ "unsafe" -// for go:linkname +import _ "unsafe" // for go:linkname // Calls the traceback function passed to SetCgoTraceback. diff --git a/contrib/go/_std_1.21/src/runtime/cgo/iscgo.go b/contrib/go/_std_1.21/src/runtime/cgo/iscgo.go index 91159fe3dcf8..e12d0f4b9572 100644 --- a/contrib/go/_std_1.21/src/runtime/cgo/iscgo.go +++ b/contrib/go/_std_1.21/src/runtime/cgo/iscgo.go @@ -11,8 +11,7 @@ package cgo -import _ "unsafe" -// for go:linkname +import _ "unsafe" // for go:linkname //go:linkname _iscgo runtime.iscgo var _iscgo bool = true diff --git a/contrib/go/_std_1.21/src/runtime/cgo/setenv.go b/contrib/go/_std_1.21/src/runtime/cgo/setenv.go index 12f0a0014f05..2247cb2b59ea 100644 --- a/contrib/go/_std_1.21/src/runtime/cgo/setenv.go +++ b/contrib/go/_std_1.21/src/runtime/cgo/setenv.go @@ -6,8 +6,7 @@ package cgo -import _ "unsafe" -// for go:linkname +import _ "unsafe" // for go:linkname //go:cgo_import_static x_cgo_setenv //go:linkname x_cgo_setenv x_cgo_setenv diff --git a/contrib/go/_std_1.21/src/runtime/mgcpacer.go b/contrib/go/_std_1.21/src/runtime/mgcpacer.go index cd56dc427c15..32e19f96e101 100644 --- a/contrib/go/_std_1.21/src/runtime/mgcpacer.go +++ b/contrib/go/_std_1.21/src/runtime/mgcpacer.go @@ -9,7 +9,6 @@ import ( "internal/goexperiment" "runtime/internal/atomic" _ "unsafe" // for go:linkname - ) const ( diff --git a/contrib/go/_std_1.21/src/runtime/rdebug.go b/contrib/go/_std_1.21/src/runtime/rdebug.go index c1cf2f4f8180..7ecb2a52eec2 100644 --- a/contrib/go/_std_1.21/src/runtime/rdebug.go +++ b/contrib/go/_std_1.21/src/runtime/rdebug.go @@ -4,8 +4,7 @@ package runtime -import _ "unsafe" -// for go:linkname +import _ "unsafe" // for go:linkname //go:linkname setMaxStack runtime/debug.setMaxStack func setMaxStack(in int) (out int) { diff --git a/contrib/go/_std_1.21/src/runtime/runtime_boring.go b/contrib/go/_std_1.21/src/runtime/runtime_boring.go index 1ee91d667e2c..5a98b2025318 100644 --- a/contrib/go/_std_1.21/src/runtime/runtime_boring.go +++ b/contrib/go/_std_1.21/src/runtime/runtime_boring.go @@ -4,8 +4,7 @@ package runtime -import _ "unsafe" -// for go:linkname +import _ "unsafe" // for go:linkname //go:linkname boring_runtime_arg0 crypto/internal/boring.runtime_arg0 func boring_runtime_arg0() string { diff --git a/contrib/go/_std_1.21/src/runtime/sigqueue.go b/contrib/go/_std_1.21/src/runtime/sigqueue.go index 886536a1cc82..51e424d55b64 100644 --- a/contrib/go/_std_1.21/src/runtime/sigqueue.go +++ b/contrib/go/_std_1.21/src/runtime/sigqueue.go @@ -35,7 +35,6 @@ package runtime import ( "runtime/internal/atomic" _ "unsafe" // for go:linkname - ) // sig handles communication between the signal handler and os/signal. diff --git a/contrib/go/_std_1.21/src/runtime/timestub.go b/contrib/go/_std_1.21/src/runtime/timestub.go index f63bac808a70..1d2926b43dc3 100644 --- a/contrib/go/_std_1.21/src/runtime/timestub.go +++ b/contrib/go/_std_1.21/src/runtime/timestub.go @@ -9,8 +9,7 @@ package runtime -import _ "unsafe" -// for go:linkname +import _ "unsafe" // for go:linkname //go:linkname time_now time.now func time_now() (sec int64, nsec int32, mono int64) { diff --git a/contrib/go/_std_1.21/src/time/time.go b/contrib/go/_std_1.21/src/time/time.go index 21ced99c0a0a..e8aac5999a2d 100644 --- a/contrib/go/_std_1.21/src/time/time.go +++ b/contrib/go/_std_1.21/src/time/time.go @@ -81,7 +81,6 @@ package time import ( "errors" _ "unsafe" // for go:linkname - ) // A Time represents an instant in time with nanosecond precision. diff --git a/contrib/go/_std_1.21/src/time/tzdata/tzdata.go b/contrib/go/_std_1.21/src/time/tzdata/tzdata.go index 43dd85c8ccc4..95c759b6559c 100644 --- a/contrib/go/_std_1.21/src/time/tzdata/tzdata.go +++ b/contrib/go/_std_1.21/src/time/tzdata/tzdata.go @@ -24,7 +24,6 @@ import ( "errors" "syscall" _ "unsafe" // for go:linkname - ) // registerLoadFromEmbeddedTZData is defined in package time. diff --git a/contrib/libs/antlr3_cpp_runtime/include/antlr3treeparser.inl b/contrib/libs/antlr3_cpp_runtime/include/antlr3treeparser.inl index 5f5991f4eb5f..8ad71d647441 100644 --- a/contrib/libs/antlr3_cpp_runtime/include/antlr3treeparser.inl +++ b/contrib/libs/antlr3_cpp_runtime/include/antlr3treeparser.inl @@ -161,7 +161,6 @@ TreeParser::getMissingSymbol( IntStreamType* istream, ExceptionBaseT TreeTypePtr current; CommonTokenType* token; StringType text; - ANTLR_INT32 i; // Dereference the standard pointers // @@ -170,12 +169,10 @@ TreeParser::getMissingSymbol( IntStreamType* istream, ExceptionBaseT // Create a new empty node, by stealing the current one, or the previous one if the current one is EOF // current = tns->LT(1); - i = -1; if (current == tns->get_EOF_NODE_p()) { current = tns->LT(-1); - i--; } node = current->dupNode(); diff --git a/contrib/libs/curl/bin/ya.make b/contrib/libs/curl/bin/ya.make index a6c461a7f9b5..243fc1ab2252 100644 --- a/contrib/libs/curl/bin/ya.make +++ b/contrib/libs/curl/bin/ya.make @@ -11,8 +11,6 @@ LICENSE( LICENSE_TEXTS(.yandex_meta/licenses.list.txt) -WITHOUT_LICENSE_TEXTS() - PEERDIR( contrib/libs/c-ares contrib/libs/curl diff --git a/contrib/libs/curl/src/tool_main.c b/contrib/libs/curl/src/tool_main.c index 84bc679b5365..45cc7e08099d 100644 --- a/contrib/libs/curl/src/tool_main.c +++ b/contrib/libs/curl/src/tool_main.c @@ -38,7 +38,7 @@ #endif #ifdef USE_NSS -#include +#error #include #error #include #endif diff --git a/contrib/libs/cxxsupp/libsan/ya.make b/contrib/libs/cxxsupp/libsan/ya.make index 2fb16630be84..d8083d39f68e 100644 --- a/contrib/libs/cxxsupp/libsan/ya.make +++ b/contrib/libs/cxxsupp/libsan/ya.make @@ -12,7 +12,7 @@ NO_SANITIZE_COVERAGE() OWNER(somov) -PYTHON( +RUN_PYTHON2( generate_symbolizer.py ${CXX_COMPILER} STDOUT symbolizer.c ) diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA index b70d38e2c2ff..28fc8267e3f8 100644 --- a/contrib/python/hypothesis/py3/.dist-info/METADATA +++ b/contrib/python/hypothesis/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: hypothesis -Version: 6.92.1 +Version: 6.92.2 Summary: A library for property-based testing Home-page: https://hypothesis.works Author: David R. MacIver and Zac Hatfield-Dodds diff --git a/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt b/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt index 98deba4045b6..589b768abd4b 100644 --- a/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt +++ b/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt @@ -1,4 +1,4 @@ -# Version 2023112500, Last Updated Sat Nov 25 07:07:01 2023 UTC +# Version 2023122300, Last Updated Sat Dec 23 07:07:01 2023 UTC AAA AARP ABB @@ -1016,7 +1016,6 @@ SB SBI SBS SC -SCA SCB SCHAEFFLER SCHMIDT diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py index 937332138d19..968da9a95e26 100644 --- a/contrib/python/hypothesis/py3/hypothesis/version.py +++ b/contrib/python/hypothesis/py3/hypothesis/version.py @@ -8,5 +8,5 @@ # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. -__version_info__ = (6, 92, 1) +__version_info__ = (6, 92, 2) __version__ = ".".join(map(str, __version_info__)) diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make index 80e21c22c23f..d92a4bf7d375 100644 --- a/contrib/python/hypothesis/py3/ya.make +++ b/contrib/python/hypothesis/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(6.92.1) +VERSION(6.92.2) LICENSE(MPL-2.0) diff --git a/contrib/tools/bison/bison/data/yacc.c b/contrib/tools/bison/bison/data/yacc.c index c18a9350cf7d..9fa369c8b296 100644 --- a/contrib/tools/bison/bison/data/yacc.c +++ b/contrib/tools/bison/bison/data/yacc.c @@ -198,7 +198,7 @@ int yynerrs;]])]) # between calls to yypush_parse. m4_define([b4_declare_parser_state_variables], [b4_pure_if([[ /* Number of syntax errors so far. */ - int yynerrs; + __attribute__((unused)) int yynerrs; ]])[ int yystate; /* Number of tokens to shift before error messages enabled. */ diff --git a/library/cpp/http/server/http_ut.cpp b/library/cpp/http/server/http_ut.cpp index 191a6428ef1e..0fc44fa5983a 100644 --- a/library/cpp/http/server/http_ut.cpp +++ b/library/cpp/http/server/http_ut.cpp @@ -339,9 +339,6 @@ Y_UNIT_TEST_SUITE(THttpServerTest) { } Y_UNIT_TEST(TestReusePortEnabled) { - if (!IsReusePortAvailable()) { - return; // skip test - } TString res = TestData(); TPortManager pm; const ui16 port = pm.GetPort(); diff --git a/library/cpp/lwtrace/protos/lwtrace.proto b/library/cpp/lwtrace/protos/lwtrace.proto index 4702f56c0aa5..005109571972 100644 --- a/library/cpp/lwtrace/protos/lwtrace.proto +++ b/library/cpp/lwtrace/protos/lwtrace.proto @@ -5,7 +5,7 @@ syntax = "proto3"; package NLWTrace; -option go_package = "github.com/ydb-platform/ydb/library/cpp/lwtrace/protos"; +option go_package = "a.yandex-team.ru/library/cpp/lwtrace/protos"; message TProbeDesc { string Name = 1; // Use either name+provider diff --git a/library/cpp/unified_agent_client/proto/unified_agent.proto b/library/cpp/unified_agent_client/proto/unified_agent.proto index 9a507afa0621..68efe357476e 100644 --- a/library/cpp/unified_agent_client/proto/unified_agent.proto +++ b/library/cpp/unified_agent_client/proto/unified_agent.proto @@ -4,7 +4,7 @@ import "google/protobuf/descriptor.proto"; package NUnifiedAgentProto; option java_package = "com.yandex.unified_agent"; -option go_package = "github.com/ydb-platform/ydb/library/cpp/unified_agent_client/proto;unifiedagent"; +option go_package = "a.yandex-team.ru/library/cpp/unified_agent_client/proto;unifiedagent"; extend google.protobuf.FileOptions { bool GenerateYaStyle = 66777; diff --git a/library/cpp/yt/misc/strong_typedef-inl.h b/library/cpp/yt/misc/strong_typedef-inl.h index 0a8a9751f0dc..09b814b62ccc 100644 --- a/library/cpp/yt/misc/strong_typedef-inl.h +++ b/library/cpp/yt/misc/strong_typedef-inl.h @@ -167,6 +167,14 @@ struct hash> //////////////////////////////////////////////////////////////////////////////// +template + requires std::numeric_limits::is_specialized +class numeric_limits> + : public numeric_limits +{ }; + +//////////////////////////////////////////////////////////////////////////////// + } // namespace std //////////////////////////////////////////////////////////////////////////////// diff --git a/library/cpp/yt/misc/unittests/strong_typedef_ut.cpp b/library/cpp/yt/misc/unittests/strong_typedef_ut.cpp new file mode 100644 index 000000000000..bc9321bb3c1f --- /dev/null +++ b/library/cpp/yt/misc/unittests/strong_typedef_ut.cpp @@ -0,0 +1,64 @@ +#include + +#include + +namespace NYT { +namespace { + +//////////////////////////////////////////////////////////////////////////////// + +YT_DEFINE_STRONG_TYPEDEF(TMyInt1, int); +YT_DEFINE_STRONG_TYPEDEF(TMyInt2, TMyInt1); + +static_assert(std::numeric_limits::is_specialized); +static_assert(std::numeric_limits::is_specialized); + +#define XX(name) \ + static_assert(std::numeric_limits::name == std::numeric_limits::name); \ + static_assert(std::numeric_limits::name == std::numeric_limits::name); + +XX(is_signed) +XX(digits) +XX(digits10) +XX(max_digits10) +XX(is_integer) +XX(is_exact) +XX(radix) +XX(min_exponent) +XX(min_exponent10) +XX(max_exponent) +XX(max_exponent10) +XX(has_infinity) +XX(has_quiet_NaN) +XX(has_signaling_NaN) +XX(has_denorm) +XX(has_denorm_loss) +XX(is_iec559) +XX(is_bounded) +XX(is_modulo) +XX(traps) +XX(tinyness_before) +XX(round_style) + +#undef XX + +#define XX(name) \ + static_assert(std::numeric_limits::name() == std::numeric_limits::name()); \ + static_assert(std::numeric_limits::name() == std::numeric_limits::name()); + +XX(min) +XX(max) +XX(lowest) +XX(epsilon) +XX(round_error) +XX(infinity) +XX(quiet_NaN) +XX(signaling_NaN) +XX(denorm_min) + +#undef XX + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace +} // namespace NYT diff --git a/library/cpp/yt/misc/unittests/ya.make b/library/cpp/yt/misc/unittests/ya.make index bc985812edae..611edd72173a 100644 --- a/library/cpp/yt/misc/unittests/ya.make +++ b/library/cpp/yt/misc/unittests/ya.make @@ -6,6 +6,7 @@ SRCS( enum_ut.cpp guid_ut.cpp preprocessor_ut.cpp + strong_typedef_ut.cpp ) PEERDIR( diff --git a/library/go/core/buildinfo/buildinfo.go b/library/go/core/buildinfo/buildinfo.go index fe6b8286cbe4..88b7d52c9eeb 100644 --- a/library/go/core/buildinfo/buildinfo.go +++ b/library/go/core/buildinfo/buildinfo.go @@ -14,7 +14,7 @@ type BuildInfo struct { // // Other info: // Build by: prime - // Top src dir: /home/prime/Code/go/src/github.com/ydb-platform/ydb + // Top src dir: /home/prime/Code/go/src/a.yandex-team.ru // Top build dir: /home/prime/.ya/build/build_root/qbh0/000002 // Hostname: 77.88.18.146-red.dhcp.yndx.net // Host information: diff --git a/library/go/core/buildinfo/test/main.go b/library/go/core/buildinfo/test/main.go index 7b139002951b..a17ac127490c 100644 --- a/library/go/core/buildinfo/test/main.go +++ b/library/go/core/buildinfo/test/main.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/ydb-platform/ydb/library/go/core/buildinfo" + "a.yandex-team.ru/library/go/core/buildinfo" ) func main() { diff --git a/library/go/test/yatest/env.go b/library/go/test/yatest/env.go index fd2bacbc268c..d655e4c6daaf 100644 --- a/library/go/test/yatest/env.go +++ b/library/go/test/yatest/env.go @@ -149,7 +149,7 @@ func CxxCompilerPath() string { // Warn: if you are using build with system python (-DUSE_SYSTEM_PYTHON=X) beware that some python bundles // are built in a stripped-down form that is needed for building, not running tests. // See comments in the file below to find out which version of python is compatible with tests. -// https://github.com/ydb-platform/ydb/arc/trunk/arcadia/build/platform/python/resources.inc +// https://a.yandex-team.ru/arc/trunk/arcadia/build/platform/python/resources.inc func PythonBinPath() string { lazyInit() verifyContext() diff --git a/library/recipes/docker_compose/lib/__init__.py b/library/recipes/docker_compose/lib/__init__.py index cc20cae5f8a0..652807ea8483 100644 --- a/library/recipes/docker_compose/lib/__init__.py +++ b/library/recipes/docker_compose/lib/__init__.py @@ -9,8 +9,8 @@ import argparse import yatest.common -from test import const from six.moves import input +import build.plugins.lib.test_const as const import library.python.fs as fs import library.python.testing.recipe diff --git a/library/recipes/docker_compose/lib/ya.make b/library/recipes/docker_compose/lib/ya.make index c71dbf24d148..9472c63fd4b1 100644 --- a/library/recipes/docker_compose/lib/ya.make +++ b/library/recipes/docker_compose/lib/ya.make @@ -5,8 +5,8 @@ PY_SRCS( ) PEERDIR( + build/plugins/lib/test_const contrib/python/PyYAML - devtools/ya/test/const library/python/fs library/python/testing/recipe ) diff --git a/util/network/socket.cpp b/util/network/socket.cpp index f6b1132222c3..eaaf0c9cb6b7 100644 --- a/util/network/socket.cpp +++ b/util/network/socket.cpp @@ -307,17 +307,13 @@ void SetInputBuffer(SOCKET s, unsigned value) { CheckedSetSockOpt(s, SOL_SOCKET, SO_RCVBUF, value, "input buffer"); } -#if defined(_linux_) && !defined(SO_REUSEPORT) - #define SO_REUSEPORT 15 -#endif - void SetReusePort(SOCKET s, bool value) { -#if defined(SO_REUSEPORT) +#if defined(_unix_) CheckedSetSockOpt(s, SOL_SOCKET, SO_REUSEPORT, (int)value, "reuse port"); #else Y_UNUSED(s); Y_UNUSED(value); - ythrow TSystemError(ENOSYS) << "SO_REUSEPORT is not defined"; + ythrow TSystemError(ENOSYS) << "SO_REUSEPORT is not available on Windows"; #endif } diff --git a/yt/cpp/mapreduce/client/client.h b/yt/cpp/mapreduce/client/client.h index 9bed0d7287fa..5de00285ef8e 100644 --- a/yt/cpp/mapreduce/client/client.h +++ b/yt/cpp/mapreduce/client/client.h @@ -388,7 +388,7 @@ class TClient const TNode::TListType& keys, const TDeleteRowsOptions& options) override; - void TrimRows( + void TrimRows( const TYPath& path, i64 tabletIndex, i64 rowCount, diff --git a/yt/cpp/mapreduce/client/operation.cpp b/yt/cpp/mapreduce/client/operation.cpp index 855e6e834c18..ade0f339b78b 100644 --- a/yt/cpp/mapreduce/client/operation.cpp +++ b/yt/cpp/mapreduce/client/operation.cpp @@ -364,9 +364,9 @@ TString GetJobStderrWithRetriesAndIgnoreErrors( options); } catch (const TErrorResponse& e) { YT_LOG_ERROR("Cannot get job stderr (OperationId: %v, JobId: %v, Error: %v)", - operationId, - jobId, - e.what()); + operationId, + jobId, + e.what()); } if (jobStderr.size() > stderrTailSize) { jobStderr = jobStderr.substr(jobStderr.size() - stderrTailSize, stderrTailSize); @@ -1605,12 +1605,12 @@ void ExecuteMapReduce( auto nodeReaderFormat = NodeReaderFormatFromHintAndGlobalConfig(spec.MapperFormatHints_); auto [inputFormat, inputFormatConfig] = formatBuilder.CreateFormat( - *mapper, - EIODirection::Input, - structuredInputs, - hints.InputFormatHints_, - nodeReaderFormat, - /* allowFormatFromTableAttribute */ true); + *mapper, + EIODirection::Input, + structuredInputs, + hints.InputFormatHints_, + nodeReaderFormat, + /* allowFormatFromTableAttribute */ true); auto [outputFormat, outputFormatConfig] = formatBuilder.CreateFormat( *mapper, diff --git a/yt/cpp/mapreduce/client/retry_heavy_write_request.h b/yt/cpp/mapreduce/client/retry_heavy_write_request.h index 853306ff42da..052bbfb860b2 100644 --- a/yt/cpp/mapreduce/client/retry_heavy_write_request.h +++ b/yt/cpp/mapreduce/client/retry_heavy_write_request.h @@ -31,12 +31,12 @@ class THeavyRequestRetrier void Update(TStreamFactory streamFactory); void Finish(); - private: +private: void Retry(const std::function& function); void TryStartAttempt(); - private: +private: const TParameters Parameters_; const IRequestRetryPolicyPtr RequestRetryPolicy_; diff --git a/yt/cpp/mapreduce/client/retryful_writer.h b/yt/cpp/mapreduce/client/retryful_writer.h index 8c6de1c266bd..0b345daabfa7 100644 --- a/yt/cpp/mapreduce/client/retryful_writer.h +++ b/yt/cpp/mapreduce/client/retryful_writer.h @@ -77,7 +77,7 @@ class TRetryfulWriter size_t GetRetryBlockRemainingSize() const { - return (BufferSize_ > Buffer_.size()) ? (BufferSize_ - Buffer_.size()) : 0; + return (BufferSize_ > Buffer_.size()) ? (BufferSize_ - Buffer_.size()) : 0; } protected: diff --git a/yt/cpp/mapreduce/client/structured_table_formats.cpp b/yt/cpp/mapreduce/client/structured_table_formats.cpp index b0038f7386c2..6dba1e143597 100644 --- a/yt/cpp/mapreduce/client/structured_table_formats.cpp +++ b/yt/cpp/mapreduce/client/structured_table_formats.cpp @@ -431,7 +431,7 @@ std::pair> TFormatBuilder::CreateNodeFormat( auto format = CreateSkiffFormat(skiffSchema); NYT::NDetail::ApplyFormatHints(&format, formatHints); return { - CreateSkiffFormat(skiffSchema), + format, TSmallJobFile{ TString("skiff") + GetSuffix(direction), CreateSkiffConfig(skiffSchema) diff --git a/yt/cpp/mapreduce/interface/config.cpp b/yt/cpp/mapreduce/interface/config.cpp index e159780ba907..407c21322650 100644 --- a/yt/cpp/mapreduce/interface/config.cpp +++ b/yt/cpp/mapreduce/interface/config.cpp @@ -68,7 +68,7 @@ EEncoding TConfig::GetEncoding(const char* var) } } - EUploadDeduplicationMode TConfig::GetUploadingDeduplicationMode( +EUploadDeduplicationMode TConfig::GetUploadingDeduplicationMode( const char* var, EUploadDeduplicationMode defaultValue) { diff --git a/yt/cpp/mapreduce/interface/fluent.h b/yt/cpp/mapreduce/interface/fluent.h index 8ca6e86336be..a890b5a86b9b 100644 --- a/yt/cpp/mapreduce/interface/fluent.h +++ b/yt/cpp/mapreduce/interface/fluent.h @@ -373,7 +373,7 @@ class TFluentYsonBuilder return this->GetUnwrappedParent(); } - /// Open a map, call `func(*this, element)` for each `element` of range, then close the map. + /// Open a map, call `func(*this, element)` for each `element` of range, then close the map. template TUnwrappedParent DoMapFor(const TIterator& begin, const TIterator& end, const TFunc& func) { diff --git a/yt/cpp/mapreduce/interface/job_statistics_ut.cpp b/yt/cpp/mapreduce/interface/job_statistics_ut.cpp index 0cf53d771ac4..2603a4fbf0d1 100644 --- a/yt/cpp/mapreduce/interface/job_statistics_ut.cpp +++ b/yt/cpp/mapreduce/interface/job_statistics_ut.cpp @@ -13,38 +13,38 @@ Y_UNIT_TEST_SUITE(JobStatistics) { const TString input = R"""( { - "data" = { - "output" = { - "0" = { - "uncompressed_data_size" = { - "$" = { - "completed" = { - "simple_sort" = { - "max" = 130; - "count" = 1; - "min" = 130; - "sum" = 130; - }; - "map" = { - "max" = 42; - "count" = 1; - "min" = 42; - "sum" = 42; - }; - }; - "aborted" = { - "simple_sort" = { - "max" = 24; - "count" = 1; - "min" = 24; - "sum" = 24; - }; - }; - }; - }; - }; - }; - }; + "data" = { + "output" = { + "0" = { + "uncompressed_data_size" = { + "$" = { + "completed" = { + "simple_sort" = { + "max" = 130; + "count" = 1; + "min" = 130; + "sum" = 130; + }; + "map" = { + "max" = 42; + "count" = 1; + "min" = 42; + "sum" = 42; + }; + }; + "aborted" = { + "simple_sort" = { + "max" = 24; + "count" = 1; + "min" = 24; + "sum" = 24; + }; + }; + }; + }; + }; + }; + }; })"""; TJobStatistics stat(NodeFromYsonString(input)); @@ -69,20 +69,20 @@ Y_UNIT_TEST_SUITE(JobStatistics) { const TString input = R"""( { - "time" = { - "exec" = { - "$" = { - "completed" = { - "map" = { - "max" = 2482468; - "count" = 38; - "min" = 578976; - "sum" = 47987270; - }; - }; - }; - }; - }; + "time" = { + "exec" = { + "$" = { + "completed" = { + "map" = { + "max" = 2482468; + "count" = 38; + "min" = 578976; + "sum" = 47987270; + }; + }; + }; + }; + }; })"""; TJobStatistics stat(NodeFromYsonString(input)); @@ -144,38 +144,38 @@ Y_UNIT_TEST_SUITE(JobStatistics) { const TString input = R"""( { - "data" = { - "output" = { - "0" = { - "uncompressed_data_size" = { - "$" = { - "completed" = { - "partition_map" = { - "max" = 130; - "count" = 1; - "min" = 130; - "sum" = 130; - }; - "partition(0)" = { - "max" = 42; - "count" = 1; - "min" = 42; - "sum" = 42; - }; - }; - "aborted" = { - "simple_sort" = { - "max" = 24; - "count" = 1; - "min" = 24; - "sum" = 24; - }; - }; - }; - }; - }; - }; - }; + "data" = { + "output" = { + "0" = { + "uncompressed_data_size" = { + "$" = { + "completed" = { + "partition_map" = { + "max" = 130; + "count" = 1; + "min" = 130; + "sum" = 130; + }; + "partition(0)" = { + "max" = 42; + "count" = 1; + "min" = 42; + "sum" = 42; + }; + }; + "aborted" = { + "simple_sort" = { + "max" = 24; + "count" = 1; + "min" = 24; + "sum" = 24; + }; + }; + }; + }; + }; + }; + }; })"""; TJobStatistics stat(NodeFromYsonString(input)); diff --git a/yt/cpp/mapreduce/interface/operation.h b/yt/cpp/mapreduce/interface/operation.h index 8ea26ae0d3c6..31252c27379a 100644 --- a/yt/cpp/mapreduce/interface/operation.h +++ b/yt/cpp/mapreduce/interface/operation.h @@ -2219,7 +2219,7 @@ class TCommandRawJob /// /// @see https://ytsaurus.tech/docs/en/user-guide/data-processing/operations/vanilla class IVanillaJobBase - : public virtual IStructuredJob + : public virtual IStructuredJob { public: /// Type of job implemented by this class. diff --git a/yt/cpp/mapreduce/interface/serialize.cpp b/yt/cpp/mapreduce/interface/serialize.cpp index 4ead9e9a7e49..18cfaaa9b74d 100644 --- a/yt/cpp/mapreduce/interface/serialize.cpp +++ b/yt/cpp/mapreduce/interface/serialize.cpp @@ -254,7 +254,7 @@ void Serialize(const TColumnSchema& columnSchema, NYson::IYsonConsumer* consumer }) .DoIf(columnSchema.StableName().Defined(), [&] (TFluentMap fluent) { fluent.Item("stable_name").Value(*columnSchema.StableName()); - }) + }) .DoIf(columnSchema.Deleted().Defined(), [&] (TFluentMap fluent) { fluent.Item("deleted").Value(*columnSchema.Deleted()); }) diff --git a/yt/cpp/mapreduce/interface/skiff_row.h b/yt/cpp/mapreduce/interface/skiff_row.h index 5dd335cb6536..6bacfe2dde15 100644 --- a/yt/cpp/mapreduce/interface/skiff_row.h +++ b/yt/cpp/mapreduce/interface/skiff_row.h @@ -101,17 +101,17 @@ class ISkiffRowSkipper template class TSkiffRowSkipper : public ISkiffRowSkipper { public: - explicit TSkiffRowSkipper(const TMaybe& hints) - : Parser_(CreateSkiffParser(&Row_, hints)) - { } + explicit TSkiffRowSkipper(const TMaybe& hints) + : Parser_(CreateSkiffParser(&Row_, hints)) + { } - void SkipRow(NSkiff::TCheckedInDebugSkiffParser* parser) { - Parser_->Parse(parser); - } + void SkipRow(NSkiff::TCheckedInDebugSkiffParser* parser) { + Parser_->Parse(parser); + } private: - T Row_; - ISkiffRowParserPtr Parser_; + T Row_; + ISkiffRowParserPtr Parser_; }; //! Creates a skipper for row type 'T'. diff --git a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp index aa28382326a9..370ae35d8bbf 100644 --- a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp +++ b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp @@ -597,7 +597,7 @@ TNode SerializeParametersForInsertRows( result["durability"] = ToString(*options.Durability_); } if (options.RequireSyncReplica_) { - result["require_sync_replica"] = *options.RequireSyncReplica_; + result["require_sync_replica"] = *options.RequireSyncReplica_; } return result; } diff --git a/yt/yt/client/api/rpc_proxy/helpers.cpp b/yt/yt/client/api/rpc_proxy/helpers.cpp index a11828428632..9562053d108f 100644 --- a/yt/yt/client/api/rpc_proxy/helpers.cpp +++ b/yt/yt/client/api/rpc_proxy/helpers.cpp @@ -1651,6 +1651,16 @@ NJobTrackerClient::EJobState ConvertJobStateFromProto( //////////////////////////////////////////////////////////////////////////////// +bool IsDynamicTableRetriableError(const TError& error) +{ + // TODO(dgolear): Consider adding NoSuchTablet and TabletNotMounted errors? + return + error.FindMatching(NTabletClient::EErrorCode::RowIsBlocked) || + error.FindMatching(NTabletClient::EErrorCode::BlockedRowWaitTimeout) || + error.FindMatching(NTabletClient::EErrorCode::NoSuchCell) || + error.FindMatching(NTabletClient::EErrorCode::ChunkIsNotPreloaded); +} + bool IsRetriableError(const TError& error, bool retryProxyBanned) { if (error.FindMatching(NRpcProxy::EErrorCode::ProxyBanned) || @@ -1659,13 +1669,14 @@ bool IsRetriableError(const TError& error, bool retryProxyBanned) return retryProxyBanned; } - //! Retriable error codes are based on the ones used in http client. return + NRpc::IsRetriableError(error) || error.FindMatching(NRpc::EErrorCode::RequestQueueSizeLimitExceeded) || error.FindMatching(NRpc::EErrorCode::TransportError) || error.FindMatching(NRpc::EErrorCode::Unavailable) || error.FindMatching(NRpc::EErrorCode::TransientFailure) || - error.FindMatching(NSecurityClient::EErrorCode::RequestQueueSizeLimitExceeded); + error.FindMatching(NSecurityClient::EErrorCode::RequestQueueSizeLimitExceeded) || + IsDynamicTableRetriableError(error); } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/client/arrow/arrow_row_stream_encoder.cpp b/yt/yt/client/arrow/arrow_row_stream_encoder.cpp index e4de28086f86..aaa81b7ef884 100644 --- a/yt/yt/client/arrow/arrow_row_stream_encoder.cpp +++ b/yt/yt/client/arrow/arrow_row_stream_encoder.cpp @@ -510,7 +510,7 @@ void SerializeStringLikeColumn( startIndex, endIndex, GetTypedValues(dstRef)); - }); + }); context->AddBuffer( stringsSize, @@ -519,7 +519,7 @@ void SerializeStringLikeColumn( dstRef.Begin(), stringData.Begin() + startOffset, stringsSize); - }); + }); } void SerializeBooleanColumn( @@ -547,7 +547,7 @@ void SerializeBooleanColumn( column->StartIndex, column->StartIndex + column->ValueCount, dstRef); - }); + }); } void SerializeNullColumn( diff --git a/yt/yt/client/chaos_client/replication_card.cpp b/yt/yt/client/chaos_client/replication_card.cpp index 1b57792136df..a32919b5256a 100644 --- a/yt/yt/client/chaos_client/replication_card.cpp +++ b/yt/yt/client/chaos_client/replication_card.cpp @@ -33,7 +33,7 @@ void FormatProgressWithProjection( segments.end(), replicationProgressProjection.From, [] (const auto& lhs, const auto& rhs) { - return CompareRows(lhs, rhs.LowerKey) <= 0; + return CompareRows(lhs, rhs.LowerKey) <= 0; }); bool comma = false; @@ -61,7 +61,6 @@ void FormatProgressWithProjection( } // namespace NDetail - //////////////////////////////////////////////////////////////////////////////// TReplicationCardFetchOptions::operator size_t() const diff --git a/yt/yt/client/chaos_client/replication_card_serialization.cpp b/yt/yt/client/chaos_client/replication_card_serialization.cpp index cb2ca2351623..159aa547d3e4 100644 --- a/yt/yt/client/chaos_client/replication_card_serialization.cpp +++ b/yt/yt/client/chaos_client/replication_card_serialization.cpp @@ -226,7 +226,7 @@ void Serialize(const TReplicationProgress& replicationProgress, IYsonConsumer* c .Item("lower_key").Value(segment.LowerKey ? segment.LowerKey : EmptyKey()) .Item("timestamp").Value(segment.Timestamp) .EndMap(); - }) + }) .Item("upper_key").Value(replicationProgress.UpperKey ? replicationProgress.UpperKey : EmptyKey()) .EndMap(); } diff --git a/yt/yt/client/driver/chaos_commands.cpp b/yt/yt/client/driver/chaos_commands.cpp index e5f80505beab..4012dadedb72 100644 --- a/yt/yt/client/driver/chaos_commands.cpp +++ b/yt/yt/client/driver/chaos_commands.cpp @@ -60,7 +60,7 @@ void TAlterReplicationCardCommand::Register(TRegistrar registrar) .Optional(/*init*/ false); registrar.ParameterWithUniversalAccessor>( "replication_card_collocation_id", - [] (TThis* command) -> auto& { + [] (TThis* command) -> auto& { return command->Options.ReplicationCardCollocationId; }) .Optional(/*init*/ false); diff --git a/yt/yt/client/driver/cypress_commands.h b/yt/yt/client/driver/cypress_commands.h index 69198eaea81d..3a4b14bc9d26 100644 --- a/yt/yt/client/driver/cypress_commands.h +++ b/yt/yt/client/driver/cypress_commands.h @@ -93,7 +93,7 @@ class TListCommand //////////////////////////////////////////////////////////////////////////////// class TCreateCommand - : public NYTree::TYsonStructLite + : public NYTree::TYsonStructLite { public: void Execute(ICommandContextPtr context); diff --git a/yt/yt/client/driver/table_commands.cpp b/yt/yt/client/driver/table_commands.cpp index c4ba308c6745..de88444a066e 100644 --- a/yt/yt/client/driver/table_commands.cpp +++ b/yt/yt/client/driver/table_commands.cpp @@ -441,7 +441,7 @@ void TPartitionTablesCommand::DoExecute(ICommandContextPtr context) Options.AdjustDataWeightPerPartition = AdjustDataWeightPerPartition; auto partitions = WaitFor(context->GetClient()->PartitionTables(Paths, Options)) - .ValueOrThrow(); + .ValueOrThrow(); context->ProduceOutputValue(ConvertToYsonString(partitions)); } diff --git a/yt/yt/client/federated/unittests/client_ut.cpp b/yt/yt/client/federated/unittests/client_ut.cpp index 4268404dd09f..cedef2e3c559 100644 --- a/yt/yt/client/federated/unittests/client_ut.cpp +++ b/yt/yt/client/federated/unittests/client_ut.cpp @@ -239,7 +239,7 @@ TEST(TFederatedClientTest, CheckHealth) // Wait for the next check of cluster liveness, `vla` cluster will become current again. Sleep(TDuration::Seconds(5)); - // From `vla` because it became ok again. + // From `vla` because it became ok again. { auto result = federatedClient->LookupRows(data.Path, data.NameTable, data.Keys); auto rows = result.Get().Value().Rowset->GetRows(); diff --git a/yt/yt/client/hedging/hedging.cpp b/yt/yt/client/hedging/hedging.cpp index 349545115e78..92118420d8f6 100644 --- a/yt/yt/client/hedging/hedging.cpp +++ b/yt/yt/client/hedging/hedging.cpp @@ -225,8 +225,9 @@ NApi::IClientPtr CreateHedgingClient(const THedgingClientOptions& options) return New(options, CreateDummyPenaltyProvider()); } -NApi::IClientPtr CreateHedgingClient(const THedgingClientOptions& options, - const IPenaltyProviderPtr& penaltyProvider) +NApi::IClientPtr CreateHedgingClient( + const THedgingClientOptions& options, + const IPenaltyProviderPtr& penaltyProvider) { return New(options, penaltyProvider); } @@ -241,9 +242,10 @@ NApi::IClientPtr CreateHedgingClient(const THedgingClientConfig& config, const I return CreateHedgingClient(GetHedgingClientOptions(config, clientsCache)); } -NApi::IClientPtr CreateHedgingClient(const THedgingClientConfig& config, - const IClientsCachePtr& clientsCache, - const IPenaltyProviderPtr& penaltyProvider) +NApi::IClientPtr CreateHedgingClient( + const THedgingClientConfig& config, + const IClientsCachePtr& clientsCache, + const IPenaltyProviderPtr& penaltyProvider) { return CreateHedgingClient(GetHedgingClientOptions(config, clientsCache), penaltyProvider); } diff --git a/yt/yt/client/hedging/unittests/counters_ut.cpp b/yt/yt/client/hedging/unittests/counters_ut.cpp index e6dc5eeb481a..667cc0813b16 100644 --- a/yt/yt/client/hedging/unittests/counters_ut.cpp +++ b/yt/yt/client/hedging/unittests/counters_ut.cpp @@ -37,9 +37,10 @@ const auto SleepQuantum = TDuration::MilliSeconds(100); #define EXPECT_DURATION_NEAR(a, b) EXPECT_NEAR(a.MilliSeconds(), b.MilliSeconds(), 1) -NApi::IClientPtr CreateTestHedgingClient(std::initializer_list clients, - std::initializer_list counters, - TDuration banDuration = SleepQuantum * 5) +NApi::IClientPtr CreateTestHedgingClient( + std::initializer_list clients, + std::initializer_list counters, + TDuration banDuration = SleepQuantum * 5) { THedgingClientOptions options; options.BanPenalty = SleepQuantum * 2; @@ -77,8 +78,9 @@ TEST(THedgingClientCountersTest, CountersAfterSuccessFromFirstClient) auto firstClientCounter = New(registry.WithTag("c", "first")); auto secondClientCounter = New(registry.WithTag("c", "first")); - auto client = CreateTestHedgingClient({firstMockClient, secondMockClient}, - {firstClientCounter, secondClientCounter}); + auto client = CreateTestHedgingClient( + {firstMockClient, secondMockClient}, + {firstClientCounter, secondClientCounter}); auto queryResult = NConcurrency::WaitFor(client->ListNode(path, options)); // Wait for cancelled request finish. @@ -120,9 +122,10 @@ TEST(THedgingClientCountersTest, CountersAfterFirstClientHasFailed) auto firstClientCounter = New(registry.WithTag("c", "first")); auto secondClientCounter = New(registry.WithTag("c", "second")); - auto client = CreateTestHedgingClient({firstMockClient, secondMockClient}, - {firstClientCounter, secondClientCounter}, - TDuration::Seconds(5)); + auto client = CreateTestHedgingClient( + {firstMockClient, secondMockClient}, + {firstClientCounter, secondClientCounter}, + TDuration::Seconds(5)); auto queryResult = NConcurrency::WaitFor(client->ListNode(path, options)); // Error result from first client with effective initial penalty equals to 0 ms @@ -163,8 +166,9 @@ TEST(THedgingClientCountersTest, CountersWhenFirstClientIsBanned) auto firstClientCounter = New(registry.WithTag("c", "first")); auto secondClientCounter = New(registry.WithTag("c", "second")); - auto client = CreateTestHedgingClient({firstMockClient, secondMockClient}, - {firstClientCounter, secondClientCounter}); + auto client = CreateTestHedgingClient( + {firstMockClient, secondMockClient}, + {firstClientCounter, secondClientCounter}); auto firstQueryResult = NConcurrency::WaitFor(client->ListNode(path, options)); auto secondQueryResult = NConcurrency::WaitFor(client->ListNode(path, options)); @@ -212,9 +216,10 @@ TEST(THedgingClientCountersTest, CountersAfterFirstClientBanHasElapsed) auto banDuration = SleepQuantum * 2; - auto client = CreateTestHedgingClient({firstMockClient, secondMockClient}, - {firstClientCounter, secondClientCounter}, - banDuration); + auto client = CreateTestHedgingClient( + {firstMockClient, secondMockClient}, + {firstClientCounter, secondClientCounter}, + banDuration); auto firstQueryResult = NConcurrency::WaitFor(client->ListNode(path, options)); Sleep(banDuration); diff --git a/yt/yt/client/table_client/helpers.cpp b/yt/yt/client/table_client/helpers.cpp index 60767d1a68a4..9e33a4394935 100644 --- a/yt/yt/client/table_client/helpers.cpp +++ b/yt/yt/client/table_client/helpers.cpp @@ -858,8 +858,8 @@ void UnversionedValueToListImpl( std::function appender, const TProtobufMessageType* type) : Appender_(std::move(appender)) - , Type_(type) - , OutputStream_(&WireBytes_) + , Type_(type) + , OutputStream_(&WireBytes_) { } void OnStringScalar(TStringBuf value) override diff --git a/yt/yt/client/table_client/unittests/helpers/helpers.cpp b/yt/yt/client/table_client/unittests/helpers/helpers.cpp index c0b611f6a256..6f9754aa28e6 100644 --- a/yt/yt/client/table_client/unittests/helpers/helpers.cpp +++ b/yt/yt/client/table_client/unittests/helpers/helpers.cpp @@ -136,7 +136,7 @@ void CheckResult(std::vector expected, IVersionedReaderPtr reader std::vector actual; actual.reserve(100); - while (auto batch = reader->Read({.MaxRowsPerRead = 100})) { + while (auto batch = reader->Read({.MaxRowsPerRead = 20})) { if (batch->IsEmpty()) { ASSERT_TRUE(reader->GetReadyEvent().Get().IsOK()); continue; diff --git a/yt/yt/client/table_client/unversioned_row.cpp b/yt/yt/client/table_client/unversioned_row.cpp index cff031f054b8..296f9c73559f 100644 --- a/yt/yt/client/table_client/unversioned_row.cpp +++ b/yt/yt/client/table_client/unversioned_row.cpp @@ -1314,7 +1314,7 @@ void ValidateReadTimestamp(TTimestamp timestamp) void ValidateGetInSyncReplicasTimestamp(TTimestamp timestamp) { if (timestamp != SyncLastCommittedTimestamp && - (timestamp < MinTimestamp || timestamp > MaxTimestamp)) + (timestamp < MinTimestamp || timestamp > MaxTimestamp)) { THROW_ERROR_EXCEPTION("Invalid GetInSyncReplicas timestamp %x", timestamp); } diff --git a/yt/yt/client/table_client/versioned_row.cpp b/yt/yt/client/table_client/versioned_row.cpp index 17fd1e41ba32..e06544fac22c 100644 --- a/yt/yt/client/table_client/versioned_row.cpp +++ b/yt/yt/client/table_client/versioned_row.cpp @@ -559,7 +559,7 @@ bool TBitwiseVersionedRowEqual::operator()(TVersionedRow lhs, TVersionedRow rhs) } for (int index = 0; index < lhs.GetKeyCount(); ++index) { - if (!TBitwiseUnversionedValueEqual()(lhs.Keys()[index], lhs.Keys()[index])) { + if (!TBitwiseUnversionedValueEqual()(lhs.Keys()[index], rhs.Keys()[index])) { return false; } } diff --git a/yt/yt/client/unittests/zookeeper_bus_ut.cpp b/yt/yt/client/unittests/zookeeper_bus_ut.cpp index 559f50303761..de29ed481be1 100644 --- a/yt/yt/client/unittests/zookeeper_bus_ut.cpp +++ b/yt/yt/client/unittests/zookeeper_bus_ut.cpp @@ -57,7 +57,7 @@ class TReplyingBusHandler { EXPECT_EQ(1, std::ssize(message)); auto replyMessage = Serialize(Message_); - replyBus->Send(replyMessage, NBus::TSendOptions(EDeliveryTrackingLevel::None)); + YT_UNUSED_FUTURE(replyBus->Send(replyMessage, NBus::TSendOptions(EDeliveryTrackingLevel::None))); } private: diff --git a/yt/yt/client/ypath/rich.cpp b/yt/yt/client/ypath/rich.cpp index ac68331821bd..700fbd69bcd3 100644 --- a/yt/yt/client/ypath/rich.cpp +++ b/yt/yt/client/ypath/rich.cpp @@ -22,6 +22,41 @@ using namespace NChunkClient; using namespace NTableClient; using namespace NSecurityClient; +static const std::vector WellKnownAttributes = { + "append", + "teleport", + "primary", + "foreign", + "columns", + "rename_columns", + "ranges", + "file_name", + "executable", + "format", + "schema", + "sorted_by", + "row_count_limit", + "timestamp", + "retention_timestamp", + "output_timestamp", + "optimize_for", + "chunk_format", + "compression_codec", + "erasure_codec", + "auto_merge", + "transaction_id", + "security_tags", + "bypass_artifact_cache", + "schema_modification", + "partially_sorted", + "chunk_unique_keys", + "copy_file", + "chunk_sort_columns", + "cluster", + "clusters", + "create", +}; + //////////////////////////////////////////////////////////////////////////////// TRichYPath::TRichYPath() @@ -733,6 +768,11 @@ void FromProto(TRichYPath* path, const TString& protoPath) //////////////////////////////////////////////////////////////////////////////// +const std::vector& GetWellKnownRichYPathAttributes() +{ + return WellKnownAttributes; +} + } // namespace NYT::NYPath size_t THash::operator()(const NYT::NYPath::TRichYPath& richYPath) const diff --git a/yt/yt/client/ypath/rich.h b/yt/yt/client/ypath/rich.h index 142c87ad266d..fa53d6a5686c 100644 --- a/yt/yt/client/ypath/rich.h +++ b/yt/yt/client/ypath/rich.h @@ -185,6 +185,10 @@ void FromProto(TRichYPath* path, const TString& protoPath); //////////////////////////////////////////////////////////////////////////////// +const std::vector& GetWellKnownRichYPathAttributes(); + +//////////////////////////////////////////////////////////////////////////////// + } // namespace NYT::NYPath template <> diff --git a/yt/yt/core/actions/future.h b/yt/yt/core/actions/future.h index fc993062c872..aa31d8e690dc 100644 --- a/yt/yt/core/actions/future.h +++ b/yt/yt/core/actions/future.h @@ -332,7 +332,7 @@ class TFutureBase //////////////////////////////////////////////////////////////////////////////// template -class TFuture +class [[nodiscard]] TFuture : public TFutureBase { public: @@ -376,7 +376,7 @@ class TFuture //////////////////////////////////////////////////////////////////////////////// template <> -class TFuture +class [[nodiscard]] TFuture : public TFutureBase { public: diff --git a/yt/yt/core/bus/tcp/config.h b/yt/yt/core/bus/tcp/config.h index 40322c3ae795..54020c6b08ca 100644 --- a/yt/yt/core/bus/tcp/config.h +++ b/yt/yt/core/bus/tcp/config.h @@ -68,7 +68,7 @@ class TTcpDispatcherDynamicConfig std::optional> MultiplexingBands; - //! Used to store TLS/SSL certificate files. + //! Used to store TLS/SSL certificate files. std::optional BusCertsDirectoryPath; REGISTER_YSON_STRUCT(TTcpDispatcherDynamicConfig); diff --git a/yt/yt/core/bus/unittests/bus_ut.cpp b/yt/yt/core/bus/unittests/bus_ut.cpp index 1bf05df99c77..ac3cf0bbdbcf 100644 --- a/yt/yt/core/bus/unittests/bus_ut.cpp +++ b/yt/yt/core/bus/unittests/bus_ut.cpp @@ -88,7 +88,7 @@ class TReplying42BusHandler { EXPECT_EQ(NumPartsExpecting, std::ssize(message)); auto replyMessage = Serialize("42"); - replyBus->Send(replyMessage, NBus::TSendOptions(EDeliveryTrackingLevel::None)); + YT_UNUSED_FUTURE(replyBus->Send(replyMessage, NBus::TSendOptions(EDeliveryTrackingLevel::None))); } private: int NumPartsExpecting; diff --git a/yt/yt/core/concurrency/unittests/scheduler_ut.cpp b/yt/yt/core/concurrency/unittests/scheduler_ut.cpp index a36173babffe..3e032a82d756 100644 --- a/yt/yt/core/concurrency/unittests/scheduler_ut.cpp +++ b/yt/yt/core/concurrency/unittests/scheduler_ut.cpp @@ -621,10 +621,10 @@ TEST_F(TSchedulerTest, TestWaitUntilSet) auto p1 = NewPromise(); auto f1 = p1.ToFuture(); - BIND([=] () { + YT_UNUSED_FUTURE(BIND([=] () { Sleep(SleepQuantum); p1.Set(); - }).AsyncVia(Queue1->GetInvoker()).Run(); + }).AsyncVia(Queue1->GetInvoker()).Run()); WaitUntilSet(f1); EXPECT_TRUE(f1.IsSet()); @@ -737,25 +737,25 @@ TEST_F(TSchedulerTest, CancelInApply) BIND([=] () { auto promise = NewPromise(); - promise.ToFuture().Apply(BIND([] { + YT_UNUSED_FUTURE(promise.ToFuture().Apply(BIND([] { auto canceler = NYT::NConcurrency::GetCurrentFiberCanceler(); canceler(TError("kek")); auto p = NewPromise(); WaitFor(p.ToFuture()) .ThrowOnError(); - })); + }))); promise.Set(); - promise.ToFuture().Apply(BIND([] { + YT_UNUSED_FUTURE(promise.ToFuture().Apply(BIND([] { auto canceler = NYT::NConcurrency::GetCurrentFiberCanceler(); canceler(TError("kek")); auto p = NewPromise(); WaitFor(p.ToFuture()) .ThrowOnError(); - })); + }))); }) .AsyncVia(invoker) .Run() @@ -1106,12 +1106,12 @@ TEST_W(TSchedulerTest, FutureUpdatedRaceInWaitFor_YT_18899) auto promise = NewPromise(); auto modifiedFuture = promise.ToFuture(); - modifiedFuture.Apply( + YT_UNUSED_FUTURE(modifiedFuture.Apply( BIND([&] { modifiedFuture = MakeFuture(TError{"error that should not be seen"}); }) .AsyncVia(serializedInvoker) - ); + )); NThreading::TCountDownLatch latch{1}; @@ -1128,14 +1128,14 @@ TEST_W(TSchedulerTest, FutureUpdatedRaceInWaitFor_YT_18899) // Wait until serialized executor starts executing action. latch.Wait(); - BIND([&] { + YT_UNUSED_FUTURE(BIND([&] { // N.B. waiting action is inside WairFor now, because: // - we know that waiting action had started execution before this action was scheduled // - this action is executed inside the same serialized invoker. promise.Set(); }) .AsyncVia(serializedInvoker) - .Run(); + .Run()); ASSERT_NO_THROW(testResultFuture .Get() diff --git a/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp b/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp index d75f24590339..8f8f283f9011 100644 --- a/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp +++ b/yt/yt/core/concurrency/unittests/throughput_throttler_ut.cpp @@ -410,7 +410,7 @@ TEST_F(TPrefetchingThrottlerExponentialGrowthTest, DoNotHangUpAfterAnError) requests[0].Set(TError(NYT::EErrorCode::Generic, "Test error")); EXPECT_FALSE(failedRequest.Get().IsOK()); - Throttler_->Throttle(1); + YT_UNUSED_FUTURE(Throttler_->Throttle(1)); } TEST_F(TPrefetchingThrottlerExponentialGrowthTest, Release) diff --git a/yt/yt/core/http/connection_pool.cpp b/yt/yt/core/http/connection_pool.cpp index b49afe57ec1c..9cb971b8ab5b 100644 --- a/yt/yt/core/http/connection_pool.cpp +++ b/yt/yt/core/http/connection_pool.cpp @@ -31,7 +31,7 @@ TConnectionPool::TConnectionPool( , Config_(std::move(config)) , Connections_(Config_->MaxIdleConnections) , ExpiredConnectionsCollector_( - New( + New( std::move(invoker), BIND([weakThis = MakeWeak(this)] { auto this_ = weakThis.Lock(); diff --git a/yt/yt/core/http/unittests/http_ut.cpp b/yt/yt/core/http/unittests/http_ut.cpp index bb2c4e458ee3..e8fcb86c06ec 100644 --- a/yt/yt/core/http/unittests/http_ut.cpp +++ b/yt/yt/core/http/unittests/http_ut.cpp @@ -1305,7 +1305,7 @@ TEST_P(THttpServerTest, ConnectionsDropRoutine) Sleep(TDuration::MilliSeconds(220)); EXPECT_CALL(*dialerMock, Dial).WillOnce(testing::Return(MakeFuture(nullptr))); - pool->Connect(address); + YT_UNUSED_FUTURE(pool->Connect(address)); } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/core/misc/error-inl.h b/yt/yt/core/misc/error-inl.h index 486216be9122..cdc4cdedfa0f 100644 --- a/yt/yt/core/misc/error-inl.h +++ b/yt/yt/core/misc/error-inl.h @@ -19,7 +19,7 @@ inline constexpr TErrorCode::TErrorCode(int value) { } template -requires std::is_enum_v + requires std::is_enum_v constexpr TErrorCode::TErrorCode(E value) : Value_(static_cast(value)) { } @@ -30,22 +30,22 @@ inline constexpr TErrorCode::operator int() const } template -requires std::is_enum_v + requires std::is_enum_v constexpr TErrorCode::operator E() const { return static_cast(Value_); } template -requires std::is_enum_v -constexpr bool operator == (TErrorCode lhs, E rhs) + requires std::is_enum_v +constexpr bool TErrorCode::operator == (E rhs) const { - return static_cast(lhs) == static_cast(rhs); + return Value_ == static_cast(rhs); } -constexpr inline bool operator == (TErrorCode lhs, TErrorCode rhs) +constexpr bool TErrorCode::operator == (TErrorCode rhs) const { - return static_cast(lhs) == static_cast(rhs); + return Value_ == static_cast(rhs); } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/core/misc/error.h b/yt/yt/core/misc/error.h index fb30619a5af6..5fda6888f383 100644 --- a/yt/yt/core/misc/error.h +++ b/yt/yt/core/misc/error.h @@ -36,18 +36,23 @@ class TErrorCode constexpr TErrorCode(); explicit constexpr TErrorCode(int value); template - requires std::is_enum_v + requires std::is_enum_v constexpr TErrorCode(E value); constexpr operator int() const; template - requires std::is_enum_v + requires std::is_enum_v constexpr operator E() const; void Save(TStreamSaveContext& context) const; void Load(TStreamLoadContext& context); + template + requires std::is_enum_v + constexpr bool operator == (E rhs) const; + + constexpr bool operator == (TErrorCode rhs) const; private: int Value_; }; @@ -55,12 +60,6 @@ class TErrorCode void FormatValue(TStringBuilderBase* builder, TErrorCode code, TStringBuf spec); TString ToString(TErrorCode code); -template -requires std::is_enum_v -constexpr bool operator == (TErrorCode lhs, E rhs); - -constexpr bool operator == (TErrorCode lhs, TErrorCode rhs); - //////////////////////////////////////////////////////////////////////////////// constexpr int ErrorSerializationDepthLimit = 16; diff --git a/yt/yt/core/misc/persistent_queue-inl.h b/yt/yt/core/misc/persistent_queue-inl.h index 5f277db695d9..f122be2d9499 100644 --- a/yt/yt/core/misc/persistent_queue-inl.h +++ b/yt/yt/core/misc/persistent_queue-inl.h @@ -60,7 +60,7 @@ TPersistentQueueIterator::TPersistentQueueIterator( TChunkPtr chunk, size_t index) : CurrentChunk_(std::move(chunk)) - , CurrentIndex_(index) + , CurrentIndex_(index) { } //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/core/misc/proc.cpp b/yt/yt/core/misc/proc.cpp index 2fbd8ba1d64a..8cc18d0933c9 100644 --- a/yt/yt/core/misc/proc.cpp +++ b/yt/yt/core/misc/proc.cpp @@ -759,14 +759,14 @@ void SetUid(int uid) #ifdef _linux_ const auto* passwd = getpwuid(uid); int gid = (passwd && errno == 0) - ? passwd->pw_gid - : uid; // fallback value. + ? passwd->pw_gid + : uid; // fallback value. if (setresgid(gid, gid, gid) != 0) { THROW_ERROR_EXCEPTION("Unable to set gids") - << TErrorAttribute("uid", uid) - << TErrorAttribute("gid", gid) - << TError::FromSystem(); + << TErrorAttribute("uid", uid) + << TErrorAttribute("gid", gid) + << TError::FromSystem(); } if (setresuid(uid, uid, uid) != 0) { diff --git a/yt/yt/core/misc/statistics-inl.h b/yt/yt/core/misc/statistics-inl.h index d02287d9430d..588d0a05c17b 100644 --- a/yt/yt/core/misc/statistics-inl.h +++ b/yt/yt/core/misc/statistics-inl.h @@ -155,7 +155,7 @@ void SerializeYsonPathsMap( // previous one in order to close necessary number of maps. commonDepth = SkipEqualTokens(currentTokenizer, previousTokenizer); - // Close all redundant maps. + // Close all redundant maps. while (previousDepth > commonDepth) { consumer->OnEndMap(); --previousDepth; diff --git a/yt/yt/core/misc/unittests/async_expiring_cache_ut.cpp b/yt/yt/core/misc/unittests/async_expiring_cache_ut.cpp index 053f75ab2af2..add613a50833 100644 --- a/yt/yt/core/misc/unittests/async_expiring_cache_ut.cpp +++ b/yt/yt/core/misc/unittests/async_expiring_cache_ut.cpp @@ -95,7 +95,7 @@ TEST(TAsyncExpiringCacheTest, TestBackgroundUpdate) auto cache = New(config); auto start = Now(); - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(500)); int actual = cache->GetCount(); auto end = Now(); @@ -118,7 +118,7 @@ TEST(TAsyncExpiringCacheTest, TestConcurrentAccess) for (int i = 0; i < 10; ++i) { auto callback = BIND([=] () { for (int j = 0; j < 1000; ++j) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); if (rand() % 20 == 0) { cache->InvalidateActive(0); @@ -198,7 +198,7 @@ TEST(TAsyncExpiringCacheTest, TestAccessTime2) auto cache = New(config); for (int i = 0; i < 10; ++i) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(50)); } @@ -213,7 +213,7 @@ TEST(TAsyncExpiringCacheTest, TestAccessTime3) auto cache = New(config); for (int i = 0; i < 10; ++i) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(100)); } @@ -240,7 +240,7 @@ TEST(TAsyncExpiringCacheTest, TestUpdateTime1) auto cache = New(config, 1.0); for (int i = 0; i < 10; ++i) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(100)); } @@ -254,7 +254,7 @@ TEST(TAsyncExpiringCacheTest, TestUpdateTime2) auto cache = New(config, 0.0); for (int i = 0; i < 10; ++i) { - cache->Get(0); + YT_UNUSED_FUTURE(cache->Get(0)); Sleep(TDuration::MilliSeconds(100)); } diff --git a/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp b/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp index 0a48a2c68e9f..7e2393f30a28 100644 --- a/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp +++ b/yt/yt/core/misc/unittests/async_slru_cache_ut.cpp @@ -695,7 +695,7 @@ TEST(TAsyncSlruGhostCacheTest, Lookups) auto oldLargeCounters = cache->ReadLargeGhostCounters(); for (int index = 0; index < 6; ++index) { - cache->Lookup(index); + YT_UNUSED_FUTURE(cache->Lookup(index)); } auto smallCount = cache->ReadSmallGhostCounters() - oldSmallCounters; @@ -736,7 +736,7 @@ TEST(TAsyncSlruGhostCacheTest, MoveConstructCookie) auto oldLargeCounters = cache->ReadLargeGhostCounters(); for (int index = 0; index < 5; ++index) { - cache->Lookup(index); + YT_UNUSED_FUTURE(cache->Lookup(index)); } auto smallCount = cache->ReadSmallGhostCounters() - oldSmallCounters; @@ -799,7 +799,7 @@ TEST(TAsyncSlruGhostCacheTest, MoveAssignCookie) auto oldLargeCounters = cache->ReadLargeGhostCounters(); for (int index = 0; index < 5; ++index) { - cache->Lookup(index); + YT_UNUSED_FUTURE(cache->Lookup(index)); } auto smallCount = cache->ReadSmallGhostCounters() - oldSmallCounters; diff --git a/yt/yt/core/misc/unittests/enum_ut.cpp b/yt/yt/core/misc/unittests/enum_ut.cpp index 44d55436f972..95d10ec58acd 100644 --- a/yt/yt/core/misc/unittests/enum_ut.cpp +++ b/yt/yt/core/misc/unittests/enum_ut.cpp @@ -13,8 +13,8 @@ DEFINE_ENUM(EColor, ((Red) (10)) ((Green)(20)) ((Blue) (30)) - (Black) - (White) + (Black) + (White) ); TEST(TEnumTest, SaveAndLoad) diff --git a/yt/yt/core/misc/unittests/error_code_ut.cpp b/yt/yt/core/misc/unittests/error_code_ut.cpp index 4670966cd1dc..0fddbbee79da 100644 --- a/yt/yt/core/misc/unittests/error_code_ut.cpp +++ b/yt/yt/core/misc/unittests/error_code_ut.cpp @@ -1,5 +1,6 @@ #include +#include #include #include @@ -114,6 +115,30 @@ TEST(TErrorCodeRegistryTest, Basic) (TErrorCodeRegistry::TErrorCodeInfo{"NUnknown", "ErrorCode-111"})); } +DEFINE_ENUM(ETestEnumOne, + ((VariantOne) (0)) + ((VariantTwo) (1)) +); + +DEFINE_ENUM(ETestEnumTwo, + ((DifferentVariantOne) (0)) + ((DifferentVariantTwo) (1)) +); + +template +concept EquallyComparable = requires(T a, K b) +{ + { static_cast(0) == static_cast(0) }; +}; + +TEST(TErrorCodeTest, ImplicitCastTest) +{ + // assert TErrorCode is in scope + using NYT::TErrorCode; + bool equallyComparable = EquallyComparable; + EXPECT_FALSE(equallyComparable); +} + //////////////////////////////////////////////////////////////////////////////// } // namespace diff --git a/yt/yt/core/net/unittests/net_ut.cpp b/yt/yt/core/net/unittests/net_ut.cpp index 65fa6ad04ebb..62e3b0a4c125 100644 --- a/yt/yt/core/net/unittests/net_ut.cpp +++ b/yt/yt/core/net/unittests/net_ut.cpp @@ -252,10 +252,10 @@ TEST_F(TNetTest, StressConcurrentClose) .Run(); }; - runSender(a); - runReceiver(a); - runSender(b); - runReceiver(b); + YT_UNUSED_FUTURE(runSender(a)); + YT_UNUSED_FUTURE(runReceiver(a)); + YT_UNUSED_FUTURE(runSender(b)); + YT_UNUSED_FUTURE(runReceiver(b)); Sleep(TDuration::MilliSeconds(10)); a->Close().Get().ThrowOnError(); @@ -349,7 +349,7 @@ TEST_F(TNetTest, AbandonDial) auto listener = CreateListener(address, Poller_, Poller_); auto dialer = CreateDialer(); - dialer->Dial(listener->GetAddress()); + YT_UNUSED_FUTURE(dialer->Dial(listener->GetAddress())); }) .AsyncVia(Poller_->GetInvoker()) .Run() @@ -363,7 +363,7 @@ TEST_F(TNetTest, AbandonAccept) auto address = TNetworkAddress::CreateIPv6Loopback(0); auto listener = CreateListener(address, Poller_, Poller_); - listener->Accept(); + YT_UNUSED_FUTURE(listener->Accept()); }) .AsyncVia(Poller_->GetInvoker()) .Run() diff --git a/yt/yt/core/rpc/bus/channel.cpp b/yt/yt/core/rpc/bus/channel.cpp index 6c53708a7236..66708fdd0663 100644 --- a/yt/yt/core/rpc/bus/channel.cpp +++ b/yt/yt/core/rpc/bus/channel.cpp @@ -1044,7 +1044,7 @@ class TBusChannel responseHandler, TStringBuf("Request acknowledgment failed"), TError(NRpc::EErrorCode::TransportError, "Request acknowledgment failed") - << error); + << error); } } diff --git a/yt/yt/core/rpc/dynamic_channel_pool.cpp b/yt/yt/core/rpc/dynamic_channel_pool.cpp index 4ab87efe916e..5ce042662d27 100644 --- a/yt/yt/core/rpc/dynamic_channel_pool.cpp +++ b/yt/yt/core/rpc/dynamic_channel_pool.cpp @@ -62,11 +62,11 @@ class TDynamicChannelPool::TImpl TGuid::Create(), EndpointDescription_, ServiceName_)) - , ViablePeerRegistry_(CreateViablePeerRegistry( + , ViablePeerRegistry_(CreateViablePeerRegistry( Config_, BIND(&TImpl::CreateChannel, Unretained(this)), Logger)) - , RandomPeerRotationExecutor_(New( + , RandomPeerRotationExecutor_(New( TDispatcher::Get()->GetLightInvoker(), BIND(&TDynamicChannelPool::TImpl::MaybeEvictRandomPeer, MakeWeak(this)), Config_->RandomPeerEvictionPeriod)) diff --git a/yt/yt/core/rpc/unittests/lib/test_service.proto b/yt/yt/core/rpc/unittests/lib/test_service.proto index ebb62f4eb55b..79d5bff3dedf 100644 --- a/yt/yt/core/rpc/unittests/lib/test_service.proto +++ b/yt/yt/core/rpc/unittests/lib/test_service.proto @@ -2,7 +2,7 @@ package NTestRpc; import "yt_proto/yt/core/misc/proto/guid.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/rpc/unittests;testservice"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/rpc/unittests;testservice"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp index ffc59a05a1e2..3924bd6c206c 100644 --- a/yt/yt/core/rpc/unittests/rpc_ut.cpp +++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp @@ -817,7 +817,7 @@ TYPED_TEST(TRpcTest, ConnectionLost) Sleep(TDuration::Seconds(0.5)); EXPECT_FALSE(asyncRspOrError.IsSet()); - this->Server_->Stop(false); + YT_UNUSED_FUTURE(this->Server_->Stop(false)); Sleep(TDuration::Seconds(2)); diff --git a/yt/yt/core/tracing/trace_context-inl.h b/yt/yt/core/tracing/trace_context-inl.h index 228498b54866..0b74bf56d9e2 100644 --- a/yt/yt/core/tracing/trace_context-inl.h +++ b/yt/yt/core/tracing/trace_context-inl.h @@ -297,9 +297,24 @@ inline TTraceContextFinishGuard::TTraceContextFinishGuard(TTraceContextPtr trace { } inline TTraceContextFinishGuard::~TTraceContextFinishGuard() +{ + Release(); +} + +inline TTraceContextFinishGuard& TTraceContextFinishGuard::operator=(TTraceContextFinishGuard&& other) +{ + if (this != &other) { + Release(); + TraceContext_ = std::move(other.TraceContext_); + } + return *this; +} + +inline void TTraceContextFinishGuard::Release() { if (TraceContext_) { TraceContext_->Finish(); + TraceContext_ = {}; } } diff --git a/yt/yt/core/tracing/trace_context.h b/yt/yt/core/tracing/trace_context.h index 18acf3849e51..9db890d6957a 100644 --- a/yt/yt/core/tracing/trace_context.h +++ b/yt/yt/core/tracing/trace_context.h @@ -346,8 +346,9 @@ class TTraceContextFinishGuard TTraceContextFinishGuard(TTraceContextFinishGuard&&) = default; TTraceContextFinishGuard& operator=(const TTraceContextFinishGuard&) = delete; - TTraceContextFinishGuard& operator=(TTraceContextFinishGuard&&) = default; + TTraceContextFinishGuard& operator=(TTraceContextFinishGuard&&); + void Release(); private: TTraceContextPtr TraceContext_; }; diff --git a/yt/yt/core/yson/writer.cpp b/yt/yt/core/yson/writer.cpp index 1e623006c1bb..d31abf0b46fe 100644 --- a/yt/yt/core/yson/writer.cpp +++ b/yt/yt/core/yson/writer.cpp @@ -72,7 +72,7 @@ static inline size_t EscapeC(unsigned char c, char next, char r[ESCAPE_C_BUFFER_ r[0] = '\\'; r[1] = 't'; return 2; - } else if (c < 8 && !IsOctDigit(next)) { + } else if (c < 8 && !IsOctDigit(next)) { r[0] = '\\'; r[1] = OctDigit(c); return 2; diff --git a/yt/yt/core/ytree/unittests/lazy_ypath_service_ut.cpp b/yt/yt/core/ytree/unittests/lazy_ypath_service_ut.cpp index c8b3d1a518ff..77a425bc3cf2 100644 --- a/yt/yt/core/ytree/unittests/lazy_ypath_service_ut.cpp +++ b/yt/yt/core/ytree/unittests/lazy_ypath_service_ut.cpp @@ -71,7 +71,7 @@ TEST(TLazyYPathServiceTest, SimpleTypes) .Item("key4").Value(true) .Item("key5").Value(0.1) .Item("key6").Entity() - .EndMap(); + .EndMap(); })); EXPECT_EQ(FluentString().Value(42), YPathGet(service, "/key1")); @@ -92,7 +92,7 @@ TEST(TLazyYPathServiceTest, QueryNestedKeySimple) .Item("subkey1").Value("abc") .Item("subkey2").Value(43) .EndMap() - .EndMap(); + .EndMap(); })); EXPECT_EQ(FluentString().Value("abc"), YPathGet(service, "/key2/subkey1")); @@ -242,7 +242,7 @@ TEST(TLazyYPathServiceTest, InexistentPaths) .Item("subkey1").Value("abc") .Item("subkey2").Value(43) .EndMap() - .EndMap(); + .EndMap(); })); EXPECT_THROW_WITH_SUBSTRING(YPathGet(service, "/nonExistent"), "Failed to resolve YPath"); @@ -265,7 +265,7 @@ TEST(TLazyYPathServiceTest, ExistsVerb) .Item("subkey1").Value("abc") .Item("subkey2").Value(43) .EndMap() - .EndMap(); + .EndMap(); })); EXPECT_TRUE(YPathExists(service, "/key1")); @@ -293,7 +293,7 @@ TEST(TLazyYPathServiceTest, ListVerb) .Item("subkey1").Value("abc") .Item("subkey2").Value(43) .EndMap() - .EndMap(); + .EndMap(); })); EXPECT_EQ((std::vector {"key1", "key2"}), YPathList(service, "")); @@ -310,7 +310,7 @@ TEST(TLazyYPathServiceTest, RootAttributes) .EndAttributes() .BeginMap() .Item("key1").Value(42) - .EndMap(); + .EndMap(); })); auto expectedAttrs = FluentString().BeginMap() diff --git a/yt/yt/core/ytree/unittests/service_combiner_ut.cpp b/yt/yt/core/ytree/unittests/service_combiner_ut.cpp index 5a0f03eb6db9..230b03ab5ece 100644 --- a/yt/yt/core/ytree/unittests/service_combiner_ut.cpp +++ b/yt/yt/core/ytree/unittests/service_combiner_ut.cpp @@ -78,7 +78,7 @@ TEST(TYPathServiceCombinerTest, Simple) .Item("subkey1").Value("abc") .Item("subkey2").Value(3.1415926) .EndMap() - .EndMap(); + .EndMap(); })); IYPathServicePtr service2 = IYPathService::FromProducer(BIND([] (IYsonConsumer* consumer) { BuildYsonFluently(consumer) diff --git a/yt/yt/core/ytree/ypath_client.h b/yt/yt/core/ytree/ypath_client.h index 7169fbc0d7d5..8f4c51cf1864 100644 --- a/yt/yt/core/ytree/ypath_client.h +++ b/yt/yt/core/ytree/ypath_client.h @@ -17,7 +17,7 @@ namespace NYT::NYTree { //////////////////////////////////////////////////////////////////////////////// class TYPathRequest - : public NRpc::IClientRequest + : public NRpc::IClientRequest { public: //! Enables tagging requests with arbitrary payload. diff --git a/yt/yt/core/ytree/ypath_detail.cpp b/yt/yt/core/ytree/ypath_detail.cpp index 4d6fb4ba50d9..bb8aed479796 100644 --- a/yt/yt/core/ytree/ypath_detail.cpp +++ b/yt/yt/core/ytree/ypath_detail.cpp @@ -582,7 +582,7 @@ TFuture TSupportsAttributes::DoGetAttribute( &TSupportsAttributes::DoGetAttributeFragment, key, TYPath(tokenizer.GetInput()))); - } + } } namespace { diff --git a/yt/yt/library/formats/arrow_parser.cpp b/yt/yt/library/formats/arrow_parser.cpp index 2952630baf23..5c9d4741d2c9 100644 --- a/yt/yt/library/formats/arrow_parser.cpp +++ b/yt/yt/library/formats/arrow_parser.cpp @@ -12,10 +12,12 @@ #include #include +#include + #include #include + #include -#include namespace NYT::NFormats { @@ -29,138 +31,144 @@ namespace { void ThrowOnError(const arrow::Status& status) { if (!status.ok()) { - THROW_ERROR_EXCEPTION("%Qlv", status.message()); + THROW_ERROR_EXCEPTION("Arrow error occurred: %Qv", status.message()); } } //////////////////////////////////////////////////////////////////////////////// -class ArraySimpleVisitor +class TArraySimpleVisitor : public arrow::TypeVisitor { public: - ArraySimpleVisitor( + TArraySimpleVisitor( int columnId, - const std::shared_ptr& array, - const std::shared_ptr& bufferForStringLikeValues, - TUnversionedRowValues& rowValues) + std::shared_ptr array, + std::shared_ptr bufferForStringLikeValues, + TUnversionedRowValues* rowValues) : ColumnId_(columnId) - , Array_(array) - , bufferForStringLikeValues_( bufferForStringLikeValues) + , Array_(std::move(array)) + , BufferForStringLikeValues_(std::move(bufferForStringLikeValues)) , RowValues_(rowValues) - { }; + { } // Signed int types. - arrow::Status Visit(const arrow::Int8Type&) override + arrow::Status Visit(const arrow::Int8Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Int16Type&) override + arrow::Status Visit(const arrow::Int16Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Int32Type&) override + arrow::Status Visit(const arrow::Int32Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Int64Type&) override + arrow::Status Visit(const arrow::Int64Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Date32Type&) override + arrow::Status Visit(const arrow::Date32Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Time32Type&) override + arrow::Status Visit(const arrow::Time32Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Date64Type&) override + arrow::Status Visit(const arrow::Date64Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Time64Type&) override + arrow::Status Visit(const arrow::Time64Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::TimestampType&) override + arrow::Status Visit(const arrow::TimestampType& /*type*/) override { return ParseInt64(); } // Unsigned int types. - arrow::Status Visit(const arrow::UInt8Type&) override + arrow::Status Visit(const arrow::UInt8Type& /*type*/) override { return ParseUInt64(); } - arrow::Status Visit(const arrow::UInt16Type&) override + arrow::Status Visit(const arrow::UInt16Type& /*type*/) override { return ParseUInt64(); } - arrow::Status Visit(const arrow::UInt32Type&) override + arrow::Status Visit(const arrow::UInt32Type& /*type*/) override { return ParseUInt64(); } - arrow::Status Visit(const arrow::UInt64Type&) override + arrow::Status Visit(const arrow::UInt64Type& /*type*/) override { return ParseUInt64(); } // Float types. - arrow::Status Visit(const arrow::HalfFloatType&) override + arrow::Status Visit(const arrow::HalfFloatType& /*type*/) override { return ParseDouble(); } - arrow::Status Visit(const arrow::FloatType&) override + arrow::Status Visit(const arrow::FloatType& /*type*/) override { return ParseDouble(); } - arrow::Status Visit(const arrow::DoubleType&) override + arrow::Status Visit(const arrow::DoubleType& /*type*/) override { return ParseDouble(); } // String types. - arrow::Status Visit(const arrow::StringType&) override + arrow::Status Visit(const arrow::StringType& /*type*/) override { - return ParseString(); + return ParseStringLikeArray(); } - arrow::Status Visit(const arrow::BinaryType&) override + arrow::Status Visit(const arrow::BinaryType& /*type*/) override { - return ParseString(); + return ParseStringLikeArray(); } // Boolean type. - arrow::Status Visit(const arrow::BooleanType&) override + arrow::Status Visit(const arrow::BooleanType& /*type*/) override { return ParseBoolean(); } // Null type. - arrow::Status Visit(const arrow::NullType&) override + arrow::Status Visit(const arrow::NullType& /*type*/) override { return ParseNull(); } private: + const i64 ColumnId_; + + std::shared_ptr Array_; + std::shared_ptr BufferForStringLikeValues_; + TUnversionedRowValues* RowValues_; + template arrow::Status ParseInt64() { - auto makeUnversionedValue = [] (int64_t value, int64_t columnId) { + auto makeUnversionedValue = [] (i64 value, i64 columnId) { return MakeUnversionedInt64Value(value, columnId); }; ParseSimpleNumeric(makeUnversionedValue); @@ -170,7 +178,7 @@ class ArraySimpleVisitor template arrow::Status ParseUInt64() { - auto makeUnversionedValue = [] (int64_t value, int64_t columnId) { + auto makeUnversionedValue = [] (i64 value, i64 columnId) { return MakeUnversionedUint64Value(value, columnId); }; ParseSimpleNumeric(makeUnversionedValue); @@ -180,7 +188,7 @@ class ArraySimpleVisitor template arrow::Status ParseDouble() { - auto makeUnversionedValue = [] (double value, int64_t columnId) { + auto makeUnversionedValue = [] (double value, i64 columnId) { return MakeUnversionedDoubleValue(value, columnId); }; ParseSimpleNumeric(makeUnversionedValue); @@ -188,36 +196,36 @@ class ArraySimpleVisitor } template - void ParseSimpleNumeric(FuncType makeUnversionedValue) + void ParseSimpleNumeric(FuncType makeUnversionedValueFunc) { - auto intArray = std::static_pointer_cast(Array_); - for (int rowIndex = 0; rowIndex < intArray->length(); rowIndex++) { - if (intArray->IsNull(rowIndex)) { - RowValues_[rowIndex] = MakeUnversionedNullValue(ColumnId_); + auto array = std::static_pointer_cast(Array_); + for (int rowIndex = 0; rowIndex < array->length(); ++rowIndex) { + if (array->IsNull(rowIndex)) { + (*RowValues_)[rowIndex] = MakeUnversionedNullValue(ColumnId_); } else { - RowValues_[rowIndex] = makeUnversionedValue(intArray->Value(rowIndex), ColumnId_); + (*RowValues_)[rowIndex] = makeUnversionedValueFunc(array->Value(rowIndex), ColumnId_); } } } template - arrow::Status ParseString() + arrow::Status ParseStringLikeArray() { - auto stringArray = std::static_pointer_cast(Array_); - for (int rowIndex = 0; rowIndex < stringArray->length(); rowIndex++) { - if (stringArray->IsNull(rowIndex)) { - RowValues_[rowIndex] = MakeUnversionedNullValue(ColumnId_); + auto array = std::static_pointer_cast(Array_); + for (int rowIndex = 0; rowIndex < array->length(); ++rowIndex) { + if (array->IsNull(rowIndex)) { + (*RowValues_)[rowIndex] = MakeUnversionedNullValue(ColumnId_); } else { - auto stringElement = stringArray->GetView(rowIndex); - char* buffer = bufferForStringLikeValues_->Preallocate(stringElement.size()); + auto element = array->GetView(rowIndex); + char* buffer = BufferForStringLikeValues_->Preallocate(element.size()); std::memcpy( buffer, - stringElement.data(), - stringElement.size()); - bufferForStringLikeValues_->Advance(stringElement.size()); - auto value = TStringBuf(buffer, stringElement.size()); + element.data(), + element.size()); + BufferForStringLikeValues_->Advance(element.size()); + auto value = TStringBuf(buffer, element.size()); - RowValues_[rowIndex] = MakeUnversionedStringValue(value, ColumnId_); + (*RowValues_)[rowIndex] = MakeUnversionedStringValue(value, ColumnId_); } } return arrow::Status::OK(); @@ -225,12 +233,12 @@ class ArraySimpleVisitor arrow::Status ParseBoolean() { - auto boolArray = std::static_pointer_cast(Array_); - for (int rowIndex = 0; rowIndex < boolArray->length(); rowIndex++) { - if (boolArray->IsNull(rowIndex)) { - RowValues_[rowIndex] = MakeUnversionedNullValue(ColumnId_); + auto array = std::static_pointer_cast(Array_); + for (int rowIndex = 0; rowIndex < array->length(); rowIndex++) { + if (array->IsNull(rowIndex)) { + (*RowValues_)[rowIndex] = MakeUnversionedNullValue(ColumnId_); } else { - RowValues_[rowIndex] = MakeUnversionedBooleanValue(boolArray->Value(rowIndex), ColumnId_); + (*RowValues_)[rowIndex] = MakeUnversionedBooleanValue(array->Value(rowIndex), ColumnId_); } } return arrow::Status::OK(); @@ -238,160 +246,163 @@ class ArraySimpleVisitor arrow::Status ParseNull() { - auto nullArray = std::static_pointer_cast(Array_); - for (int rowIndex = 0; rowIndex < nullArray->length(); rowIndex++) { - RowValues_[rowIndex] = MakeUnversionedNullValue(ColumnId_); + auto array = std::static_pointer_cast(Array_); + for (int rowIndex = 0; rowIndex < array->length(); rowIndex++) { + (*RowValues_)[rowIndex] = MakeUnversionedNullValue(ColumnId_); } return arrow::Status::OK(); } - -private: - const int64_t ColumnId_; - const std::shared_ptr& Array_; - std::shared_ptr bufferForStringLikeValues_; - TUnversionedRowValues& RowValues_; }; //////////////////////////////////////////////////////////////////////////////// -class ArrayCompositeVisitor +class TArrayCompositeVisitor : public arrow::TypeVisitor { public: - ArrayCompositeVisitor( + TArrayCompositeVisitor( const std::shared_ptr& array, NYson::TCheckedInDebugYsonTokenWriter* writer, int rowIndex) : RowIndex_(rowIndex) , Array_(array) , Writer_(writer) - { }; + { + YT_VERIFY(writer != nullptr); + } // Signed integer types. - arrow::Status Visit(const arrow::Int8Type&) override + arrow::Status Visit(const arrow::Int8Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Int16Type&) override + arrow::Status Visit(const arrow::Int16Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Int32Type&) override + arrow::Status Visit(const arrow::Int32Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Int64Type&) override + arrow::Status Visit(const arrow::Int64Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Date32Type&) override + arrow::Status Visit(const arrow::Date32Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Time32Type&) override + arrow::Status Visit(const arrow::Time32Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Date64Type&) override + arrow::Status Visit(const arrow::Date64Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::Time64Type&) override + arrow::Status Visit(const arrow::Time64Type& /*type*/) override { return ParseInt64(); } - arrow::Status Visit(const arrow::TimestampType&) override + arrow::Status Visit(const arrow::TimestampType& /*type*/) override { return ParseInt64(); } // Unsigned integer types. - arrow::Status Visit(const arrow::UInt8Type&) override + arrow::Status Visit(const arrow::UInt8Type& /*type*/) override { return ParseUInt64(); } - arrow::Status Visit(const arrow::UInt16Type&) override + arrow::Status Visit(const arrow::UInt16Type& /*type*/) override { return ParseUInt64(); } - arrow::Status Visit(const arrow::UInt32Type&) override + arrow::Status Visit(const arrow::UInt32Type& /*type*/) override { return ParseUInt64(); } - arrow::Status Visit(const arrow::UInt64Type&) override + arrow::Status Visit(const arrow::UInt64Type& /*type*/) override { return ParseUInt64(); } // Float types. - arrow::Status Visit(const arrow::HalfFloatType&) override + arrow::Status Visit(const arrow::HalfFloatType& /*type*/) override { return ParseDouble(); } - arrow::Status Visit(const arrow::FloatType&) override + arrow::Status Visit(const arrow::FloatType& /*type*/) override { return ParseDouble(); } - arrow::Status Visit(const arrow::DoubleType&) override + arrow::Status Visit(const arrow::DoubleType& /*type*/) override { return ParseDouble(); } // Binary types. - arrow::Status Visit(const arrow::StringType&) override + arrow::Status Visit(const arrow::StringType& /*type*/) override { - return ParseString(); + return ParseStringLikeArray(); } - arrow::Status Visit(const arrow::BinaryType&) override + + arrow::Status Visit(const arrow::BinaryType& /*type*/) override { - return ParseString(); + return ParseStringLikeArray(); } // Boolean types. - arrow::Status Visit(const arrow::BooleanType&) override + arrow::Status Visit(const arrow::BooleanType& /*type*/) override { return ParseBoolean(); } // Null types. - arrow::Status Visit(const arrow::NullType&) override + arrow::Status Visit(const arrow::NullType& /*type*/) override { return ParseNull(); } // Complex types. - arrow::Status Visit(const arrow::ListType&) override + arrow::Status Visit(const arrow::ListType& /*type*/) override { return ParseList(); } - arrow::Status Visit(const arrow::MapType&) override + arrow::Status Visit(const arrow::MapType& /*type*/) override { return ParseMap(); } - arrow::Status Visit(const arrow::StructType&) override + + arrow::Status Visit(const arrow::StructType& /*type*/) override { return ParseStruct(); } private: + const int RowIndex_; + + std::shared_ptr Array_; + NYson::TCheckedInDebugYsonTokenWriter* Writer_ = nullptr; + template arrow::Status ParseInt64() { - auto writeNumericValue = [] (NYson::TCheckedInDebugYsonTokenWriter* writer, int64_t value) { + auto writeNumericValue = [] (NYson::TCheckedInDebugYsonTokenWriter* writer, i64 value) { writer->WriteBinaryInt64(value); }; ParseComplexNumeric(writeNumericValue); @@ -421,35 +432,34 @@ class ArrayCompositeVisitor template void ParseComplexNumeric(FuncType writeNumericValue) { - auto intArray = std::static_pointer_cast(Array_); - if (intArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { - writeNumericValue(Writer_, intArray->Value(RowIndex_)); + writeNumericValue(Writer_, array->Value(RowIndex_)); } } template - arrow::Status ParseString() + arrow::Status ParseStringLikeArray() { - auto stringArray = std::static_pointer_cast(Array_); - if (stringArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { - auto stringElement = stringArray->GetView(RowIndex_); - auto value = TStringBuf(stringElement.data(), stringElement.size()); - Writer_->WriteBinaryString(value); + auto element = array->GetView(RowIndex_); + Writer_->WriteBinaryString(TStringBuf(element.data(), element.size())); } return arrow::Status::OK(); } arrow::Status ParseBoolean() { - auto boolArray = std::static_pointer_cast(Array_); - if (boolArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { - Writer_->WriteBinaryBoolean(boolArray->Value(RowIndex_)); + Writer_->WriteBinaryBoolean(array->Value(RowIndex_)); } return arrow::Status::OK(); } @@ -462,17 +472,16 @@ class ArrayCompositeVisitor arrow::Status ParseList() { - auto listArray = std::static_pointer_cast(Array_); - if (listArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { Writer_->WriteBeginList(); - auto column = listArray->value_slice(RowIndex_); - - for (int RowIndex_ = 0; RowIndex_ < column->length(); RowIndex_++) { - ArrayCompositeVisitor visitor(column, Writer_, RowIndex_); - ThrowOnError(column->type()->Accept(&visitor)); + auto listValue = array->value_slice(RowIndex_); + for (int offset = 0; offset < listValue->length(); ++offset) { + TArrayCompositeVisitor visitor(listValue, Writer_, offset); + ThrowOnError(listValue->type()->Accept(&visitor)); Writer_->WriteItemSeparator(); } @@ -484,29 +493,31 @@ class ArrayCompositeVisitor arrow::Status ParseMap() { - auto mapArray = std::static_pointer_cast(Array_); - if (mapArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { - auto mapArrayElement = std::static_pointer_cast(mapArray->value_slice(RowIndex_)); + auto element = std::static_pointer_cast( + array->value_slice(RowIndex_)); - auto keyColumn = mapArrayElement->GetFieldByName("key"); - auto valueColumn = mapArrayElement->GetFieldByName("value"); + auto keyList = element->GetFieldByName("key"); + auto valueList = element->GetFieldByName("value"); Writer_->WriteBeginList(); - for (int index = 0; index < keyColumn->length(); index++) { - Writer_->WriteBeginList(); - ArrayCompositeVisitor keyVisitor(keyColumn, Writer_, index); + for (int offset = 0; offset < keyList->length(); ++offset) { + Writer_->WriteBeginList(); - ThrowOnError(keyColumn->type()->Accept(&keyVisitor)); + TArrayCompositeVisitor keyVisitor(keyList, Writer_, offset); + ThrowOnError(keyList->type()->Accept(&keyVisitor)); Writer_->WriteItemSeparator(); - ArrayCompositeVisitor valueVisitor(valueColumn, Writer_, index); - ThrowOnError(valueColumn->type()->Accept(&valueVisitor)); + TArrayCompositeVisitor valueVisitor(valueList, Writer_, offset); + ThrowOnError(valueList->type()->Accept(&valueVisitor)); Writer_->WriteItemSeparator(); + Writer_->WriteEndList(); Writer_->WriteItemSeparator(); } @@ -518,38 +529,34 @@ class ArrayCompositeVisitor arrow::Status ParseStruct() { - auto structArray = std::static_pointer_cast(Array_); - - if (structArray->IsNull(RowIndex_)) { + auto array = std::static_pointer_cast(Array_); + if (array->IsNull(RowIndex_)) { Writer_->WriteEntity(); } else { Writer_->WriteBeginList(); - for (int elementIndex = 0; elementIndex < structArray->num_fields(); elementIndex++) { - auto elementColumn = structArray->field(elementIndex); - ArrayCompositeVisitor elementVisitor(elementColumn, Writer_, RowIndex_); - ThrowOnError(elementColumn->type()->Accept(&elementVisitor)); + + for (int offset = 0; offset < array->num_fields(); ++offset) { + auto element = array->field(offset); + TArrayCompositeVisitor visitor(element, Writer_, RowIndex_); + ThrowOnError(element->type()->Accept(&visitor)); Writer_->WriteItemSeparator(); } + Writer_->WriteEndList(); } return arrow::Status::OK(); } - -private: - const int RowIndex_; - std::shared_ptr Array_; - NYson::TCheckedInDebugYsonTokenWriter* Writer_ = nullptr; }; //////////////////////////////////////////////////////////////////////////////// void CheckArrowType( const std::shared_ptr& arrowType, - const std::initializer_list& allowedTypes) + std::initializer_list allowedTypes) { if (std::find(allowedTypes.begin(), allowedTypes.end(), arrowType->id()) == allowedTypes.end()) { - THROW_ERROR_EXCEPTION("Unexpected arrow type %Qlv", + THROW_ERROR_EXCEPTION("Unexpected arrow type %Qv", arrowType->name()); } } @@ -671,7 +678,12 @@ void CheckMatchingArrowTypes( case ESimpleLogicalValueType::Null: case ESimpleLogicalValueType::Void: - CheckArrowType(column->type(), {arrow::Type::NA, arrow::Type::DICTIONARY}); + CheckArrowType( + column->type(), + { + arrow::Type::NA, + arrow::Type::DICTIONARY + }); break; case ESimpleLogicalValueType::Uuid: @@ -706,7 +718,7 @@ void PrepareArrayForSimpleLogicalType( auto dictionaryValuesColumn = dictionaryColumn->dictionary(); CheckMatchingArrowTypes(columnType, dictionaryValuesColumn); - ArraySimpleVisitor visitor(columnId, dictionaryValuesColumn, bufferForStringLikeValues, dictionaryValues); + TArraySimpleVisitor visitor(columnId, dictionaryValuesColumn, bufferForStringLikeValues, &dictionaryValues); ThrowOnError(dictionaryColumn->dictionary()->type()->Accept(&visitor)); for (int offset = 0; offset < std::ssize(rowsValues[columnIndex]); offset++) { @@ -717,14 +729,14 @@ void PrepareArrayForSimpleLogicalType( } } } else { - ArraySimpleVisitor visitor(columnId, column, bufferForStringLikeValues, rowsValues[columnIndex]); + TArraySimpleVisitor visitor(columnId, column, bufferForStringLikeValues, &rowsValues[columnIndex]); ThrowOnError(column->type()->Accept(&visitor)); } } void PrepareArrayForComplexType( - TLogicalTypePtr denullifiedLogicalType, - const std::shared_ptr& bufferForStringLikeValues, + const TLogicalTypePtr& denullifiedLogicalType, + const std::shared_ptr& bufferForStringLikeValues, const std::shared_ptr& column, std::vector& rowsValues, int columnIndex, @@ -766,18 +778,18 @@ void PrepareArrayForComplexType( break; default: - THROW_ERROR_EXCEPTION("Unexpected arrow type in complex type %Qlv", column->type()->name()); + THROW_ERROR_EXCEPTION("Unexpected arrow type in complex type %Qv", column->type()->name()); } if (column->type()->id() == arrow::Type::BINARY) { TUnversionedRowValues stringValues(rowsValues[columnIndex].size()); - ArraySimpleVisitor visitor(columnId, column, bufferForStringLikeValues, stringValues); + TArraySimpleVisitor visitor(columnId, column, bufferForStringLikeValues, &stringValues); ThrowOnError(column->type()->Accept(&visitor)); for (int offset = 0; offset < std::ssize(rowsValues[columnIndex]); offset++) { if (column->IsNull(offset)) { rowsValues[columnIndex][offset] = MakeUnversionedNullValue(columnId); } else { - rowsValues[columnIndex][offset] = MakeUnversionedCompositeValue(stringValues[offset].AsStringBuf(), columnId); + rowsValues[columnIndex][offset] = MakeUnversionedCompositeValue(stringValues[offset].AsStringBuf(), columnId); } } } else { @@ -789,7 +801,7 @@ void PrepareArrayForComplexType( TBufferOutput out(valueBuffer); NYson::TCheckedInDebugYsonTokenWriter writer(&out); - ArrayCompositeVisitor visitor(column, &writer, rowIndex); + TArrayCompositeVisitor visitor(column, &writer, rowIndex); ThrowOnError(column->type()->Accept(&visitor)); @@ -811,8 +823,8 @@ void PrepareArrayForComplexType( } void PrepareArray( - TLogicalTypePtr denullifiedLogicalType, - const std::shared_ptr& bufferForStringLikeValues, + const TLogicalTypePtr& denullifiedLogicalType, + const std::shared_ptr& bufferForStringLikeValues, const std::shared_ptr& column, std::vector& rowsValues, int columnIndex, @@ -849,52 +861,65 @@ void PrepareArray( break; case ELogicalMetatype::Tagged: + // Denullified type should not contain tagged type. + YT_ABORT(); break; } } //////////////////////////////////////////////////////////////////////////////// -enum class ListenerState { +enum class EListenerState +{ EOS, RecordBatch, - InProgress + InProgress, + Empty, }; -class Listener +class TListener : public arrow::ipc::Listener { public: - Listener(IValueConsumer* valueConsumer) + explicit TListener(IValueConsumer* valueConsumer) : Consumer_(valueConsumer) { } arrow::Status OnEOS() override { - CurrentState_ = ListenerState::EOS; + CurrentState_ = EListenerState::EOS; return arrow::Status::OK(); } arrow::Status OnRecordBatchDecoded(std::shared_ptr batch) override { - CurrentState_ = ListenerState::RecordBatch; + CurrentState_ = EListenerState::RecordBatch; struct TArrowParserTag { }; - auto bufferForStringLikeValues = std::make_shared( + + auto bufferForStringLikeValues = std::make_shared( GetRefCountedTypeCookie(), 256_KB, 1_MB); - std::vector rowsValues(batch->num_columns(), TUnversionedRowValues(batch->num_rows())); - for (int columnIndex = 0; columnIndex < batch->num_columns(); columnIndex++) { - const auto columnId = Consumer_->GetNameTable()->GetIdOrRegisterName(batch->column_name(columnIndex)); - auto columnSchema = Consumer_->GetSchema()->FindColumn(batch->column_name(columnIndex)); - const auto columnType = columnSchema ? columnSchema->LogicalType() : OptionalLogicalType(SimpleLogicalType(ESimpleLogicalValueType::Any)); + auto numColumns = batch->num_columns(); + auto numRows = batch->num_rows(); + std::vector rowsValues(numColumns, TUnversionedRowValues(numRows)); + + for (int columnIndex = 0; columnIndex < numColumns; ++columnIndex) { + auto columnName = batch->column_name(columnIndex); + + auto columnId = Consumer_->GetNameTable()->GetIdOrRegisterName(columnName); + auto columnSchema = Consumer_->GetSchema()->FindColumn(columnName); + + auto columnType = columnSchema + ? columnSchema->LogicalType() + : OptionalLogicalType(SimpleLogicalType(ESimpleLogicalValueType::Any)); + auto denullifiedColumnType = DenullifyLogicalType(columnType); - const auto denullifiedLogicalType = DenullifyLogicalType(columnType); PrepareArray( - denullifiedLogicalType, + denullifiedColumnType, bufferForStringLikeValues, batch->column(columnIndex), rowsValues, @@ -902,9 +927,9 @@ class Listener columnId); } - for (int rowIndex = 0; rowIndex < batch->num_rows(); rowIndex++) { + for (int rowIndex = 0; rowIndex < numRows; ++rowIndex) { Consumer_->OnBeginRow(); - for (int columnIndex = 0; columnIndex < batch->num_columns(); columnIndex++) { + for (int columnIndex = 0; columnIndex < numColumns; ++columnIndex) { Consumer_->OnValue(rowsValues[columnIndex][rowIndex]); } Consumer_->OnEndRow(); @@ -914,20 +939,21 @@ class Listener void Reset() { - CurrentState_ = ListenerState::InProgress; + CurrentState_ = EListenerState::InProgress; } - ListenerState GetState() + EListenerState GetState() { return CurrentState_; } private: - ListenerState CurrentState_ = ListenerState::InProgress; - IValueConsumer* Consumer_; + IValueConsumer* const Consumer_; + + EListenerState CurrentState_ = EListenerState::InProgress; }; -std::shared_ptr MakeBuffer(const char* data, int64_t size) +std::shared_ptr MakeBuffer(const char* data, i64 size) { arrow::BufferBuilder bufferBuilder; ThrowOnError(bufferBuilder.Reserve(size)); @@ -944,55 +970,56 @@ class TArrowParser { public: TArrowParser(IValueConsumer* valueConsumer) - { - Listener_ = std::make_shared(valueConsumer); - Decoder_ = std::make_shared(Listener_); - } + : Listener_(std::make_shared(valueConsumer)) + , Decoder_(std::make_shared(Listener_)) + { } void Read(TStringBuf data) override { - int64_t restDataSize = data.Size(); - auto currentPtr = data.Data(); - while (restDataSize > 0) { - auto nextRequiredSize = Decoder_->next_required_size(); - - auto currentSize = std::min(reinterpret_cast(nextRequiredSize), restDataSize); + i64 restSize = data.Size(); + const char* currentPtr = data.Data(); + while (restSize > 0) { + i64 nextRequiredSize = Decoder_->next_required_size(); + auto currentSize = std::min(nextRequiredSize, restSize); ThrowOnError(Decoder_->Consume(MakeBuffer(currentPtr, currentSize))); LastState_ = Listener_->GetState(); switch (LastState_) { - case ListenerState::InProgress: + case EListenerState::InProgress: break; - case ListenerState::EOS: + case EListenerState::EOS: Decoder_ = std::make_shared(Listener_); Listener_->Reset(); break; - case ListenerState::RecordBatch: + case EListenerState::RecordBatch: Listener_->Reset(); break; + + case EListenerState::Empty: + YT_ABORT(); } currentPtr += currentSize; - restDataSize -= currentSize; + restSize -= currentSize; } } void Finish() override { - if (LastState_ == ListenerState::InProgress) { + if (LastState_ == EListenerState::InProgress) { THROW_ERROR_EXCEPTION("Unexpected end of stream"); } } - private: - std::shared_ptr Listener_; + const std::shared_ptr Listener_; + std::shared_ptr Decoder_; - ListenerState LastState_; + EListenerState LastState_ = EListenerState::Empty; }; } // namespace diff --git a/yt/yt/library/formats/skiff_writer.cpp b/yt/yt/library/formats/skiff_writer.cpp index cfe3306969e9..46d1bba1262d 100644 --- a/yt/yt/library/formats/skiff_writer.cpp +++ b/yt/yt/library/formats/skiff_writer.cpp @@ -1011,7 +1011,7 @@ class TSkiffWriter SkiffWriter_->Flush(); TryFlushBuffer(false); } - Flush(); + YT_UNUSED_FUTURE(Flush()); } TFuture Flush() override diff --git a/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp b/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp index d1bb3458d5ee..9d738c712261 100644 --- a/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp +++ b/yt/yt/library/numeric/unittests/piecewise_linear_function_ut.cpp @@ -262,7 +262,7 @@ TEST_F(TPiecewiseLinearFunctionTest, TestSortOrMergeImpl) 4, 4.1, 4.2, 4.3, 5, 5.1, 6, 6.1, 6.2 - } + } }, { /* Name */ "eightSortedSegments", @@ -286,7 +286,7 @@ TEST_F(TPiecewiseLinearFunctionTest, TestSortOrMergeImpl) 5, 5.1, 6, 6.1, 6.2, 7, 7.1 - } + } } }; diff --git a/yt/yt/library/process/process.cpp b/yt/yt/library/process/process.cpp index 809a50ed9a9b..28f699e398f2 100644 --- a/yt/yt/library/process/process.cpp +++ b/yt/yt/library/process/process.cpp @@ -234,8 +234,8 @@ bool TryResetSignals() //////////////////////////////////////////////////////////////////////////////// TProcessBase::TProcessBase(const TString& path) - : Path_(path) - , ProcessId_(InvalidProcessId) + : Path_(path) + , ProcessId_(InvalidProcessId) { } void TProcessBase::AddArgument(TStringBuf arg) diff --git a/yt/yt/library/process/unittests/pipes_ut.cpp b/yt/yt/library/process/unittests/pipes_ut.cpp index 1fb987f9e743..0c134176e739 100644 --- a/yt/yt/library/process/unittests/pipes_ut.cpp +++ b/yt/yt/library/process/unittests/pipes_ut.cpp @@ -108,7 +108,7 @@ TEST(TAsyncWriterTest, WriteFailed) ::memset(buffer.Begin(), 'a', buffer.Size()); auto asyncWriteResult = writer->Write(buffer); - reader->Abort(); + YT_UNUSED_FUTURE(reader->Abort()); EXPECT_FALSE(asyncWriteResult.Get().IsOK()) << ToString(asyncWriteResult.Get()); @@ -279,7 +279,7 @@ TEST_P(TPipeBigReadWriteTest, RealReadWrite) std::vector data(dataSize, 'a'); - BIND([&] () { + YT_UNUSED_FUTURE(BIND([&] () { auto dice = std::bind( std::uniform_int_distribution(0, 127), std::default_random_engine()); @@ -287,7 +287,7 @@ TEST_P(TPipeBigReadWriteTest, RealReadWrite) data[i] = dice(); } }) - .AsyncVia(queue->GetInvoker()).Run(); + .AsyncVia(queue->GetInvoker()).Run()); auto writeError = BIND(&WriteAll, Writer, data.data(), data.size(), blockSize) .AsyncVia(queue->GetInvoker()) diff --git a/yt/yt/library/profiling/solomon/remote.cpp b/yt/yt/library/profiling/solomon/remote.cpp index b335782a125f..ee3f5b46c108 100644 --- a/yt/yt/library/profiling/solomon/remote.cpp +++ b/yt/yt/library/profiling/solomon/remote.cpp @@ -145,7 +145,7 @@ void TRemoteRegistry::Transfer(const NProto::TSensorDump& dump) transferValue(&sensorSet->TimeHistogramsCube_, ESensorType::TimeHistogram, NYT::FromProto(projection.time_histogram())); } else if (projection.has_gauge_histogram()) { transferValue(&sensorSet->GaugeHistogramsCube_, ESensorType::GaugeHistogram, NYT::FromProto(projection.gauge_histogram())); - } else if (projection.has_rate_histogram()) { + } else if (projection.has_rate_histogram()) { transferValue(&sensorSet->RateHistogramsCube_, ESensorType::RateHistogram, NYT::FromProto(projection.rate_histogram())); } else { // Ignore unknown types. diff --git a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto index 0e8b3fe47a94..be48295c39df 100644 --- a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto +++ b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto @@ -4,7 +4,7 @@ option java_package = "tech.ytsaurus.rpcproxy"; option java_outer_classname = "ApiProtos"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/api/rpc_proxy"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/api/rpc_proxy"; import "yt_proto/yt/core/misc/proto/guid.proto"; import "yt_proto/yt/core/misc/proto/error.proto"; diff --git a/yt/yt_proto/yt/client/api/rpc_proxy/proto/discovery_service.proto b/yt/yt_proto/yt/client/api/rpc_proxy/proto/discovery_service.proto index d1ab83705972..8ac0df236f6e 100644 --- a/yt/yt_proto/yt/client/api/rpc_proxy/proto/discovery_service.proto +++ b/yt/yt_proto/yt/client/api/rpc_proxy/proto/discovery_service.proto @@ -4,7 +4,7 @@ option java_package = "tech.ytsaurus"; option java_outer_classname = "DiscoveryProtos"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/api/rpc_proxy"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/api/rpc_proxy"; //------------------------------------------------------------------------------ diff --git a/yt/yt_proto/yt/client/chaos_client/proto/replication_card.proto b/yt/yt_proto/yt/client/chaos_client/proto/replication_card.proto index 1f85bdf8665a..fed0cc4df2fd 100644 --- a/yt/yt_proto/yt/client/chaos_client/proto/replication_card.proto +++ b/yt/yt_proto/yt/client/chaos_client/proto/replication_card.proto @@ -1,6 +1,6 @@ package NYT.NChaosClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chaos_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chaos_client"; import "yt_proto/yt/core/misc/proto/guid.proto"; diff --git a/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto b/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto index ea16c4ae7bda..e6c778f4eb55 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/chunk_meta.proto @@ -2,7 +2,7 @@ package NYT.NChunkClient.NProto; import "yt_proto/yt/core/misc/proto/protobuf_helpers.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/chunk_client/proto/chunk_spec.proto b/yt/yt_proto/yt/client/chunk_client/proto/chunk_spec.proto index 0f4f6cc14606..a7626b4b35ea 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/chunk_spec.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/chunk_spec.proto @@ -4,7 +4,7 @@ import "yt_proto/yt/core/misc/proto/guid.proto"; import "yt_proto/yt/client/chunk_client/proto/read_limit.proto"; import "yt_proto/yt/client/chunk_client/proto/chunk_meta.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/chunk_client/proto/confirm_chunk_replica_info.proto b/yt/yt_proto/yt/client/chunk_client/proto/confirm_chunk_replica_info.proto index e4bf8382f1fb..e76a5b48075c 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/confirm_chunk_replica_info.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/confirm_chunk_replica_info.proto @@ -2,7 +2,7 @@ package NYT.NChunkClient.NProto; import "yt_proto/yt/core/misc/proto/guid.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/chunk_client/proto/data_statistics.proto b/yt/yt_proto/yt/client/chunk_client/proto/data_statistics.proto index bf32df776f10..9696458aac45 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/data_statistics.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/data_statistics.proto @@ -1,6 +1,6 @@ package NYT.NChunkClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/chunk_client/proto/read_limit.proto b/yt/yt_proto/yt/client/chunk_client/proto/read_limit.proto index e449cce8a5e0..f6a49a84e543 100644 --- a/yt/yt_proto/yt/client/chunk_client/proto/read_limit.proto +++ b/yt/yt_proto/yt/client/chunk_client/proto/read_limit.proto @@ -1,6 +1,6 @@ package NYT.NChunkClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/chunk_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/chunk_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/discovery_client/proto/discovery_client_service.proto b/yt/yt_proto/yt/client/discovery_client/proto/discovery_client_service.proto index 6726ee393f0d..435dc51803d9 100644 --- a/yt/yt_proto/yt/client/discovery_client/proto/discovery_client_service.proto +++ b/yt/yt_proto/yt/client/discovery_client/proto/discovery_client_service.proto @@ -2,7 +2,7 @@ package NYT.NDiscoveryClient.NProto; import "yt_proto/yt/core/ytree/proto/attributes.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/discovery_client"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/discovery_client"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/hive/proto/cluster_directory.proto b/yt/yt_proto/yt/client/hive/proto/cluster_directory.proto index e5d59965d7aa..4a6a671b1ba1 100644 --- a/yt/yt_proto/yt/client/hive/proto/cluster_directory.proto +++ b/yt/yt_proto/yt/client/hive/proto/cluster_directory.proto @@ -1,6 +1,6 @@ package NYT.NHiveClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/hive"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/hive"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/client/hive/proto/timestamp_map.proto b/yt/yt_proto/yt/client/hive/proto/timestamp_map.proto index 93a23cdcc05a..43f96bcf9fb5 100644 --- a/yt/yt_proto/yt/client/hive/proto/timestamp_map.proto +++ b/yt/yt_proto/yt/client/hive/proto/timestamp_map.proto @@ -1,6 +1,6 @@ package NYT.NHiveClient.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/client/hive"; +option go_package = "a.yandex-team.ru/yt/go/proto/client/hive"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/misc/proto/bloom_filter.proto b/yt/yt_proto/yt/core/misc/proto/bloom_filter.proto index fb31c7127a1c..b950a6cec71c 100644 --- a/yt/yt_proto/yt/core/misc/proto/bloom_filter.proto +++ b/yt/yt_proto/yt/core/misc/proto/bloom_filter.proto @@ -1,6 +1,6 @@ package NYT.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/misc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/misc"; message TBloomFilter { diff --git a/yt/yt_proto/yt/core/misc/proto/error.proto b/yt/yt_proto/yt/core/misc/proto/error.proto index 8cfc652a562f..2e20bc026956 100644 --- a/yt/yt_proto/yt/core/misc/proto/error.proto +++ b/yt/yt_proto/yt/core/misc/proto/error.proto @@ -3,7 +3,7 @@ package NYT.NProto; option java_package = "tech.ytsaurus"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/misc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/misc"; import "yt_proto/yt/core/ytree/proto/attributes.proto"; diff --git a/yt/yt_proto/yt/core/misc/proto/guid.proto b/yt/yt_proto/yt/core/misc/proto/guid.proto index 34950daa8ad9..61f191bf2444 100644 --- a/yt/yt_proto/yt/core/misc/proto/guid.proto +++ b/yt/yt_proto/yt/core/misc/proto/guid.proto @@ -4,7 +4,7 @@ option java_package = "tech.ytsaurus"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/misc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/misc"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/misc/proto/protobuf_helpers.proto b/yt/yt_proto/yt/core/misc/proto/protobuf_helpers.proto index fc3ce082746e..79b4f242a359 100644 --- a/yt/yt_proto/yt/core/misc/proto/protobuf_helpers.proto +++ b/yt/yt_proto/yt/core/misc/proto/protobuf_helpers.proto @@ -3,7 +3,7 @@ package NYT.NProto; option java_package = "tech.ytsaurus"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/misc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/misc"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/rpc/proto/rpc.proto b/yt/yt_proto/yt/core/rpc/proto/rpc.proto index 7d01c9082bbd..043b2953e20d 100644 --- a/yt/yt_proto/yt/core/rpc/proto/rpc.proto +++ b/yt/yt_proto/yt/core/rpc/proto/rpc.proto @@ -3,7 +3,7 @@ package NYT.NRpc.NProto; option java_package = "tech.ytsaurus.rpc"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/rpc"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/rpc"; import "yt_proto/yt/core/misc/proto/guid.proto"; diff --git a/yt/yt_proto/yt/core/tracing/proto/span.proto b/yt/yt_proto/yt/core/tracing/proto/span.proto index dce25abf9929..9d08cc47a64b 100644 --- a/yt/yt_proto/yt/core/tracing/proto/span.proto +++ b/yt/yt_proto/yt/core/tracing/proto/span.proto @@ -5,7 +5,7 @@ import "yt_proto/yt/core/misc/proto/guid.proto"; option java_package = "tech.ytsaurus.tracing"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/tracing"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/tracing"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/tracing/proto/tracing_ext.proto b/yt/yt_proto/yt/core/tracing/proto/tracing_ext.proto index 1bf9482d63ce..8c2740493f1b 100644 --- a/yt/yt_proto/yt/core/tracing/proto/tracing_ext.proto +++ b/yt/yt_proto/yt/core/tracing/proto/tracing_ext.proto @@ -5,7 +5,7 @@ import "yt_proto/yt/core/misc/proto/guid.proto"; option java_package = "tech.ytsaurus.tracing"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/tracing"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/tracing"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto b/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto index 42c8ffbb8bd0..6496caa47e3a 100644 --- a/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto +++ b/yt/yt_proto/yt/core/yson/proto/protobuf_interop.proto @@ -1,6 +1,6 @@ package NYT.NYson.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/yson"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/yson"; import "google/protobuf/descriptor.proto"; diff --git a/yt/yt_proto/yt/core/ytree/proto/attributes.proto b/yt/yt_proto/yt/core/ytree/proto/attributes.proto index f936ba4fcb20..cb1b90451edb 100644 --- a/yt/yt_proto/yt/core/ytree/proto/attributes.proto +++ b/yt/yt_proto/yt/core/ytree/proto/attributes.proto @@ -5,7 +5,7 @@ import "yt_proto/yt/core/yson/proto/protobuf_interop.proto"; option java_package = "tech.ytsaurus.ytree"; option java_multiple_files = true; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/ytree"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/ytree"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto b/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto index db37024a09d2..646526cd78d7 100644 --- a/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto +++ b/yt/yt_proto/yt/core/ytree/proto/request_complexity_limits.proto @@ -1,6 +1,6 @@ package NYT.NYTree.NProto; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/ytree"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/ytree"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/core/ytree/proto/ypath.proto b/yt/yt_proto/yt/core/ytree/proto/ypath.proto index 983adc82e0f4..1342ac3ae94d 100644 --- a/yt/yt_proto/yt/core/ytree/proto/ypath.proto +++ b/yt/yt_proto/yt/core/ytree/proto/ypath.proto @@ -4,7 +4,7 @@ import "yt_proto/yt/core/rpc/proto/rpc.proto"; import "yt_proto/yt/core/ytree/proto/attributes.proto"; import "yt_proto/yt/core/ytree/proto/request_complexity_limits.proto"; -option go_package = "github.com/ydb-platform/ydb/yt/go/proto/core/ytree"; +option go_package = "a.yandex-team.ru/yt/go/proto/core/ytree"; //////////////////////////////////////////////////////////////////////////////// diff --git a/yt/yt_proto/yt/formats/extension.proto b/yt/yt_proto/yt/formats/extension.proto index 5d0a28f5a7cb..80a529ba9536 100644 --- a/yt/yt_proto/yt/formats/extension.proto +++ b/yt/yt_proto/yt/formats/extension.proto @@ -2,7 +2,7 @@ import "google/protobuf/descriptor.proto"; package NYT; -option go_package = "github.com/ydb-platform/ydb/yt/yt_proto/yt/formats"; +option go_package = "a.yandex-team.ru/yt/yt_proto/yt/formats"; message EWrapperFieldFlag { diff --git a/yt/yt_proto/yt/formats/yamr.proto b/yt/yt_proto/yt/formats/yamr.proto index 9c9835bc2dd8..457de1f9fcef 100644 --- a/yt/yt_proto/yt/formats/yamr.proto +++ b/yt/yt_proto/yt/formats/yamr.proto @@ -2,7 +2,7 @@ import "yt/yt_proto/yt/formats/extension.proto"; package NYT; -option go_package = "github.com/ydb-platform/ydb/yt/yt_proto/yt/formats"; +option go_package = "a.yandex-team.ru/yt/yt_proto/yt/formats"; message TYamr { optional string Key = 1 [(NYT.key_column_name) = "key"];