Browse Source

Merge branch 'rightlib' into mergelibs-240906-1233

Alexander Smirnov 6 months ago
parent
commit
d10dc4f889

+ 94 - 28
build/conf/java.conf

@@ -22,6 +22,32 @@ module JAVA_LIBRARY: JAR_LIBRARY {
 
 
 PROGRAM_AND_TESTS_CP_COLLECTING_NODES_SEM=IGNORED
 PROGRAM_AND_TESTS_CP_COLLECTING_NODES_SEM=IGNORED
 
 
+module _JAR_PROGRAM_COMPILATION: JAR_LIBRARY {
+    .IGNORED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
+    .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO
+    .FINAL_TARGET=no
+
+    when ($OPENSOURCE == "yes" && $AUTOCHECK == "yes") {
+        # FIXME: Replace AUTOCHECK == yes with _not a host platform_ check after YMAKE-218
+        MODULE_LICENSES_RESTRICTION_TYPES = ALLOW_ONLY
+        MODULE_LICENSES_RESTRICTIONS = SERVICE REQUIRE_CITATION REQUIRE_MODIFICATIONS_DISCLOSURE
+
+        when ($MAKE_UBERJAR_VALUE == "yes") {
+            # At the time LICENCE_RESTRICTION does not properly distinct static / dynamic linkage in UBERJAR() modules.
+            # Hence we forbid using UBERJAR() in OPENSOURCE()
+            #
+            # Should be fixed in YMAKE-1043
+            _OK = no
+        }
+    }
+    when ($OS_IOS == "yes" || $OS_ANDROID == "yes" || $MAPSMOBI_BUILD_TARGET == "yes") {
+        MODULE_LICENSES_RESTRICTION_TYPES = ALLOW_ONLY
+        MODULE_LICENSES_RESTRICTIONS = SERVICE REQUIRE_CITATION
+    }
+
+    ASSERT(_OK "UBERJAR() macro can not be used in this configuration, see YMAKE-1043")
+}
+
 ### @usage: JAVA_PROGRAM()
 ### @usage: JAVA_PROGRAM()
 ###
 ###
 ### The module describing java programs build.
 ### The module describing java programs build.
@@ -45,32 +71,63 @@ multimodule JAVA_PROGRAM {
 
 
         SET(MODULE_TYPE JAVA_PROGRAM)
         SET(MODULE_TYPE JAVA_PROGRAM)
     }
     }
