Skip to content

Commit 5b71937

Browse files
committed
Merge branch 'rightlib' into merge-libs-250117-0020
2 parents 32f057a + 2f3fd95 commit 5b71937

File tree

267 files changed

+29230
-2074
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+29230
-2074
lines changed

build/conf/autoincludes.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[
2+
"devtools/ya",
23
"library/cpp/geo",
34
"util"
45
]

build/conf/java.conf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -831,15 +831,18 @@ MAVEN_EXPORT_CMD=
831831
JAVA_COVERAGE_SRCLIST_FLAG=--coverage ${output;pre=${MODULE_PREFIX};suf=.cpsf:REALPRJNAME} --source-root ${ARCADIA_ROOT}
832832
JAVA_COVERAGE_SRCLIST=
833833
PREPARE_JAVA_BUILD_DIRS=$FS_TOOLS md ${BINDIR}/cls && $FS_TOOLS md ${BINDIR}/misc
834-
EXTRACT_GENDIRS=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/autotar_gendirs.py"} --unpack --ext .gentar ${ext=.gentar:AUTO_INPUT}
835-
COLLECT_JAVA_SRCLIST=${YMAKE_PYTHON} ${input:"build/scripts/make_java_srclists.py"} ${hide;input:"build/scripts/process_command_files.py"} ${hide;input:"build/scripts/java_pack_to_file.py"} --moddir ${CURDIR} --java ${BINDIR}/all-java.srclst ${KT_SRSCLIST} ${JAVA_COVERAGE_SRCLIST} --ya-start-command-file ${ALL_JAR_SOURCES} ${ext=.java:AUTO_INPUT} ${ext=.kt:AUTO_INPUT} --ya-end-command-file
834+
COLLECT_JAVA_SRCLIST=${YMAKE_PYTHON} ${input:"build/scripts/make_java_srclists.py"} \
835+
--moddir ${CURDIR} --java ${BINDIR}/all-java.srclst ${KT_SRSCLIST} ${JAVA_COVERAGE_SRCLIST} \
836+
--ya-start-command-file ${ext=.gentar:AUTO_INPUT} ${ALL_JAR_SOURCES} ${ext=.java:AUTO_INPUT} ${ext=.kt:AUTO_INPUT} --ya-end-command-file \
837+
${hide;input:"build/scripts/process_command_files.py"} \
838+
${hide;input:"build/scripts/java_pack_to_file.py"} \
839+
${hide;input:"build/scripts/autotar_gendirs.py"}
836840
COLLECT_CLASSPATH=${WRITER_PY} --file ${BINDIR}/bfg.txt -m --ya-start-command-file ${rootrel:MANAGED_PEERS_CLOSURE} $KT_CLASSPATH_ITEM --ya-end-command-file
837841
LINK_CLASSPATH=${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"} ${BINDIR}/bfg.txt ${ARCADIA_BUILD_ROOT}/bfg.jar
838842
COMPILE_JAVA_SRCLIST=$_JAVAC_RUN_HELPER($JAVAC_CMD)
839843
PACK_JAR=$_PACK_JAR_HELPER($TARGET)
840844
LINK_JAR=${hide:JAVA_FAKEID} ${hide;kv:"p JV"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"} ${hide;requirements:"cpu:2"} \
841845
&& $PREPARE_JAVA_BUILD_DIRS \
842-
&& $EXTRACT_GENDIRS \
843846
&& $COLLECT_JAVA_SRCLIST \
844847
&& $JAR_GEN_SRCS \
845848
&& $ALL_KT_COMMANDS \

build/mapping.conf.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,7 @@
948948
"6957908969": "https://devtools-registry.s3.yandex.net/6957908969",
949949
"7101981380": "https://devtools-registry.s3.yandex.net/7101981380",
950950
"7552080809": "https://devtools-registry.s3.yandex.net/7552080809",
951+
"7833244075": "https://devtools-registry.s3.yandex.net/7833244075",
951952
"5776379446": "https://devtools-registry.s3.yandex.net/5776379446",
952953
"5777100597": "https://devtools-registry.s3.yandex.net/5777100597",
953954
"5909067709": "https://devtools-registry.s3.yandex.net/5909067709",
@@ -960,6 +961,7 @@
960961
"6957906780": "https://devtools-registry.s3.yandex.net/6957906780",
961962
"7101978818": "https://devtools-registry.s3.yandex.net/7101978818",
962963
"7552077729": "https://devtools-registry.s3.yandex.net/7552077729",
964+
"7833241952": "https://devtools-registry.s3.yandex.net/7833241952",
963965
"5776375952": "https://devtools-registry.s3.yandex.net/5776375952",
964966
"5777098178": "https://devtools-registry.s3.yandex.net/5777098178",
965967
"5909065014": "https://devtools-registry.s3.yandex.net/5909065014",
@@ -972,6 +974,7 @@
972974
"6957901545": "https://devtools-registry.s3.yandex.net/6957901545",
973975
"7101973818": "https://devtools-registry.s3.yandex.net/7101973818",
974976
"7552072726": "https://devtools-registry.s3.yandex.net/7552072726",
977+
"7833238161": "https://devtools-registry.s3.yandex.net/7833238161",
975978
"5776374505": "https://devtools-registry.s3.yandex.net/5776374505",
976979
"5777096988": "https://devtools-registry.s3.yandex.net/5777096988",
977980
"5909063641": "https://devtools-registry.s3.yandex.net/5909063641",
@@ -984,6 +987,7 @@
984987
"6957899481": "https://devtools-registry.s3.yandex.net/6957899481",
985988
"7101971416": "https://devtools-registry.s3.yandex.net/7101971416",
986989
"7552070388": "https://devtools-registry.s3.yandex.net/7552070388",
990+
"7833236145": "https://devtools-registry.s3.yandex.net/7833236145",
987991
"5776377955": "https://devtools-registry.s3.yandex.net/5776377955",
988992
"5777099502": "https://devtools-registry.s3.yandex.net/5777099502",
989993
"5909066324": "https://devtools-registry.s3.yandex.net/5909066324",
@@ -996,6 +1000,7 @@
9961000
"6957903888": "https://devtools-registry.s3.yandex.net/6957903888",
9971001
"7101976574": "https://devtools-registry.s3.yandex.net/7101976574",
9981002
"7552075245": "https://devtools-registry.s3.yandex.net/7552075245",
1003+
"7833240023": "https://devtools-registry.s3.yandex.net/7833240023",
9991004
"6391354461": "https://devtools-registry.s3.yandex.net/6391354461",
10001005
"7805449010": "https://devtools-registry.s3.yandex.net/7805449010",
10011006
"6990868751": "https://devtools-registry.s3.yandex.net/6990868751",
@@ -1149,14 +1154,19 @@
11491154
"7407150115": "https://devtools-registry.s3.yandex.net/7407150115",
11501155
"7599422144": "https://devtools-registry.s3.yandex.net/7599422144",
11511156
"7451406900": "https://devtools-registry.s3.yandex.net/7451406900",
1157+
"7831958167": "https://devtools-registry.s3.yandex.net/7831958167",
11521158
"7662667352": "https://devtools-registry.s3.yandex.net/7662667352",
11531159
"7494722271": "https://devtools-registry.s3.yandex.net/7494722271",
1160+
"7831990717": "https://devtools-registry.s3.yandex.net/7831990717",
11541161
"7662737728": "https://devtools-registry.s3.yandex.net/7662737728",
11551162
"7494597813": "https://devtools-registry.s3.yandex.net/7494597813",
1163+
"7831996261": "https://devtools-registry.s3.yandex.net/7831996261",
11561164
"7662702843": "https://devtools-registry.s3.yandex.net/7662702843",
11571165
"7495431598": "https://devtools-registry.s3.yandex.net/7495431598",
1166+
"7832045657": "https://devtools-registry.s3.yandex.net/7832045657",
11581167
"7663105272": "https://devtools-registry.s3.yandex.net/7663105272",
11591168
"7495332394": "https://devtools-registry.s3.yandex.net/7495332394",
1169+
"7832062717": "https://devtools-registry.s3.yandex.net/7832062717",
11601170
"7663137240": "https://devtools-registry.s3.yandex.net/7663137240",
11611171
"7495957585": "https://devtools-registry.s3.yandex.net/7495957585",
11621172
"6048579718": "https://devtools-registry.s3.yandex.net/6048579718",
@@ -2113,6 +2123,7 @@
21132123
"6957908969": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
21142124
"7101981380": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
21152125
"7552080809": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
2126+
"7833244075": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
21162127
"5776379446": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
21172128
"5777100597": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
21182129
"5909067709": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
@@ -2125,6 +2136,7 @@
21252136
"6957906780": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
21262137
"7101978818": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
21272138
"7552077729": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
2139+
"7833241952": "none-none-none-result_resources/jdk-darwin-x86_64.yandex.tgz",
21282140
"5776375952": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
21292141
"5777098178": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
21302142
"5909065014": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
@@ -2137,6 +2149,7 @@
21372149
"6957901545": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
21382150
"7101973818": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
21392151
"7552072726": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
2152+
"7833238161": "none-none-none-result_resources/jdk-linux-aarch64.yandex.tgz",
21402153
"5776374505": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
21412154
"5777096988": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
21422155
"5909063641": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
@@ -2149,6 +2162,7 @@
21492162
"6957899481": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
21502163
"7101971416": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
21512164
"7552070388": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
2165+
"7833236145": "none-none-none-result_resources/jdk-linux-x86_64.yandex.tgz",
21522166
"5776377955": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
21532167
"5777099502": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
21542168
"5909066324": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
@@ -2161,6 +2175,7 @@
21612175
"6957903888": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
21622176
"7101976574": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
21632177
"7552075245": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
2178+
"7833240023": "none-none-none-result_resources/jdk-windows-amd64.yandex.tgz",
21642179
"6391354461": "none-none-none-result_resources/protoc-linux-x86_64.tgz",
21652180
"7805449010": "none-none-none-result_resources/protoc-linux-x86_64.tgz",
21662181
"6990868751": "none-none-none-sandbox/backup/3527d100-e2d0-4b0e-bb7a-905010853d98/yfm-docs.tar",
@@ -2314,14 +2329,19 @@
23142329
"7407150115": "ynd-clang-18-optimized-mingw-w64-x86_64-56872a411472c7ec2b09f2c8372ea4c67d069a5b",
23152330
"7599422144": "ynd-clang-18-optimized-mingw-w64-x86_64-c40775195488adad9218aa6c6dcaf4c20dca0084",
23162331
"7451406900": "ynd-clang-18-optimized-mingw-w64-x86_64-c66062833fd14752a7ad8fbfb8f25f370b097278",
2332+
"7831958167": "ynd-clang-format-18-darwin-arm64-3ac3b151b06039ed3a36becac566665d5fafefa4",
23172333
"7662667352": "ynd-clang-format-18-darwin-arm64-809bd279d61c38bc40e133d3013ac46e8c4049b7",
23182334
"7494722271": "ynd-clang-format-18-darwin-arm64-d0b9255e235e80974f9dfd0ebff3850929bed981",
2335+
"7831990717": "ynd-clang-format-18-darwin-x86_64-3ac3b151b06039ed3a36becac566665d5fafefa4",
23192336
"7662737728": "ynd-clang-format-18-darwin-x86_64-809bd279d61c38bc40e133d3013ac46e8c4049b7",
23202337
"7494597813": "ynd-clang-format-18-darwin-x86_64-d0b9255e235e80974f9dfd0ebff3850929bed981",
2338+
"7831996261": "ynd-clang-format-18-linux-aarch64-3ac3b151b06039ed3a36becac566665d5fafefa4",
23212339
"7662702843": "ynd-clang-format-18-linux-aarch64-809bd279d61c38bc40e133d3013ac46e8c4049b7",
23222340
"7495431598": "ynd-clang-format-18-linux-aarch64-d0b9255e235e80974f9dfd0ebff3850929bed981",
2341+
"7832045657": "ynd-clang-format-18-linux-x86_64-3ac3b151b06039ed3a36becac566665d5fafefa4",
23232342
"7663105272": "ynd-clang-format-18-linux-x86_64-809bd279d61c38bc40e133d3013ac46e8c4049b7",
23242343
"7495332394": "ynd-clang-format-18-linux-x86_64-d0b9255e235e80974f9dfd0ebff3850929bed981",
2344+
"7832062717": "ynd-clang-format-18-mingw-w64-x86_64-3ac3b151b06039ed3a36becac566665d5fafefa4",
23252345
"7663137240": "ynd-clang-format-18-mingw-w64-x86_64-809bd279d61c38bc40e133d3013ac46e8c4049b7",
23262346
"7495957585": "ynd-clang-format-18-mingw-w64-x86_64-d0b9255e235e80974f9dfd0ebff3850929bed981",
23272347
"6048579718": "yt/go/ytrecipe/cmd/ytexec for linux",
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"by_platform": {
33
"darwin-arm64": {
4-
"uri": "sbr:6936092311"
4+
"uri": "sbr:7833244075"
55
},
66
"darwin-x86_64": {
7-
"uri": "sbr:6936091858"
7+
"uri": "sbr:7833241952"
88
},
99
"linux-x86_64": {
10-
"uri": "sbr:6936090488"
10+
"uri": "sbr:7833236145"
1111
},
1212
"linux-aarch64": {
13-
"uri": "sbr:6936090996"
13+
"uri": "sbr:7833238161"
1414
},
1515
"win32-x86_64": {
16-
"uri": "sbr:6936091456"
16+
"uri": "sbr:7833240023"
1717
}
1818
}
1919
}

build/plugins/pybuild.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from _common import stripext, rootrel_arc_src, listid, pathid, lazy, get_no_lint_value, ugly_conftest_exception
99

1010

11-
YA_IDE_VENV_VAR = 'YA_IDE_VENV'
1211
PY_NAMESPACE_PREFIX = 'py/namespace'
1312
BUILTIN_PROTO = 'builtin_proto'
1413
DEFAULT_FLAKE8_FILE_PROCESSING_TIME = "1.5" # in seconds
@@ -37,8 +36,8 @@ def is_extended_source_search_enabled(path, unit):
3736
return False
3837
if unit.get('NO_EXTENDED_SOURCE_SEARCH') == 'yes':
3938
return False
40-
# contrib is unfriendly to extended source search
41-
if unit.resolve_arc_path(path).startswith('$S/contrib/'):
39+
# Python itself and contrib/python are unfriendly to extended source search
40+
if unit.resolve_arc_path(path).startswith(('$S/contrib/python', '$S/contrib/tools/python3')):
4241
return False
4342
return True
4443

@@ -252,7 +251,7 @@ def onpy_srcs(unit, *args):
252251
with_py = not unit.get('PYBUILD_NO_PY')
253252
with_pyc = not unit.get('PYBUILD_NO_PYC')
254253
in_proto_library = unit.get('PY_PROTO') or unit.get('PY3_PROTO')
255-
venv = unit.get(YA_IDE_VENV_VAR)
254+
external_py_files_mode = unit.get('EXTERNAL_PY_FILES') or unit.get('YA_IDE_VENV')
256255
need_gazetteer_peerdir = False
257256
trim = 0
258257

@@ -542,10 +541,21 @@ def process_pyx(filename, path, out_suffix, with_ext):
542541
if py3:
543542
mod_list_md5 = md5()
544543
compress = False
544+
resfs_mocks = []
545+
545546
for path, mod in pys:
546547
mod_list_md5.update(six.ensure_binary(mod))
547-
if not (venv and is_extended_source_search_enabled(path, unit)):
548-
dest = 'py/' + mod.replace('.', '/') + '.py'
548+
dest = 'py/' + mod.replace('.', '/') + '.py'
549+
# In external_py_files mode we want to build python binaries without embedded python files.
550+
# The application will still be able to load them from the file system.
551+
# However, the import hook still needs meta information about the file locations to work correctly.
552+
# That's why we manually register the files in resfs/src/resfs/file, but don't provide any actual files.
553+
# For more info see:
554+
# - library/python/runtime_py3
555+
# - https://docs.yandex-team.ru/ya-make/manual/python/vars
556+
if external_py_files_mode and is_extended_source_search_enabled(path, unit):
557+
resfs_mocks += ['-', 'resfs/src/resfs/file/' + dest + '=' + rootrel_arc_src(path, unit)]
558+
else:
549559
if with_py:
550560
res += ['DEST', dest, path]
551561
if with_pyc:
@@ -556,6 +566,9 @@ def process_pyx(filename, path, out_suffix, with_ext):
556566
if not compress and ugly_conftest_exception(path):
557567
compress = True
558568

569+
if resfs_mocks:
570+
unit.onresource(['DONT_COMPRESS'] + resfs_mocks)
571+
559572
if py_namespaces:
560573
# Note: Add md5 to key to prevent key collision if two or more PY_SRCS() used in the same ya.make
561574
ns_res = ['DONT_COMPRESS']

build/plugins/ytest.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,13 +790,21 @@ def onadd_check_py_imports(fields, unit, *args):
790790
if unit.get("TIDY") == "yes":
791791
# graph changed for clang_tidy tests
792792
return
793+
793794
if unit.get('NO_CHECK_IMPORTS_FOR_VALUE').strip() == "":
794795
return
796+
795797
unit.onpeerdir(['library/python/testing/import_test'])
796798

797799
dart_record = create_dart_record(fields, unit, (), {})
798800
dart_record[df.TestName.KEY] = 'pyimports'
799801
dart_record[df.ScriptRelPath.KEY] = 'py.imports'
802+
# Import tests work correctly in this mode, but can slow down by 2-3 times,
803+
# due to the fact that files need to be read from the file system.
804+
# Therefore, we disable them, since the external-py-files mode is designed exclusively
805+
# to speed up the short cycle of developing regular tests.
806+
if unit.get('EXTERNAL_PY_FILES'):
807+
dart_record[df.SkipTest.KEY] = 'Import tests disabled in external-py-files mode'
800808

801809
data = dump_test(unit, dart_record)
802810
if data:

0 commit comments

Comments
 (0)