-    module JAR_COMPILATION: JAR_LIBRARY {
-        .IGNORED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
-        .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO
+    module JAR_COMPILATION: _JAR_PROGRAM_COMPILATION {
         .SEM=BUILD_JAR_SEM
         .SEM=BUILD_JAR_SEM
-        .FINAL_TARGET=no
         SET(MODULE_TYPE JAVA_PROGRAM)
         SET(MODULE_TYPE JAVA_PROGRAM)
+    }
+}
 
 
-        when ($OPENSOURCE == "yes" && $AUTOCHECK == "yes") {
-            # FIXME: Replace AUTOCHECK == yes with _not a host platform_ check after YMAKE-218
-            MODULE_LICENSES_RESTRICTION_TYPES = ALLOW_ONLY
-            MODULE_LICENSES_RESTRICTIONS = SERVICE REQUIRE_CITATION REQUIRE_MODIFICATIONS_DISCLOSURE
+_PROCESSOR_CLASSES_VALUE=
+_PROCESSOR_CLASSES_SEM=
+macro PROCESSOR_CLASSES(Classes...) {
+    SET_APPEND(_PROCESSOR_CLASSES_VALUE $Classes)
+    SET_APPEND(_PROCESSOR_CLASSES_SEM && java-apclasses $Classes)
+}
 
 
-            when ($MAKE_UBERJAR_VALUE == "yes") {
-                # At the time LICENCE_RESTRICTION does not properly distinct static / dynamic linkage in UBERJAR() modules.
-                # Hence we forbid using UBERJAR() in OPENSOURCE()
-                #
-                # Should be fixed in YMAKE-1043
-                _OK = no
-            }
-        }
-        when ($OS_IOS == "yes" || $OS_ANDROID == "yes" || $MAPSMOBI_BUILD_TARGET == "yes") {
-            MODULE_LICENSES_RESTRICTION_TYPES = ALLOW_ONLY
-            MODULE_LICENSES_RESTRICTIONS = SERVICE REQUIRE_CITATION
-        }
+_AUTO_SERVICE_SEM=
+macro AUTO_SERVICE(Ver) {
+    USE_ANNOTATION_PROCESSOR(contrib/java/com/google/auto/service/auto-service/${Ver})
+	PEERDIR(contrib/java/com/google/auto/service/auto-service-annotations/${Ver})
+    SET(_AUTO_SERVICE_SEM && java-apautoservice $Ver)
+}
 
 
-        ASSERT(_OK "UBERJAR() macro can not be used in this configuration, see YMAKE-1043")
+_BUILD_JAVA_ANNOTATION_PROCESSOR_SEM=$BUILD_JAR_SEM $_PROCESSOR_CLASSES_SEM $_AUTO_SERVICE_SEM
+
+### @usage: JAVA_ANNOTATION_PROCESSOR()
+###
+### The module describing java annotation processor build.
+### Output artifacts: .jar and directory with all the jar to the classpath of the formation.
+###
+### Documentation: https://wiki.yandex-team.ru/yatool/java/
+multimodule JAVA_ANNOTATION_PROCESSOR {
+    module JAR_RUNNABLE: _JAR_RUNNABLE {
+        .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE
+        .SEM=PROGRAM_AND_TESTS_CP_COLLECTING_NODES_SEM
+        .IGNORED=RUN_JAVA_PROGRAM PROVIDES FEATURE_VERSION
+        .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE
+        .PEERDIRSELF=JAR_COMPILATION
+
+        SET(MODULE_TYPE JAVA_ANNOTATION_PROCESSOR)
+    }
+    module JAR_COMPILATION: _JAR_PROGRAM_COMPILATION {
+        .SEM=_BUILD_JAVA_ANNOTATION_PROCESSOR_SEM
+    }
+}
+
+_RUN_JAVA_CONTRIB_ANNOTATION_PROCESSOR_SEM=
+multimodule JAVA_CONTRIB_ANNOTATION_PROCESSOR {
+    module JAR_RUNNABLE: _JAR_RUNNABLE {
+        .IGNORED=JAVA_SRCS RUN_JAR_PROGRAM RUN_JAVA_PROGRAM JAR_RESOURCE SRC_RESOURCE LOCAL_JAR
+        .PEERDIRSELF=JAR_COMPILATION
+        .SEM=_RUN_JAVA_CONTRIB_ANNOTATION_PROCESSOR_SEM
+
+        SET(MODULE_TYPE JAVA_ANNOTATION_PROCESSOR)
+        ENABLE(DISABLE_SCRIPTGEN)
+    }
+    module JAR_COMPILATION: JAVA_CONTRIB {
+        .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO
+        .FINAL_TARGET=no
+        .SEM=_BUILD_JAVA_ANNOTATION_PROCESSOR_SEM
     }
     }
 }
 }
 
 
@@ -465,18 +522,27 @@ macro JAR_ANNOTATION_PROCESSOR(Classes...) {
 
 
 # tag:java-specific
 # tag:java-specific
 macro _JAR_ANN_PROC_OPTS(Classes...) {
 macro _JAR_ANN_PROC_OPTS(Classes...) {
-    .CMD=$_JAR_ANN_PROC_OPT_PREFIX ${join=,:Classes}
+    .CMD=$_JAR_ANN_PROC_OPT_PREFIX ${join=,:Classes} $_USE_ANNOTATION_PROCESSOR_OPT
 }
 }
 
 
 # tag:java-specific
 # tag:java-specific
-_USE_ANNOTATION_PROCESSOR_OPT=
+_USE_ANNOTATION_PROCESSOR_TOOL=
 _USE_ANNOTATION_PROCESSOR_SEM=
 _USE_ANNOTATION_PROCESSOR_SEM=
-### @usage: USE_ANNOTATION_PROCESSOR(AnnotationProcessor)
+### @usage: USE_ANNOTATION_PROCESSOR(Path)
 ###
 ###
 ### Used to specify annotation processor for building JAVA_PROGRAM() and JAVA_LIBRARY().
 ### Used to specify annotation processor for building JAVA_PROGRAM() and JAVA_LIBRARY().
-macro USE_ANNOTATION_PROCESSOR(AnnotationProcessor) {
-    SET(_USE_ANNOTATION_PROCESSOR_OPT -processorpath @${tool:AnnotationProcessor}.cplist)
-    SET(_USE_ANNOTATION_PROCESSOR_SEM && use_annotation_processor $AnnotationProcessor)
+macro USE_ANNOTATION_PROCESSOR(Path) {
+    SET(_USE_ANNOTATION_PROCESSOR_TOOL $Path)
+    SET(_USE_ANNOTATION_PROCESSOR_SEM && use_annotation_processor $Path)
+}
+
+when ($_USE_ANNOTATION_PROCESSOR_TOOL != "") {
+    _USE_ANNOTATION_PROCESSOR_CMD=${tool:_USE_ANNOTATION_PROCESSOR_TOOL}
+    _USE_ANNOTATION_PROCESSOR_OPT=${pre=-processorpath "@";suf=.cplst:_USE_ANNOTATION_PROCESSOR_CMD}
+}
+otherwise {
+    _USE_ANNOTATION_PROCESSOR_CMD=
+    _USE_ANNOTATION_PROCESSOR_OPT=
 }
 }
 
 
 # tag:java-specific
 # tag:java-specific
@@ -709,7 +775,7 @@ macro _PACK_JAR_HELPER(Out) {
 
 
 # tag:java-specific
 # tag:java-specific
 macro _JAVAC_RUN_HELPER(JAVAC_CMD_WITH_ARGS...) {
 macro _JAVAC_RUN_HELPER(JAVAC_CMD_WITH_ARGS...) {
-    .CMD=${cwd:ARCADIA_BUILD_ROOT} ${env:"LC_ALL=en_US.UTF-8"} $YMAKE_PYTHON ${input:"build/scripts/run_javac.py"} ${input;hide:"build/scripts/build_java_with_error_prone2.py"} ${input;hide:"build/scripts/setup_java_tmpdir.py"} --with-setup-java-tmpdir --sources-list ${BINDIR}/all-java.srclst ${RUN_JAVAC_ARGS} ${JAVAC_CMD_WITH_ARGS} @${BINDIR}/all-java.srclst -classpath ${ARCADIA_BUILD_ROOT}/bfg.jar -Xpkginfo:always ${JAVAC_OPTS} ${_USE_ANNOTATION_PROCESSOR_OPT} $_JAR_ANN_PROC_OPTS($_JAR_ANN_PROCESSORS) -d ${BINDIR}/cls -g -encoding UTF-8
+    .CMD=${cwd:ARCADIA_BUILD_ROOT} ${env:"LC_ALL=en_US.UTF-8"} $YMAKE_PYTHON ${input:"build/scripts/run_javac.py"} ${input;hide:"build/scripts/build_java_with_error_prone2.py"} ${input;hide:"build/scripts/setup_java_tmpdir.py"} --with-setup-java-tmpdir --sources-list ${BINDIR}/all-java.srclst ${RUN_JAVAC_ARGS} ${JAVAC_CMD_WITH_ARGS} @${BINDIR}/all-java.srclst -classpath ${ARCADIA_BUILD_ROOT}/bfg.jar -Xpkginfo:always ${JAVAC_OPTS} $_JAR_ANN_PROC_OPTS($_JAR_ANN_PROCESSORS) -d ${BINDIR}/cls -g -encoding UTF-8
 }
 }
 
 
 # tag:java-specific
 # tag:java-specific

+ 2 - 0
build/config/tests/cpp_style/config.clang-format

@@ -27,6 +27,8 @@ IndentFunctionDeclarationAfterType: false
 MaxEmptyLinesToKeep: 1
 MaxEmptyLinesToKeep: 1
 KeepEmptyLinesAtTheStartOfBlocks: false
 KeepEmptyLinesAtTheStartOfBlocks: false
 NamespaceIndentation: All
 NamespaceIndentation: All
+FixNamespaceComments: true
+ShortNamespaceLines: 0
 ObjCSpaceAfterProperty: false
 ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
 ObjCSpaceBeforeProtocolList: true
 PackConstructorInitializers: Never
 PackConstructorInitializers: Never

+ 7 - 0
build/export_generators/cmake/conan_imports.jinja

@@ -9,6 +9,13 @@
 {%-         if "bin" in srcdir %}
 {%-         if "bin" in srcdir %}
             {{ shift }}for bindir in dep.cpp_info.bindirs:
             {{ shift }}for bindir in dep.cpp_info.bindirs:
                 {{ shift }}copy(self, pattern="{{ mask }}", src=bindir, dst=self.build_folder + "../../../../{{ dstdir }}")
                 {{ shift }}copy(self, pattern="{{ mask }}", src=bindir, dst=self.build_folder + "../../../../{{ dstdir }}")
+{%-             if "swig" in mask %}
+                # SWIG recipe under Conan2 does not set SWIG_LIB, do it manually here or else build fails
+                if os.path.exists(os.path.join(bindir, "swig")):
+                    env = Environment()
+                    if not env.vars(self).get("SWIG_LIB"):
+                        env.define("SWIG_LIB", os.path.join(bindir, "swiglib"))
+{%-             endif -%}
 {%-         elif "res" in srcdir %}
 {%-         elif "res" in srcdir %}
             {{ shift }}for resdir in dep.cpp_info.resdirs:
             {{ shift }}for resdir in dep.cpp_info.resdirs:
                 {{ shift }}copy(self, pattern="{{ mask }}", src=resdir, dst=self.build_folder + "../../../../{{ dstdir }}")
                 {{ shift }}copy(self, pattern="{{ mask }}", src=resdir, dst=self.build_folder + "../../../../{{ dstdir }}")

+ 3 - 0
build/export_generators/cmake/conanfile.py.jinja

@@ -2,8 +2,11 @@ from conan import ConanFile
 
 
 {%- if use_conan2 %}
 {%- if use_conan2 %}
 
 
+import os
+
 from conan.tools.files import copy
 from conan.tools.files import copy
 from conan.tools.cmake import CMakeToolchain, CMakeDeps, cmake_layout
 from conan.tools.cmake import CMakeToolchain, CMakeDeps, cmake_layout
+from conan.tools.env import Environment
 
 
 {%- endif %}
 {%- endif %}
 
 

+ 5 - 1
build/export_generators/cmake/target_links.jinja

@@ -51,7 +51,11 @@ target_link_libraries({{ name }} INTERFACE
 
 
 {%- if publics|length %}
 {%- if publics|length %}
 target_link_libraries({{ name }} PUBLIC
 target_link_libraries({{ name }} PUBLIC
-{%-     for public in publics %}
+{%-     for public in publics -%}
+{#-         OpenSSL recipe under Conan2 uses another target name, patch it manually here, or else build fails -#}
+{%-         if (use_conan2) and (public == "OpenSSL::OpenSSL") -%}
+{%-            set public = "openssl::openssl" -%}
+{%-         endif %}
   {{ public }}
   {{ public }}
 {%-     endfor %}
 {%-     endfor %}
 )
 )

+ 38 - 0
build/mapping.conf.json

@@ -61,6 +61,12 @@
         "1096776689": "https://devtools-registry.s3.yandex.net/1096776689",
         "1096776689": "https://devtools-registry.s3.yandex.net/1096776689",
         "545709503": "https://devtools-registry.s3.yandex.net/545709503",
         "545709503": "https://devtools-registry.s3.yandex.net/545709503",
         "545709491": "https://devtools-registry.s3.yandex.net/545709491",
         "545709491": "https://devtools-registry.s3.yandex.net/545709491",
+        "6638626363": "https://devtools-registry.s3.yandex.net/6638626363",
+        "6638629972": "https://devtools-registry.s3.yandex.net/6638629972",
+        "6638916300": "https://devtools-registry.s3.yandex.net/6638916300",
+        "6638917016": "https://devtools-registry.s3.yandex.net/6638917016",
+        "6638915855": "https://devtools-registry.s3.yandex.net/6638915855",
+        "6638914429": "https://devtools-registry.s3.yandex.net/6638914429",
         "721500304": "https://devtools-registry.s3.yandex.net/721500304",
         "721500304": "https://devtools-registry.s3.yandex.net/721500304",
         "3573990573": "https://devtools-registry.s3.yandex.net/3573990573",
         "3573990573": "https://devtools-registry.s3.yandex.net/3573990573",
         "3573996018": "https://devtools-registry.s3.yandex.net/3573996018",
         "3573996018": "https://devtools-registry.s3.yandex.net/3573996018",
@@ -241,6 +247,10 @@
         "3877389037": "https://devtools-registry.s3.yandex.net/3877389037",
         "3877389037": "https://devtools-registry.s3.yandex.net/3877389037",
         "3877389242": "https://devtools-registry.s3.yandex.net/3877389242",
         "3877389242": "https://devtools-registry.s3.yandex.net/3877389242",
         "3877388826": "https://devtools-registry.s3.yandex.net/3877388826",
         "3877388826": "https://devtools-registry.s3.yandex.net/3877388826",
+        "6576113077": "https://devtools-registry.s3.yandex.net/6576113077",
+        "6576113078": "https://devtools-registry.s3.yandex.net/6576113078",
+        "6576113095": "https://devtools-registry.s3.yandex.net/6576113095",
+        "6576113106": "https://devtools-registry.s3.yandex.net/6576113106",
         "6148089711": "https://devtools-registry.s3.yandex.net/6148089711",
         "6148089711": "https://devtools-registry.s3.yandex.net/6148089711",
         "6512097221": "https://devtools-registry.s3.yandex.net/6512097221",
         "6512097221": "https://devtools-registry.s3.yandex.net/6512097221",
         "6812263131": "https://devtools-registry.s3.yandex.net/6812263131",
         "6812263131": "https://devtools-registry.s3.yandex.net/6812263131",
@@ -383,6 +393,8 @@
         "6924868767": "https://devtools-registry.s3.yandex.net/6924868767",
         "6924868767": "https://devtools-registry.s3.yandex.net/6924868767",
         "7000556602": "https://devtools-registry.s3.yandex.net/7000556602",
         "7000556602": "https://devtools-registry.s3.yandex.net/7000556602",
         "7000559763": "https://devtools-registry.s3.yandex.net/7000559763",
         "7000559763": "https://devtools-registry.s3.yandex.net/7000559763",
+        "7017102934": "https://devtools-registry.s3.yandex.net/7017102934",
+        "7017113894": "https://devtools-registry.s3.yandex.net/7017113894",
         "5486731632": "https://devtools-registry.s3.yandex.net/5486731632",
         "5486731632": "https://devtools-registry.s3.yandex.net/5486731632",
         "5514350352": "https://devtools-registry.s3.yandex.net/5514350352",
         "5514350352": "https://devtools-registry.s3.yandex.net/5514350352",
         "5514360398": "https://devtools-registry.s3.yandex.net/5514360398",
         "5514360398": "https://devtools-registry.s3.yandex.net/5514360398",
@@ -688,6 +700,11 @@
         "6785543406": "https://devtools-registry.s3.yandex.net/6785543406",
         "6785543406": "https://devtools-registry.s3.yandex.net/6785543406",
         "1277521710": "https://devtools-registry.s3.yandex.net/1277521710",
         "1277521710": "https://devtools-registry.s3.yandex.net/1277521710",
         "1812152858": "https://devtools-registry.s3.yandex.net/1812152858",
         "1812152858": "https://devtools-registry.s3.yandex.net/1812152858",
+        "6639202855": "https://devtools-registry.s3.yandex.net/6639202855",
+        "4758626187": "https://devtools-registry.s3.yandex.net/4758626187",
+        "4758626560": "https://devtools-registry.s3.yandex.net/4758626560",
+        "4758626176": "https://devtools-registry.s3.yandex.net/4758626176",
+        "4758626361": "https://devtools-registry.s3.yandex.net/4758626361",
         "289381370": "https://devtools-registry.s3.yandex.net/289381370",
         "289381370": "https://devtools-registry.s3.yandex.net/289381370",
         "289382642": "https://devtools-registry.s3.yandex.net/289382642",
         "289382642": "https://devtools-registry.s3.yandex.net/289382642",
         "5776380974": "https://devtools-registry.s3.yandex.net/5776380974",
         "5776380974": "https://devtools-registry.s3.yandex.net/5776380974",
@@ -748,6 +765,8 @@
         "3050798466": "https://devtools-registry.s3.yandex.net/3050798466",
         "3050798466": "https://devtools-registry.s3.yandex.net/3050798466",
         "3064614561": "https://devtools-registry.s3.yandex.net/3064614561",
         "3064614561": "https://devtools-registry.s3.yandex.net/3064614561",
         "3166999959": "https://devtools-registry.s3.yandex.net/3166999959",
         "3166999959": "https://devtools-registry.s3.yandex.net/3166999959",
+        "65627450": "https://devtools-registry.s3.yandex.net/65627450",
+        "65627451": "https://devtools-registry.s3.yandex.net/65627451",
         "5631222854": "https://devtools-registry.s3.yandex.net/5631222854",
         "5631222854": "https://devtools-registry.s3.yandex.net/5631222854",
         "5631220729": "https://devtools-registry.s3.yandex.net/5631220729",
         "5631220729": "https://devtools-registry.s3.yandex.net/5631220729",
         "5631255103": "https://devtools-registry.s3.yandex.net/5631255103",
         "5631255103": "https://devtools-registry.s3.yandex.net/5631255103",
@@ -898,6 +917,12 @@
         "1096776689": "JAVA_LIBRARY-none-none-j2objc-annotations-1.3.jar",
         "1096776689": "JAVA_LIBRARY-none-none-j2objc-annotations-1.3.jar",
         "545709503": "JAVA_LIBRARY-none-none-javax.annotation-api-1.3.1-sources.jar",
         "545709503": "JAVA_LIBRARY-none-none-javax.annotation-api-1.3.1-sources.jar",
         "545709491": "JAVA_LIBRARY-none-none-javax.annotation-api-1.3.1.jar",
         "545709491": "JAVA_LIBRARY-none-none-javax.annotation-api-1.3.1.jar",
+        "6638626363": "JAVA_LIBRARY-none-none-kotlin-stdlib-1.9.24-sources.jar",
+        "6638629972": "JAVA_LIBRARY-none-none-kotlin-stdlib-1.9.24.jar",
+        "6638916300": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk7-1.9.24-sources.jar",
+        "6638917016": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk7-1.9.24.jar",
+        "6638915855": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk8-1.9.24-sources.jar",
+        "6638914429": "JAVA_LIBRARY-none-none-kotlin-stdlib-jdk8-1.9.24.jar",
         "721500304": "JAVA_LIBRARY-none-none-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar",
         "721500304": "JAVA_LIBRARY-none-none-listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar",
         "3573990573": "JAVA_LIBRARY-none-none-proto-google-common-protos-2.9.0-sources.jar",
         "3573990573": "JAVA_LIBRARY-none-none-proto-google-common-protos-2.9.0-sources.jar",
         "3573996018": "JAVA_LIBRARY-none-none-proto-google-common-protos-2.9.0.jar",
         "3573996018": "JAVA_LIBRARY-none-none-proto-google-common-protos-2.9.0.jar",
@@ -1078,6 +1103,10 @@
         "3877389037": "devtools/huge_python3/python3 for linux-aarch64",
         "3877389037": "devtools/huge_python3/python3 for linux-aarch64",
         "3877389242": "devtools/huge_python3/python3 for linux-ppc64le",
         "3877389242": "devtools/huge_python3/python3 for linux-ppc64le",
         "3877388826": "devtools/huge_python3/python3 for win32-clang-cl",
         "3877388826": "devtools/huge_python3/python3 for win32-clang-cl",
+        "6576113077": "devtools/ktlint_build/package.json",
+        "6576113078": "devtools/ktlint_build/package.json",
+        "6576113095": "devtools/ktlint_build/package.json",
+        "6576113106": "devtools/ktlint_build/package_win.json",
         "6148089711": "devtools/local_cache/toolscache/server/ya-tc for darwin",
         "6148089711": "devtools/local_cache/toolscache/server/ya-tc for darwin",
         "6512097221": "devtools/local_cache/toolscache/server/ya-tc for darwin",
         "6512097221": "devtools/local_cache/toolscache/server/ya-tc for darwin",
         "6812263131": "devtools/local_cache/toolscache/server/ya-tc for darwin",
         "6812263131": "devtools/local_cache/toolscache/server/ya-tc for darwin",
@@ -1220,6 +1249,8 @@
         "6924868767": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
         "6924868767": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
         "7000556602": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
         "7000556602": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
         "7000559763": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
         "7000559763": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
+        "7017102934": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
+        "7017113894": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
         "5486731632": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
         "5486731632": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
         "5514350352": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
         "5514350352": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
         "5514360398": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
         "5514360398": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
@@ -1525,6 +1556,11 @@
         "6785543406": "grpc-java-linux-x86_64-231a5a5d0bf5248caf1a9539ef29dd2b20a9d05d",
         "6785543406": "grpc-java-linux-x86_64-231a5a5d0bf5248caf1a9539ef29dd2b20a9d05d",
         "1277521710": "infra/kernel/tools/atop/build/atop-static.tar.gz",
         "1277521710": "infra/kernel/tools/atop/build/atop-static.tar.gz",
         "1812152858": "junk/zubchick/buf/buf for linux",
         "1812152858": "junk/zubchick/buf/buf for linux",
+        "6639202855": "kotlin_kompiler_1.9.24 with plugins",
+        "4758626187": "ktlint for darwin (0.50.0)",
+        "4758626560": "ktlint for darwin-arm64 (0.50.0)",
+        "4758626176": "ktlint for linux (0.50.0)",
+        "4758626361": "ktlint for windows (0.50.0)",
         "289381370": "none-none-none-jsr305-3.0.2-sources.jar",
         "289381370": "none-none-none-jsr305-3.0.2-sources.jar",
         "289382642": "none-none-none-jsr305-3.0.2.jar",
         "289382642": "none-none-none-jsr305-3.0.2.jar",
         "5776380974": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
         "5776380974": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
@@ -1585,6 +1621,8 @@
         "3050798466": "openjdk 11.0.15 vanilla for darwin-arm64",
         "3050798466": "openjdk 11.0.15 vanilla for darwin-arm64",
         "3064614561": "openjdk 11.0.15 vanilla for linux",
         "3064614561": "openjdk 11.0.15 vanilla for linux",
         "3166999959": "openjdk 11.0.15 vanilla for windows",
         "3166999959": "openjdk 11.0.15 vanilla for windows",
+        "65627450": "org.jetbrains-annotations-13.0-sources.jar",
+        "65627451": "org.jetbrains-annotations-13.0.jar",
         "5631222854": "python3 for darwin",
         "5631222854": "python3 for darwin",
         "5631220729": "python3 for darwin-arm64",
         "5631220729": "python3 for darwin-arm64",
         "5631255103": "python3 for linux",
         "5631255103": "python3 for linux",

+ 5 - 5
build/platform/test_tool/host.ya.make.inc

@@ -1,12 +1,12 @@
 IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
 IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000557899)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017111540)
 ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
 ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000557002)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017110488)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000559763)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017113894)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000556408)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017109514)
 ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
 ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000558863)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017112393)
 
 
 ENDIF()
 ENDIF()

+ 5 - 5
build/platform/test_tool/host_os.ya.make.inc

@@ -1,12 +1,12 @@
 IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
 IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000555716)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017101072)
 ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
 ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000555346)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017100230)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000556602)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017102934)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000554860)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017099535)
 ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
 ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7000556186)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7017102008)
 
 
 ENDIF()
 ENDIF()

+ 61 - 0
build/ya.conf.json

@@ -254,6 +254,22 @@
             },
             },
             "formula": "build/platform/java/jdk/jdk17/jdk.json"
             "formula": "build/platform/java/jdk/jdk17/jdk.json"
         },
         },
+        "ktlint_bundle": {
+            "executable": {
+                "ktlint": [
+                    "run.bat"
+                ]
+            },
+            "formula": "build/platform/java/ktlint/ktlint.json"
+        },
+        "ktlint_old_bundle": {
+            "executable": {
+                "ktlint_old": [
+                    "run.bat"
+                ]
+            },
+            "formula": "build/platform/java/ktlint_old/ktlint.json"
+        },
         "python": {
         "python": {
             "executable": {
             "executable": {
                 "python": [
                 "python": [
@@ -1882,6 +1898,45 @@
                 }
                 }
             }
             }
         },
         },
+        "ktlint_bundle": {
+            "platforms": [
+                {
+                    "default": true,
+                    "host": {
+                        "os": "LINUX"
+                    }
+                },
+                {
+                    "default": true,
+                    "host": {
+                        "os": "WIN"
+                    }
+                },
+                {
+                    "default": true,
+                    "host": {
+                        "os": "DARWIN"
+                    }
+                },
+                {
+                    "default": true,
+                    "host": {
+                        "arch": "arm64",
+                        "os": "DARWIN"
+                    }
+                }
+            ],
+            "tools": {
+                "ktlint": {
+                    "bottle": "ktlint_bundle",
+                    "executable": "ktlint"
+                },
+                "ktlint_old": {
+                    "bottle": "ktlint_old_bundle",
+                    "executable": "ktlint_old"
+                }
+            }
+        },
         "python": {
         "python": {
             "platforms": [
             "platforms": [
                 {
                 {
@@ -2153,6 +2208,12 @@
         "javac17": {
         "javac17": {
             "description": "Run javac 17"
             "description": "Run javac 17"
         },
         },
+        "ktlint": {
+            "description": "Run kotlin styler"
+        },
+        "ktlint_old": {
+            "description": "Run old kotlin styler"
+        },
         "llvm-cov": {
         "llvm-cov": {
             "description": "Run llvm-cov Clang utility"
             "description": "Run llvm-cov Clang utility"
         },
         },

+ 0 - 1
contrib/libs/clang16/lib/Format/NamespaceEndCommentsFixer.cpp

@@ -142,7 +142,6 @@ std::string computeName(const FormatToken *NamespaceTok) {
 std::string computeEndCommentText(StringRef NamespaceName, bool AddNewline,
 std::string computeEndCommentText(StringRef NamespaceName, bool AddNewline,
                                   const FormatToken *NamespaceTok,
                                   const FormatToken *NamespaceTok,
                                   unsigned SpacesToAdd) {
                                   unsigned SpacesToAdd) {
-  return "";
   std::string text = "//";
   std::string text = "//";
   text.append(SpacesToAdd, ' ');
   text.append(SpacesToAdd, ' ');
   text += NamespaceTok->TokenText;
   text += NamespaceTok->TokenText;

Some files were not shown because too many files changed in this diff