diff options
44 files changed, 481 insertions, 284 deletions
diff --git a/build/conf/compilers/gnu_compiler.conf b/build/conf/compilers/gnu_compiler.conf index 56bc94fdd2a..1ffdb6a702c 100644 --- a/build/conf/compilers/gnu_compiler.conf +++ b/build/conf/compilers/gnu_compiler.conf @@ -73,7 +73,7 @@ when ($CLANG16 == "yes") { when ($CLANG18 == "yes") { CFLAGS+=-Wno-array-parameter -Wno-deprecate-lax-vec-conv-all -Wno-unqualified-std-cast-call -Wno-unused-but-set-parameter -Wno-implicit-function-declaration -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-address-of-packed-member - CFLAGS+=-Wno-deprecated-this-capture -Wno-c++11-narrowing-const-reference -Wno-missing-field-initializers \ + CFLAGS+=-Wno-deprecated-this-capture -Wno-c++11-narrowing-const-reference -Wno-missing-designated-field-initializers \ -Wno-packed-non-pod -Wno-format -Wno-vla-cxx-extension -Wno-invalid-offsetof \ -Wno-include-angled-in-module-purview -Wno-unused-parameter when ($MAPSMOBI_BUILD_TARGET == "yes") { diff --git a/build/conf/java.conf b/build/conf/java.conf index 6744e2abea2..668897fc0c1 100644 --- a/build/conf/java.conf +++ b/build/conf/java.conf @@ -17,11 +17,9 @@ macro ACCELEO(XSD{input}[], MTL{input}[], MTL_ROOT="${MODDIR}", LANG{input}[], O ### ### Documentation: https://wiki.yandex-team.ru/yatool/java/ module JAVA_LIBRARY: JAR_LIBRARY { - .SEM=BUILD_JAR_SEM + .SEM=_BUILD_JAR_SEM } -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 @@ -57,7 +55,7 @@ module _JAR_PROGRAM_COMPILATION: JAR_LIBRARY { multimodule JAVA_PROGRAM { module JAR_RUNNABLE: _JAR_RUNNABLE { .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE - .SEM=PROGRAM_AND_TESTS_CP_COLLECTING_NODES_SEM + .SEM=_SEM_IGNORED # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle: # * A -> B -> C -> lib-v1.4 # | |-> DM(lib-v1.1) @@ -72,7 +70,7 @@ multimodule JAVA_PROGRAM { SET(MODULE_TYPE JAVA_PROGRAM) } module JAR_COMPILATION: _JAR_PROGRAM_COMPILATION { - .SEM=BUILD_JAR_SEM + .SEM=_BUILD_JAR_SEM SET(MODULE_TYPE JAVA_PROGRAM) } } @@ -88,7 +86,7 @@ macro AUTO_SERVICE(Ver) { PEERDIR(contrib/java/com/google/auto/service/auto-service-annotations/${Ver}) } -_BUILD_JAVA_ANNOTATION_PROCESSOR_SEM=$BUILD_JAR_SEM +_BUILD_JAVA_ANNOTATION_PROCESSOR_SEM=$_BUILD_JAR_SEM ### @usage: JAVA_ANNOTATION_PROCESSOR() ### @@ -99,7 +97,7 @@ _BUILD_JAVA_ANNOTATION_PROCESSOR_SEM=$BUILD_JAR_SEM multimodule JAVA_ANNOTATION_PROCESSOR { module JAR_RUNNABLE: _JAR_RUNNABLE { .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE - .SEM=PROGRAM_AND_TESTS_CP_COLLECTING_NODES_SEM + .SEM=_SEM_IGNORED .IGNORED=RUN_JAVA_PROGRAM PROVIDES FEATURE_VERSION .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE .PEERDIRSELF=JAR_COMPILATION @@ -146,7 +144,7 @@ macro JUNIT_TESTS_JAR(Dir, Jar) { SET(UNITTEST_MOD $Dir/$Jar) } -BUILD_JUNIT5_JAR_SEM=$BUILD_JAR_SEM && junit5_test +_BUILD_JUNIT5_JAR_SEM=$_BUILD_JAR_SEM && junit5_test multimodule JUNIT5 { # ATTENTION ya ide idea relies on this submodule name to find scope of `ya make` build before project generation @@ -162,7 +160,7 @@ multimodule JUNIT5 { .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION PROVIDES FEATURE_VERSION .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE .PEERDIRSELF=JAR_COMPILATION - .SEM=PROGRAM_AND_TESTS_CP_COLLECTING_NODES_SEM + .SEM=_SEM_IGNORED PEERDIR(devtools/jtest-annotations/junit5) @@ -173,7 +171,7 @@ multimodule JUNIT5 { .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO .FINAL_TARGET=no .DEFAULT_NAME_GENERATOR=FullPath - .SEM=BUILD_JUNIT5_JAR_SEM + .SEM=_BUILD_JUNIT5_JAR_SEM .IGNORED=JUNIT_TESTS_JAR PEERDIR+=devtools/junit5-runner @@ -202,7 +200,7 @@ multimodule JUNIT5 { } } -BUILD_JUNIT4_JAR_SEM=$BUILD_JAR_SEM && junit4_test +_BUILD_JUNIT4_JAR_SEM=$_BUILD_JAR_SEM && junit4_test multimodule JTEST { # ATTENTION ya ide idea relies on this submodule name to find scope of `ya make` build before project generation @@ -218,7 +216,7 @@ multimodule JTEST { .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION PROVIDES FEATURE_VERSION .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE .PEERDIRSELF=JAR_COMPILATION - .SEM=PROGRAM_AND_TESTS_CP_COLLECTING_NODES_SEM + .SEM=_SEM_IGNORED SET(MODULE_TYPE JTEST) PEERDIR(devtools/junit-runner devtools/jtest-annotations/junit4) @@ -229,7 +227,7 @@ multimodule JTEST { .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO .FINAL_TARGET=no .DEFAULT_NAME_GENERATOR=FullPath - .SEM=BUILD_JUNIT4_JAR_SEM + .SEM=_BUILD_JUNIT4_JAR_SEM .IGNORED=JUNIT_TESTS_JAR SET(MODULE_TYPE JTEST) @@ -273,7 +271,7 @@ multimodule JTEST_FOR { .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE .RESTRICTED=JUNIT_TESTS_JAR .PEERDIRSELF=JAR_COMPILATION - .SEM=PROGRAM_AND_TESTS_CP_COLLECTING_NODES_SEM + .SEM=_SEM_IGNORED SET(MODULE_TYPE JTEST_FOR) PEERDIR(${UNITTEST_DIR} devtools/junit-runner) @@ -284,7 +282,7 @@ multimodule JTEST_FOR { .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO .FINAL_TARGET=no .DEFAULT_NAME_GENERATOR=FullPath - .SEM=BUILD_JUNIT4_JAR_SEM + .SEM=_BUILD_JUNIT4_JAR_SEM .RESTRICTED=JUNIT_TESTS_JAR SET(MODULE_TYPE JTEST_FOR) @@ -297,7 +295,7 @@ multimodule JAVA_CONTRIB_PROGRAM { module JAR_RUNNABLE: _JAR_RUNNABLE { .IGNORED=JAVA_SRCS RUN_JAR_PROGRAM RUN_JAVA_PROGRAM JAR_RESOURCE SRC_RESOURCE LOCAL_JAR .PEERDIRSELF=JAR_COMPILATION - .SEM=IGNORED + .SEM=_SEM_IGNORED SET(MODULE_TYPE JAVA_PROGRAM) ENABLE(DISABLE_SCRIPTGEN) @@ -305,7 +303,9 @@ multimodule JAVA_CONTRIB_PROGRAM { module JAR_COMPILATION: JAVA_CONTRIB { .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO .FINAL_TARGET=no - .SEM=BUILD_JAR_SEM + .SEM=_BUILD_JAR_SEM + + SET(MODULE_TYPE JAVA_PROGRAM) } } @@ -343,7 +343,7 @@ module EXTERNAL_JAVA_LIBRARY: _BASE_UNIT { # TODO(YMAKE-27) all contribs involved into opensource export must be JAVA_CONTRIB modules # and this module must not be intended for export. Such hange will break JBUILD and thus is # blocked on YMAKE-27 - .SEM=JAVA_CONTRIB_SEM + .SEM=_JAVA_CONTRIB_SEM .PEERDIR_POLICY=as_build_from .FINAL_TARGET=no .ALIASES=SRCS=_SRCS_NO_GLOBAL @@ -403,7 +403,7 @@ macro _JAVA_SRCS(RESOURCES?"yes":"no", SRCDIR=".", PACKAGE_PREFIX="", EXCLUDE[], SET(VAR_SALT $SRCDIR $Globs $EXCLUDE $PACKAGE_PREFIX $RESOURCES $FILES) SET(JAR_SRCS_GLOB uniq_${hash:VAR_SALT}) _LATE_GLOB(${JAR_SRCS_GLOB} ${pre=${SRCDIR}/:Globs} EXCLUDE ${EXCLUDE}) - SET_APPEND(LINT_JAVA_SOURCES \${input;rootrel;ext=.java:${JAR_SRCS_GLOB}}) + SET_APPEND(LINT_JAVA_SOURCES \${rootrel;input;ext=.java:${JAR_SRCS_GLOB}}) SET_APPEND(ALL_JAR_SOURCES --jsources ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.src.txt --resources ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.res.txt --srcdir ${quo:SRCDIR} \${input:${JAR_SRCS_GLOB}} ${pre=\$\{input\:\";suf=\"\}:FILES}) _FILL_JAR_COPY_RESOURCES_CMD(LINK_JAR_RESOURCES ${quo:SRCDIR} ${BINDIR}/cls ${PACKAGE_PREFIX} ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.res.txt) _FILL_JAR_COPY_RESOURCES_CMD(LINK_JAR_JSOURCES ${quo:SRCDIR} ${BINDIR}/src ${PACKAGE_PREFIX} ${BINDIR}/misc/${tolower:JAR_SRCS_GLOB}.src.txt) @@ -552,6 +552,8 @@ module _JAR_BASE: _BARE_UNIT { .ALLOWED=EMBED_JAVA_VCS_INFO DEPENDENCY_MANAGEMENT EXCLUDE .DEFAULT_NAME_GENERATOR=TwoDirNames .RESTRICTED=WITH_JDK RESOURCE RESOURCE_FILES + # TODO: GENERAGTE_SCRIPT have nothing to do outside of JAVA_PROGRAM runable submodule it must be RESTRICTED rather then IGNORED + .IGNORED=GENERATE_SCRIPT SET(MODULE_TAG JAVA) @@ -571,10 +573,9 @@ module _JAR_BASE: _BARE_UNIT { _WHEN_EXPORT_GRADLE() } -JAVA_CONTRIB_PROXY_SEM=IGNORED # tag:java-specific module JAVA_CONTRIB_PROXY: _JAR_BASE { - .SEM=JAVA_CONTRIB_PROXY_SEM + .SEM=_SEM_IGNORED .VERSION_PROXY=yes _DONT_REQUIRE_LICENSE() @@ -583,7 +584,7 @@ module JAVA_CONTRIB_PROXY: _JAR_BASE { # tag:java-specific macro _FETCH_CONTRIB(Id, Out, SBR="sbr:") { - .CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$SBR:Id} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_sandbox.py"} --resource-file $(RESOURCE_ROOT)/sbr/$Id/resource --resource-id $Id --copy-to ${output:Out} ${hide;input:"build/scripts/fetch_from.py"} ${requirements;hide:"network:full"} ${hide;kv:"p SB"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} + .CMD=${hide:SANDBOX_FAKEID} ${cwd:BINDIR} ${resource;pre=$SBR:Id} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_sandbox.py"} --resource-file $(RESOURCE_ROOT)/sbr/$Id/resource --resource-id $Id --copy-to ${output:Out} ${hide;input:"build/scripts/fetch_from.py"} ${hide;requirements:"network:full"} ${hide;kv:"p SB"} ${hide;kv:"pc yellow"} ${hide;kv:"show_out"} ADD_CHECK(check.resource $Id) } @@ -616,7 +617,7 @@ macro LOCAL_SOURCES_JAR(File) { SET(LOCAL_SOURCES_JAR_PATH $File) } -JAVA_CONTRIB_SEM= \ +_JAVA_CONTRIB_SEM= \ ${hide:TARGET} ${hide:AUTO_INPUT} \ consumer-classpath $EXPORT_GRADLE_CLASSPATH \ && consumer-jar ${MODDIR}/${REALPRJNAME}.jar \ @@ -628,7 +629,7 @@ JAVA_CONTRIB_SEM= \ module JAVA_CONTRIB: _JAR_BASE { .CMD=FETCH_CONTRIB_JAR .PEERDIR_POLICY=as_include - .SEM=JAVA_CONTRIB_SEM + .SEM=_JAVA_CONTRIB_SEM .FINAL_TARGET=yes .GLOBAL=MAVEN_EXPORT_COORDS @@ -742,7 +743,11 @@ when ($BUILD_TYPE == "DEBUG" && $NO_DEBUGINFO != "yes") { SOURCES_JAR=yes } -_PACK_SRC_JAR_IMPL=&& $FS_TOOLS md ${BINDIR}/src $JAR_GEN_JSRCS $LINK_JAR_JSOURCES && ${cwd;suf=/src:BINDIR} $JDK_RESOURCE/bin/jar cfvm ${output;pre=${BINDIR}/${MODULE_PREFIX};suf=-sources.jar:REALPRJNAME} $VCS_JAVA . +_PACK_SRC_JAR_IMPL=\ +&& $FS_TOOLS md ${BINDIR}/src \ +&& $JAR_GEN_JSRCS \ +&& $LINK_JAR_JSOURCES \ +&& ${cwd;suf=/src:BINDIR} $JDK_RESOURCE/bin/jar cfvm ${output;pre=${BINDIR}/${MODULE_PREFIX};suf=-sources.jar:REALPRJNAME} $VCS_JAVA . _PACK_SRC_JAR= # tag:java-specific @@ -755,7 +760,7 @@ _MAKE_JSTYLE_FILE_LIST= # tag:java-specific _LINK_UBERJAR= _UBERJAR_SELF= -_DO_LINK_UBERJAR= && $JDK_RESOURCE/bin/java -cp $UBERJAR_RESOURCE/devtools-java_shader.jar ru.yandex.devtools.emigrante.Main --out-jar $TARGET $_UBERJAR_SELF ${ext=.jar;pre=--jar :MANAGED_PEERS_CLOSURE} ${UBERJAR_PREFIX_FLAG} ${UBERJAR_HIDE_EXCLUDE_FLAGS} ${UBERJAR_HIDE_INCLUDE_FLAGS} $UBERJAR_PATH_EXCLUDES ${UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG} ${UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS} ${UBERJAR_APPENDING_TRANSFORMER_FLAGS} ${UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG} \ +_DO_LINK_UBERJAR= && $JDK_RESOURCE/bin/java -cp $UBERJAR_RESOURCE/devtools-java_shader.jar ru.yandex.devtools.emigrante.Main --out-jar $TARGET $_UBERJAR_SELF ${pre=--jar ;ext=.jar:MANAGED_PEERS_CLOSURE} ${UBERJAR_PREFIX_FLAG} ${UBERJAR_HIDE_EXCLUDE_FLAGS} ${UBERJAR_HIDE_INCLUDE_FLAGS} $UBERJAR_PATH_EXCLUDES ${UBERJAR_MANIFEST_TRANSFORMER_MAIN_FLAG} ${UBERJAR_MANIFEST_TRANSFORMER_ATTRIBUTE_FLAGS} ${UBERJAR_APPENDING_TRANSFORMER_FLAGS} ${UBERJAR_SERVICES_RESOURCE_TRANSFORMER_FLAG} \ && $YMAKE_PYTHON ${input:"build/scripts/mkdir.py"} $BINDIR/_empty/META-INF \ && $YMAKE_PYTHON ${input:"build/scripts/touch.py"} $BINDIR/_empty/META-INF/MANIFEST.MF \ && $UPDATE_VCS_JAVA_INFO_NODEP($TARGET) \ @@ -829,32 +834,31 @@ COLLECT_CLASSPATH=${WRITER_PY} --file ${BINDIR}/bfg.txt -m --ya-start-command-fi LINK_CLASSPATH=${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"} ${BINDIR}/bfg.txt ${ARCADIA_BUILD_ROOT}/bfg.jar COMPILE_JAVA_SRCLIST=$_JAVAC_RUN_HELPER($JAVAC_CMD) PACK_JAR=$_PACK_JAR_HELPER($TARGET) -# NOTE: No && before LINK_JAR_RESOURCES, ALL_KT_COMMANDS and JAR_GEN_SRCS needed since those vars either empty or starts with && -LINK_JAR=${hide:JAVA_FAKEID} ${hide;kv:"p JV"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"} ${requirements;hide:"cpu:2"} \ - $PREPARE_JAVA_BUILD_DIRS \ +LINK_JAR=${hide:JAVA_FAKEID} ${hide;kv:"p JV"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"} ${hide;requirements:"cpu:2"} \ + && $PREPARE_JAVA_BUILD_DIRS \ && $EXTRACT_GENDIRS \ && $COLLECT_JAVA_SRCLIST \ - $JAR_GEN_SRCS \ - $ALL_KT_COMMANDS \ + && $JAR_GEN_SRCS \ + && $ALL_KT_COMMANDS \ && $COLLECT_CLASSPATH \ && $LINK_CLASSPATH \ && $COMPILE_JAVA_SRCLIST \ - $LINK_JAR_RESOURCES \ + && $LINK_JAR_RESOURCES \ && ${cwd;suf=/cls:BINDIR} $GENERATE_VCS_JAVA_INFO_NODEP . \ - $_PACK_SRC_JAR \ - $_PACK_JNI \ + && $_PACK_SRC_JAR \ + && $_PACK_JNI \ && $PACK_JAR \ - $_DO_JAVA_YNDEXING \ - $_MAKE_JSTYLE_FILE_LIST \ - $_LINK_UBERJAR \ - $MAVEN_EXPORT_CMD \ - $_ADD_HIDDEN_INPUTS($JAVA_EXTERNAL_DEPENDENCIES_VALUE) + && $_DO_JAVA_YNDEXING \ + && $_MAKE_JSTYLE_FILE_LIST \ + && $_LINK_UBERJAR \ + && $MAVEN_EXPORT_CMD \ + && $_ADD_HIDDEN_INPUTS($JAVA_EXTERNAL_DEPENDENCIES_VALUE) # tag:java-specific _EXT_SRC_JAR= _EXT_JAR= _COPY_EXT_SRC_JAR= && $FS_TOOLS md ${BINDIR}/empty && ${cwd;suf=/empty:BINDIR} $JDK_RESOURCE/bin/jar cfvM ${output;pre=${BINDIR}/${MODULE_PREFIX};suf=-sources.jar:REALPRJNAME} . -_DO_USE_EXT_JAR=${hide:JAVA_FAKEID} $FS_TOOLS copy ${input:_EXT_JAR} $TARGET $_COPY_EXT_SRC_JAR $MAVEN_EXPORT_CMD +_DO_USE_EXT_JAR=${hide:JAVA_FAKEID} $FS_TOOLS copy ${input:_EXT_JAR} $TARGET && $_COPY_EXT_SRC_JAR && $MAVEN_EXPORT_CMD _DO_COPY_EXT_SRC_JAR= && $FS_TOOLS copy $_EXT_SRC_JAR ${output;pre=${BINDIR}/${MODULE_PREFIX};suf=-sources.jar:REALPRJNAME} macro JAVA_RESOURCE(JAR, SOURCES="") { SET(_EXT_SRC_JAR $SOURCES) @@ -976,7 +980,7 @@ _DO_GRADLE_EXPORT_PUBLISHING_SEM= \ && publish_group $MAVEN_EXPORT_GROUP_ID \ && publish_version $PUBLISH_MAVEN_VERSION -BUILD_JAR_SEM= \ +_BUILD_JAR_SEM= \ ${hide:TARGET} ${hide:AUTO_INPUT} ${hide:APPLIED_EXCLUDES} \ jar $MODDIR $REALPRJNAME \ && consumer-classpath $EXPORT_GRADLE_CLASSPATH \ @@ -1013,7 +1017,7 @@ BUILD_PROTO_JAR_SEM= \ module JAR_LIBRARY: _COMPILABLE_JAR_BASE { .EXTS=.jsrc .java .jar .mf .gentar .kt .CMD=LINK_JAR - .SEM=BUILD_JAR_SEM + .SEM=_BUILD_JAR_SEM .FINAL_TARGET=yes .ALIASES=JAVA_SRCS=FULL_JAVA_SRCS ANNOTATION_PROCESSOR=JAR_ANNOTATION_PROCESSOR .RESTRICTED=EXTERNAL_JAR @@ -1030,7 +1034,7 @@ module JAR_LIBRARY: _COMPILABLE_JAR_BASE { LINK_JAR=$_DO_USE_EXT_JAR } when ($OPENSOURCE_EXPORT == "no") { - BUILD_JAR_SEM=IGNORED + _BUILD_JAR_SEM=IGNORED } when ($_JAR_MAIN_CLASS) { _JAR_MAIN_SEM=$_ADD_JAR_MAIN_SEM @@ -1179,7 +1183,7 @@ module JAR_LIBRARY: _COMPILABLE_JAR_BASE { # tag:java-specific _SCRIPTGEN_FLAGS= macro _GEN_JAVA_SCRIPT_IMPL(Out, Template, Props...) { - .CMD=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:Out} --template ${input:Template} ${_SCRIPTGEN_FLAGS} -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${nopath;join;ext=.jar;pre="::":MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${MODDIR} -D JAR_BASENAME=${REALPRJNAME} -D MAIN_CLASS=${_JAR_MAIN_CLASS} -D ENABLE_PREVIEW_VALUE=${ENABLE_PREVIEW_VALUE} $Props + .CMD=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:Out} --template ${input:Template} ${_SCRIPTGEN_FLAGS} -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${join;pre="::";nopath;ext=.jar:MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${MODDIR} -D JAR_BASENAME=${REALPRJNAME} -D MAIN_CLASS=${_JAR_MAIN_CLASS} -D ENABLE_PREVIEW_VALUE=${ENABLE_PREVIEW_VALUE} $Props } # tag:java-specific @@ -1199,23 +1203,50 @@ _GEN_JAVA_RUN_SH_OUTPUT=run.sh when ($HOST_OS_WINDOWS == "yes") { _GEN_JAVA_RUN_SH_OUTPUT=run.bat } -GEN_JAVA_RUN_SH=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:_GEN_JAVA_RUN_SH_OUTPUT} -D GENERATE_DEFAULT_RUNNER=yes -D JAR_NAME=${REALPRJNAME}.jar -D CLASSPATH=${nopath;join;pre="::":MANAGED_PEERS_CLOSURE} -D PROJECT_DIR=${REALPRJNAME} -D JAR_BASENAME=${REALPRJNAME} -D MAIN_CLASS=${_JAR_MAIN_CLASS} -D ENABLE_PREVIEW=${ENABLE_PREVIEW_VALUE} -GEN_RUN_CP=${WRITER_PY} --file ${BINDIR}/run-bf.txt -Q -m --ya-start-command-file ${nopath;qe;pre=$REALPRJNAME/:MANAGED_PEERS_CLOSURE} --ya-end-command-file && ${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"} ${BINDIR}/run-bf.txt ${TARGET} -COLLECT_JAR_PROGRAM_CP=$FS_TOOLS link_or_copy_to_dir --ya-start-command-file ${ext=.jar:MANAGED_PEERS_CLOSURE} ${ext=.so:MANAGED_PEERS_CLOSURE} ${ext=.dll:MANAGED_PEERS_CLOSURE} ${ext=.dylib:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS} --ya-end-command-file ${BINDIR}/${REALPRJNAME} ${hide;late_out;nopath;ext=.jar;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.so;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dll;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dylib;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} -MAKE_JAR_PROGRAM_CPLST=${MAKE_JAVA_CLASSPATH_FILE} --from-args ${output;pre=$MODULE_PREFIX;suf=${MODULE_SUFFIX}.cplst:REALPRJNAME} --ya-start-command-file ${nopath;rootrel;ext=.jar;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS_CPLIST} --ya-end-command-file +GEN_JAVA_RUN_SH=$SCRIPTGEN_RESOURCE_GLOBAL/scriptgen --java $JDK_RESOURCE/bin/java --output ${output:_GEN_JAVA_RUN_SH_OUTPUT} \ + -D GENERATE_DEFAULT_RUNNER=yes \ + -D JAR_NAME=${REALPRJNAME}.jar \ + -D CLASSPATH=${join;pre="::";nopath:MANAGED_PEERS_CLOSURE} \ + -D PROJECT_DIR=${REALPRJNAME} \ + -D JAR_BASENAME=${REALPRJNAME} \ + -D MAIN_CLASS=${_JAR_MAIN_CLASS} \ + -D ENABLE_PREVIEW=${ENABLE_PREVIEW_VALUE} +GEN_RUN_CP=${WRITER_PY} --file ${BINDIR}/run-bf.txt -Q -m --ya-start-command-file ${qe;pre=$REALPRJNAME/;nopath:MANAGED_PEERS_CLOSURE} --ya-end-command-file && ${YMAKE_PYTHON} ${input:"build/scripts/make_manifest_from_bf.py"} ${BINDIR}/run-bf.txt ${TARGET} +COLLECT_JAR_PROGRAM_CP=$FS_TOOLS link_or_copy_to_dir \ + --ya-start-command-file \ + ${ext=.jar:MANAGED_PEERS_CLOSURE} \ + ${ext=.so:MANAGED_PEERS_CLOSURE} \ + ${ext=.dll:MANAGED_PEERS_CLOSURE} \ + ${ext=.dylib:MANAGED_PEERS_CLOSURE} \ + ${_SOURCE_JARS} \ + --ya-end-command-file \ + ${BINDIR}/${REALPRJNAME} \ + ${hide;late_out;pre=$BINDIR/$REALPRJNAME/;nopath;ext=.jar:MANAGED_PEERS_CLOSURE} \ + ${hide;late_out;pre=$BINDIR/$REALPRJNAME/;nopath;ext=.so:MANAGED_PEERS_CLOSURE} \ + ${hide;late_out;pre=$BINDIR/$REALPRJNAME/;nopath;ext=.dll:MANAGED_PEERS_CLOSURE} \ + ${hide;late_out;pre=$BINDIR/$REALPRJNAME/;nopath;ext=.dylib:MANAGED_PEERS_CLOSURE} +MAKE_JAR_PROGRAM_CPLST=${MAKE_JAVA_CLASSPATH_FILE} --from-args ${output;pre=$MODULE_PREFIX;suf=${MODULE_SUFFIX}.cplst:REALPRJNAME} --ya-start-command-file ${rootrel;pre=$BINDIR/$REALPRJNAME/;nopath;ext=.jar:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS_CPLIST} --ya-end-command-file TAR_CLASSPATH= && $YMAKE_PYTHON ${input:"build/scripts/find_and_tar.py"} ${output;pre=$MODULE_PREFIX;suf=.tar:REALPRJNAME} ${cwd;pre=$BINDIR/:REALPRJNAME} DO_TAR_CLASSPATH= -LINK_JAR_PROGRAM=${hide:JAVA_FAKEID} $FS_TOOLS md ${BINDIR}/${REALPRJNAME} && $COLLECT_JAR_PROGRAM_CP && $DO_GEN_JAVA_RUN_SH && $GEN_RUN_CP && $MAKE_JAR_PROGRAM_CPLST $DO_TAR_CLASSPATH $_GEN_USERSCRIPTS $_PACK_JDK ${hide;kv:"p JP"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"} +LINK_JAR_PROGRAM=${hide:JAVA_FAKEID} $FS_TOOLS md ${BINDIR}/${REALPRJNAME} \ + && $COLLECT_JAR_PROGRAM_CP \ + && $DO_GEN_JAVA_RUN_SH \ + && $GEN_RUN_CP \ + && $MAKE_JAR_PROGRAM_CPLST \ + && $DO_TAR_CLASSPATH \ + && $_GEN_USERSCRIPTS \ + && $_PACK_JDK \ + && ${hide;kv:"p JP"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"} # tag:java-specific # UBERJAR program link command LINK_UBERJAR_PROGRAM=${hide:JAVA_FAKEID} ${hide;kv:"p UJ"} ${MAKE_JAVA_CLASSPATH_FILE} --from-args ${output;pre=$MODULE_PREFIX;suf=${MODULE_SUFFIX}.cplst:REALPRJNAME} $TARGET \ && $FS_TOOLS md ${BINDIR}/${REALPRJNAME} \ && $FS_TOOLS link_or_copy ${BINDIR}/${REALPRJNAME}.jar $TARGET \ - && $FS_TOOLS link_or_copy_to_dir --ya-start-command-file ${BINDIR}/${REALPRJNAME}.jar ${ext=.so:MANAGED_PEERS_CLOSURE} ${ext=.dll:MANAGED_PEERS_CLOSURE} ${ext=.dylib:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS} --ya-end-command-file ${BINDIR}/${REALPRJNAME} ${hide;output;ext=.jar;pre=$BINDIR/$REALPRJNAME/:REALPRJNAME} ${hide;late_out;nopath;ext=.so;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dll;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} ${hide;late_out;nopath;ext=.dylib;pre=$BINDIR/$REALPRJNAME/:MANAGED_PEERS_CLOSURE} \ - $DO_TAR_CLASSPATH \ - $_GEN_USERSCRIPTS \ - $_PACK_JDK + && $FS_TOOLS link_or_copy_to_dir --ya-start-command-file ${BINDIR}/${REALPRJNAME}.jar ${ext=.so:MANAGED_PEERS_CLOSURE} ${ext=.dll:MANAGED_PEERS_CLOSURE} ${ext=.dylib:MANAGED_PEERS_CLOSURE} ${_SOURCE_JARS} --ya-end-command-file ${BINDIR}/${REALPRJNAME} ${hide;output;ext=.jar;pre=$BINDIR/$REALPRJNAME/:REALPRJNAME} ${hide;late_out;pre=$BINDIR/$REALPRJNAME/;nopath;ext=.so:MANAGED_PEERS_CLOSURE} ${hide;late_out;pre=$BINDIR/$REALPRJNAME/;nopath;ext=.dll:MANAGED_PEERS_CLOSURE} ${hide;late_out;pre=$BINDIR/$REALPRJNAME/;nopath;ext=.dylib:MANAGED_PEERS_CLOSURE} \ + && $DO_TAR_CLASSPATH \ + && $_GEN_USERSCRIPTS \ + && $_PACK_JDK # tag:java-specific RUN_WITH_SOURCES=no @@ -1232,17 +1263,17 @@ macro _MARK_JAVA_PROG_WITH_SOURCES(Args...) { module _JAR_RUNNABLE: _COMPILABLE_JAR_BASE { .FINAL_TARGET=yes .CMD=LINK_JAR_PROGRAM - .SEM=IGNORED - .ALIASES=JAVA_SRCS=_MARK_JAVA_PROG_WITH_SOURCES GENERATE_SCRIPT=_YMAKE_GENERATE_SCRIPT - .ALLOWED=WITH_JDK + .SEM=_SEM_IGNORED + .ALIASES=JAVA_SRCS=_MARK_JAVA_PROG_WITH_SOURCES + .ALLOWED=WITH_JDK GENERATE_SCRIPT .PEERDIR_POLICY=as_build_from MODULE_SUFFIX=.run.cp.jar CONSUME_NON_MANAGEABLE_PEERS=yes when ($RUN_WITH_SOURCES == "yes") { - _SOURCE_JARS=${ext=.jar;noext;suf=-sources.jar:MANAGED_PEERS_CLOSURE} ${hide;late_out;ext=.jar;nopath;pre=$BINDIR/$REALPRJNAME/;noext;suf=-sources.jar:MANAGED_PEERS_CLOSURE} - _SOURCE_JARS_CPLIST=${nopath;rootrel;ext=.jar;pre=$BINDIR/$REALPRJNAME/;noext;suf=-sources.jar:MANAGED_PEERS_CLOSURE} + _SOURCE_JARS=${suf=-sources.jar;noext;ext=.jar:MANAGED_PEERS_CLOSURE} ${hide;late_out;pre=$BINDIR/$REALPRJNAME/;nopath;suf=-sources.jar;noext;ext=.jar:MANAGED_PEERS_CLOSURE} + _SOURCE_JARS_CPLIST=${rootrel;pre=$BINDIR/$REALPRJNAME/;nopath;suf=-sources.jar;noext;ext=.jar:MANAGED_PEERS_CLOSURE} } when ($TARED_CLASSPATH == "yes") { @@ -1491,7 +1522,7 @@ elsewhen ($JDK_VERSION == "") { otherwise { EXTERNAL_JAVA_JDK_RESOURCE=$JDK_RESOURCE } -COMPILE_JAVA=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/compile_java.py"} --ya-start-command-file --java-bin $EXTERNAL_JAVA_JDK_RESOURCE/bin/java --javac-bin $EXTERNAL_JAVA_JDK_RESOURCE/bin/javac --jar-bin $JDK_RESOURCE/bin/jar --kotlin-compiler $KOTLIN_COMPILER_RESOURCE_GLOBAL/kotlin-compiler.jar $JAVA_VCS_MF_ARG $PACKAGE_PREFIX_ARGS --jar-output $TARGET --srcs-jar-output ${output;suf=-sources.jar:REALPRJNAME} $AUTO_INPUT DELIM $JAVAC_OPTS DELIM $MANAGED_PEERS_CLOSURE DELIM -no-stdlib -module-name $REALPRJNAME -jvm-target ${KOTLIN_JVM_TARGET} ${KOTLINC_OPTS_VALUE} --ya-end-command-file ${hide;kv:"p JV"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"} ${requirements;hide:"cpu:2"} ${hide;input:"build/scripts/java_command_file.py"} ${hide;input:"build/scripts/process_command_files.py"} +COMPILE_JAVA=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/compile_java.py"} --ya-start-command-file --java-bin $EXTERNAL_JAVA_JDK_RESOURCE/bin/java --javac-bin $EXTERNAL_JAVA_JDK_RESOURCE/bin/javac --jar-bin $JDK_RESOURCE/bin/jar --kotlin-compiler $KOTLIN_COMPILER_RESOURCE_GLOBAL/kotlin-compiler.jar $JAVA_VCS_MF_ARG $PACKAGE_PREFIX_ARGS --jar-output $TARGET --srcs-jar-output ${output;suf=-sources.jar:REALPRJNAME} $AUTO_INPUT DELIM $JAVAC_OPTS DELIM $MANAGED_PEERS_CLOSURE DELIM -no-stdlib -module-name $REALPRJNAME -jvm-target ${KOTLIN_JVM_TARGET} ${KOTLINC_OPTS_VALUE} --ya-end-command-file ${hide;kv:"p JV"} ${hide;kv:"pc light-blue"} ${hide;kv:"show_out"} ${hide;requirements:"cpu:2"} ${hide;input:"build/scripts/java_command_file.py"} ${hide;input:"build/scripts/process_command_files.py"} ARGS_DELIM="MACRO_CALLS_DELIM" @@ -1859,7 +1890,7 @@ macro WITH_JDK() { _OK=no } otherwise { - _PACK_JDK= && ${YMAKE_PYTHON} ${input:"build/scripts/tar_directory.py"} ${output;tared:"jdk.tar"} $WITH_JDK_RESOURCE $WITH_JDK_RESOURCE + _PACK_JDK= && ${YMAKE_PYTHON} ${input:"build/scripts/tar_directory.py"} ${tared;output:"jdk.tar"} $WITH_JDK_RESOURCE $WITH_JDK_RESOURCE WITH_JDK_VALUE=yes } ASSERT(_OK [[alt1]]jdk[[rst]] name is prohibited for [[imp]]JAVA_PROGRAM[[rst]] module when [[imp]]WITH_JDK[[rst]] is used, [[imp]]WITH_JDK[[rst]] will be ignored.) diff --git a/build/conf/linkers/msvc_linker.conf b/build/conf/linkers/msvc_linker.conf index 926d9c9a881..c94cd67c9bc 100644 --- a/build/conf/linkers/msvc_linker.conf +++ b/build/conf/linkers/msvc_linker.conf @@ -23,27 +23,13 @@ _FLAGS_DEBUG_ONLY_DEBUG= _FLAGS_RELEASE_ONLY_DEBUG= _FLAGS_COMMON_DEBUG= when (!$NO_DEBUGINFO || $NO_DEBUGINFO == "no" || $NO_DEBUGINFO == "0") { - when ($IDE_MSVS == "yes") { - when ($CLANG_CL == "yes") { - _FLAGS_DEBUG_ONLY_DEBUG=/DEBUG - } - otherwise { - _FLAGS_DEBUG_ONLY_DEBUG=/DEBUG:FASTLINK - } - _FLAGS_RELEASE_ONLY_DEBUG=/DEBUG - } - otherwise { - _FLAGS_COMMON_DEBUG=/DEBUG - } + _FLAGS_COMMON_DEBUG=/DEBUG } -_FLAGS_COMMON_LIBPATHS= -when ($IDE_MSVS != "yes") { - _FLAGS_COMMON_LIBPATHS=\ - /LIBPATH:\""${_MSVC_TC_KIT_LIBS}/um/$_MSVC_ARCH"\" \ - /LIBPATH:\""${_MSVC_TC_KIT_LIBS}/ucrt/$_MSVC_ARCH"\" \ - /LIBPATH:\""${_MSVC_TC_VC_ROOT}/lib/$_MSVC_ARCH"\" -} +_FLAGS_COMMON_LIBPATHS=\ + /LIBPATH:\""${_MSVC_TC_KIT_LIBS}/um/$_MSVC_ARCH"\" \ + /LIBPATH:\""${_MSVC_TC_KIT_LIBS}/ucrt/$_MSVC_ARCH"\" \ + /LIBPATH:\""${_MSVC_TC_VC_ROOT}/lib/$_MSVC_ARCH"\" _FLAGS_COMMON =/NOLOGO /ERRORREPORT:PROMPT /SUBSYSTEM:CONSOLE /TLBID:1 $MSVC_DYNAMICBASE /NXCOMPAT _FLAGS_COMMON+=$_FLAGS_IGNORE diff --git a/build/conf/opensource.conf b/build/conf/opensource.conf index 6712e03aef1..b37af16b234 100644 --- a/build/conf/opensource.conf +++ b/build/conf/opensource.conf @@ -1,5 +1,6 @@ EXPORT_CMAKE=no EXPORT_GRADLE=no +_SEM_IGNORED=IGNORED when ($OPENSOURCE == "yes" || $OPENSOURCE_PROJECT == "ymake" || $OPENSOURCE_PROJECT == "ya") { YA_OPENSOURCE=yes diff --git a/build/conf/project_specific/yql_udf.conf b/build/conf/project_specific/yql_udf.conf index a52d753d03c..0f3c1879a50 100644 --- a/build/conf/project_specific/yql_udf.conf +++ b/build/conf/project_specific/yql_udf.conf @@ -176,7 +176,7 @@ module _YQL_UDF_PROGRAM_BASE: SO_PROGRAM { _MAKE_YQL_UDF() } -UDF_SHARED_SEM=$CPP_DYN_LIBRARY_SEM +UDF_SHARED_SEM=$_CPP_DYN_LIBRARY_SEM ### @usage: YQL_UDF(name) ### @@ -195,7 +195,7 @@ multimodule YQL_UDF { } module YQL_UDF_STATIC: _DLL_COMPATIBLE_LIBRARY { .ALIASES=SRCS=GLOBAL_SRCS - .SEM=CPP_LIBRARY_SEM + .SEM=_CPP_LIBRARY_SEM .GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM OBJ_SUF=.udfs _ADD_YQL_UDF_DEPS() @@ -216,7 +216,7 @@ multimodule YQL_UDF_YDB { } module YQL_UDF_STATIC: _DLL_COMPATIBLE_LIBRARY { .ALIASES=SRCS=GLOBAL_SRCS - .SEM=CPP_LIBRARY_SEM + .SEM=_CPP_LIBRARY_SEM .GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM OBJ_SUF=.udfs _ADD_YQL_UDF_YDB_DEPS() @@ -235,7 +235,7 @@ multimodule YQL_UDF_CONTRIB { } module YQL_UDF_STATIC: _DLL_COMPATIBLE_LIBRARY { .ALIASES=SRCS=GLOBAL_SRCS - .SEM=CPP_LIBRARY_SEM + .SEM=_CPP_LIBRARY_SEM .GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM OBJ_SUF=.udfs _ADD_YQL_UDF_DEPS_CONTRIB() diff --git a/build/conf/proto.conf b/build/conf/proto.conf index e7e17be334b..7f1194e32b9 100644 --- a/build/conf/proto.conf +++ b/build/conf/proto.conf @@ -659,9 +659,9 @@ _PROTO_DESC_MERGE_PEERS_CMD=$YMAKE_PYTHON3 ${input:"build/scripts/merge_files.py NEED_GOOGLE_PROTO_PEERDIRS=yes -CPP_PROTO_LIBRARY_SEM=$CPP_LIBRARY_SEM +_CPP_PROTO_LIBRARY_SEM=$_CPP_LIBRARY_SEM -JAVA_PROTO_LIBRARY_SEM=$BUILD_PROTO_JAR_SEM $_GRADLE_EXPORT_PUBLISHING_SEM +_JAVA_PROTO_LIBRARY_SEM=$BUILD_PROTO_JAR_SEM $_GRADLE_EXPORT_PUBLISHING_SEM module _CPP_PROTO : LIBRARY { .ALLOWED=_EXPOSE LIST_PROTO @@ -833,29 +833,29 @@ module _DESC_PROTO: _BARE_UNIT { multimodule PROTO_LIBRARY { module CPP_PROTO: _CPP_PROTO { # TODO(svidyuk): think about marker which forces semantics inheritance - .SEM=CPP_PROTO_LIBRARY_SEM + .SEM=_CPP_PROTO_LIBRARY_SEM SET_APPEND(PEERDIR_TAGS CPP_PROTO) } module JAVA_PROTO: _JAVA_PROTO { - .SEM=JAVA_PROTO_LIBRARY_SEM + .SEM=_JAVA_PROTO_LIBRARY_SEM SET_APPEND(PEERDIR_TAGS JAVA_PROTO) } module PY_PROTO: _PY_PROTO { - .SEM=IGNORED + .SEM=_SEM_IGNORED SET_APPEND(PEERDIR_TAGS PY_PROTO) .PEERDIRSELF=CPP_PROTO } module PY3_PROTO: _PY3_PROTO { - .SEM=IGNORED + .SEM=_SEM_IGNORED SET_APPEND(PEERDIR_TAGS PY3_PROTO) .PEERDIRSELF=CPP_PROTO } module GO_PROTO: _GO_PROTO { - .SEM=IGNORED + .SEM=_SEM_IGNORED SET_APPEND(PEERDIR_TAGS GO_PROTO) } @@ -874,7 +874,7 @@ multimodule PROTO_LIBRARY { } module DESC_PROTO: _DESC_PROTO { - .SEM=IGNORED + .SEM=_SEM_IGNORED SET_APPEND(PEERDIR_TAGS DESC_PROTO) } } @@ -911,33 +911,33 @@ module PROTO_REGISTRY: PROTO_DESCRIPTIONS { multimodule PROTO_SCHEMA { module CPP_PROTO_FROM_SCHEMA: _CPP_PROTO { # TODO(svidyuk): think about marker which forces semantics inheritance - .SEM=CPP_PROTO_LIBRARY_SEM + .SEM=_CPP_PROTO_LIBRARY_SEM DISABLE(START_TARGET) SET_APPEND(PEERDIR_TAGS CPP_PROTO CPP_PROTO_FROM_SCHEMA) } module JAVA_PROTO_FROM_SCHEMA: _JAVA_PROTO { - .SEM=JAVA_PROTO_LIBRARY_SEM + .SEM=_JAVA_PROTO_LIBRARY_SEM DISABLE(START_TARGET) SET_APPEND(PEERDIR_TAGS JAVA_PROTO JAVA_PROTO_FROM_SCHEMA) } module PY_PROTO_FROM_SCHEMA: _PY_PROTO { - .SEM=IGNORED + .SEM=_SEM_IGNORED .PEERDIRSELF=CPP_PROTO_FROM_SCHEMA DISABLE(START_TARGET) SET_APPEND(PEERDIR_TAGS PY_PROTO PY_PROTO_FROM_SCHEMA) } module PY3_PROTO_FROM_SCHEMA: _PY3_PROTO { - .SEM=IGNORED + .SEM=_SEM_IGNORED .PEERDIRSELF=CPP_PROTO_FROM_SCHEMA DISABLE(START_TARGET) SET_APPEND(PEERDIR_TAGS PY3_PROTO PY3_PROTO_FROM_SCHEMA) } module GO_PROTO_FROM_SCHEMA: _GO_PROTO { - .SEM=IGNORED + .SEM=_SEM_IGNORED DISABLE(START_TARGET) SET_APPEND(PEERDIR_TAGS GO_PROTO GO_PROTO_FROM_SCHEMA) } @@ -959,7 +959,7 @@ multimodule PROTO_SCHEMA { } module DESC_PROTO_FROM_SCHEMA: _DESC_PROTO { - .SEM=IGNORED + .SEM=_SEM_IGNORED DISABLE(START_TARGET) SET_APPEND(PEERDIR_TAGS DESC_PROTO DESC_PROTO_FROM_SCHEMA) } diff --git a/build/conf/python.conf b/build/conf/python.conf index 340705beb6d..7c67b4f9d11 100644 --- a/build/conf/python.conf +++ b/build/conf/python.conf @@ -448,7 +448,7 @@ multimodule PY3TEST { ### ### Documentation: https://wiki.yandex-team.ru/devtools/commandsandvars/py_srcs/ module PY_ANY_MODULE: DLL_UNIT { - .SEM=CPP_DYN_LIBRARY_SEM + .SEM=_CPP_DYN_LIBRARY_SEM when ($MSVC != "yes" && $DARWIN != "yes") { LDFLAGS+= -Wl,-Bsymbolic } @@ -1112,7 +1112,7 @@ multimodule PY23_NATIVE_LIBRARY { module PY3: LIBRARY { .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 RUN_ANTLR4_PYTHON .ALIASES=PYTHON2_ADDINCL=PYTHON3_ADDINCL - .SEM=CPP_LIBRARY_SEM + .SEM=_CPP_LIBRARY_SEM .GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM PYTHON3_ADDINCL() SET(MODULE_LANG PY3) diff --git a/build/export_generators/ide-gradle/vars.jinja b/build/export_generators/ide-gradle/vars.jinja index b83c0dfac2c..d8722a2b42f 100644 --- a/build/export_generators/ide-gradle/vars.jinja +++ b/build/export_generators/ide-gradle/vars.jinja @@ -3,7 +3,7 @@ {%- set with_kotlin = target.with_kotlin -%} {%- set kotlin_version = target.kotlin_version -%} {%- set has_junit5_test = extra_targets|selectattr('junit5_test') -%} -{%- set has_errorprone = target.use_errorprone and not disable_errorprone -%} +{%- set has_errorprone = target.use_errorprone and not disable_errorprone and target.consumer|selectattr('jar', 'startsWith', 'contrib/java/com/google/errorprone/error_prone_annotations')|length -%} {%- if not target.required_jdk -%} {%- set has_required_jdk = false -%} diff --git a/build/mapping.conf.json b/build/mapping.conf.json index a32d282a53d..55ff1237477 100644 --- a/build/mapping.conf.json +++ b/build/mapping.conf.json @@ -460,6 +460,8 @@ "7621357676": "https://devtools-registry.s3.yandex.net/7621357676", "7631718068": "https://devtools-registry.s3.yandex.net/7631718068", "7631728247": "https://devtools-registry.s3.yandex.net/7631728247", + "7658393380": "https://devtools-registry.s3.yandex.net/7658393380", + "7658438634": "https://devtools-registry.s3.yandex.net/7658438634", "5486731632": "https://devtools-registry.s3.yandex.net/5486731632", "5514350352": "https://devtools-registry.s3.yandex.net/5514350352", "5514360398": "https://devtools-registry.s3.yandex.net/5514360398", @@ -964,9 +966,11 @@ "7512042091": "https://devtools-registry.s3.yandex.net/7512042091", "7512103615": "https://devtools-registry.s3.yandex.net/7512103615", "7324464594": "https://devtools-registry.s3.yandex.net/7324464594", + "7654921682": "https://devtools-registry.s3.yandex.net/7654921682", "7487656957": "https://devtools-registry.s3.yandex.net/7487656957", "7458707245": "https://devtools-registry.s3.yandex.net/7458707245", "7414146467": "https://devtools-registry.s3.yandex.net/7414146467", + "7654793679": "https://devtools-registry.s3.yandex.net/7654793679", "7487672728": "https://devtools-registry.s3.yandex.net/7487672728", "7442753753": "https://devtools-registry.s3.yandex.net/7442753753", "7406675906": "https://devtools-registry.s3.yandex.net/7406675906", @@ -975,6 +979,7 @@ "7458616985": "https://devtools-registry.s3.yandex.net/7458616985", "7406665335": "https://devtools-registry.s3.yandex.net/7406665335", "7458630270": "https://devtools-registry.s3.yandex.net/7458630270", + "7655042582": "https://devtools-registry.s3.yandex.net/7655042582", "7193800506": "https://devtools-registry.s3.yandex.net/7193800506", "7629377653": "https://devtools-registry.s3.yandex.net/7629377653", "7324461714": "https://devtools-registry.s3.yandex.net/7324461714", @@ -1570,6 +1575,8 @@ "7621357676": "devtools/ya/test/programs/test_tool/bin/test_tool for linux", "7631718068": "devtools/ya/test/programs/test_tool/bin/test_tool for linux", "7631728247": "devtools/ya/test/programs/test_tool/bin/test_tool for linux", + "7658393380": "devtools/ya/test/programs/test_tool/bin/test_tool for linux", + "7658438634": "devtools/ya/test/programs/test_tool/bin/test_tool 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", "5514360398": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux", @@ -2074,9 +2081,11 @@ "7512042091": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/203a60f0-6d4d-46bf-93eb-a2a5f998b768/yfm-docs.tar", "7512103615": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/29fcd2aa-e0b5-481e-83c8-b7ff5e0157c9/yfm-docs.tar", "7324464594": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/32cc8c74-decd-44a8-bc8c-f8f0d7edfffe/yfm-docs.tar", + "7654921682": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/33b2cf15-eb2e-44b8-a074-0c6f60f97a04/yfm-docs.tar", "7487656957": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/4b747fb6-2d4e-4a7b-bbed-abb9a1e21761/yfm-docs.tar", "7458707245": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/4e7df89f-3762-4eba-ba73-562ccaeae548/yfm-docs.tar", "7414146467": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/66167d72-07fa-444c-8493-dea0a39d034e/yfm-docs.tar", + "7654793679": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/68b3d50f-8068-40b2-8e3c-96653135fcb5/yfm-docs.tar", "7487672728": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/68c62602-dfe7-4bea-873f-cae85e13071f/yfm-docs.tar", "7442753753": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/68e622e9-832b-4a30-81c5-a38c80bb0776/yfm-docs.tar", "7406675906": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/6bba4fa0-ac5e-4a8a-89df-ce9e09573567/yfm-docs.tar", @@ -2085,6 +2094,7 @@ "7458616985": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/85261fb1-0e04-4e8d-b1d5-7042725f1345/yfm-docs.tar", "7406665335": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/895e2cbd-d4a8-4a5c-9cf5-5666e796f17a/yfm-docs.tar", "7458630270": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/8bb29ea7-2952-4e33-b716-e6d188b5ded9/yfm-docs.tar", + "7655042582": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/91b4bee9-7558-473b-9ec7-fb6880229d86/yfm-docs.tar", "7193800506": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/9be8ed55-d7f8-4029-a7fd-fbfa072b896f/yfm-docs.tar", "7629377653": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/a7252668-c1a0-49ef-9ec1-cfcd91deac10/yfm-docs.tar", "7324461714": "none-none-none-service_resources/TASKLET_EXECUTABLE/backup/b3543418-58d4-4e1c-b2be-43b55b035e91/yfm-docs.tar", diff --git a/build/platform/test_tool/host.ya.make.inc b/build/platform/test_tool/host.ya.make.inc index 37d79db5c9c..d32afd07928 100644 --- a/build/platform/test_tool/host.ya.make.inc +++ b/build/platform/test_tool/host.ya.make.inc @@ -1,12 +1,12 @@ IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631715970) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658436923) ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631714701) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658436110) ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631718068) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658438634) ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631713717) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658435304) ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631716956) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658437694) ENDIF() diff --git a/build/platform/test_tool/host_os.ya.make.inc b/build/platform/test_tool/host_os.ya.make.inc index 93110dcee21..f991eb46103 100644 --- a/build/platform/test_tool/host_os.ya.make.inc +++ b/build/platform/test_tool/host_os.ya.make.inc @@ -1,12 +1,12 @@ IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631725491) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658391057) ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631724285) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658389921) ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631728247) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658393380) ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631723135) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658388690) ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64) - DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7631726652) + DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:7658392345) ENDIF() diff --git a/build/platform/yfm/ya.make b/build/platform/yfm/ya.make index 34bc1ac3077..cdf8f5bff53 100644 --- a/build/platform/yfm/ya.make +++ b/build/platform/yfm/ya.make @@ -6,10 +6,10 @@ ENDIF() DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE( YFM_TOOL - sbr:7629327459 FOR DARWIN-ARM64 - sbr:7629327459 FOR DARWIN - sbr:7629377653 FOR LINUX - sbr:7629350192 FOR WIN32 + sbr:7654793679 FOR DARWIN-ARM64 + sbr:7654793679 FOR DARWIN + sbr:7655042582 FOR LINUX + sbr:7654921682 FOR WIN32 ) END() diff --git a/build/plugins/java.py b/build/plugins/java.py index b3a4de384b3..2002d2ffa26 100644 --- a/build/plugins/java.py +++ b/build/plugins/java.py @@ -38,22 +38,6 @@ def extract_macro_calls2(unit, macro_value_name): return calls -def ongenerate_script(unit, *args): - """ - heretic@ promised to make tutorial here - Don't forget - Feel free to remind - """ - flat, kv = common.sort_by_keywords({'OUT': -1, 'TEMPLATE': -1, 'CUSTOM_PROPERTY': -1}, args) - if len(kv.get('TEMPLATE', [])) > len(kv.get('OUT', [])): - ymake.report_configure_error('To many arguments for TEMPLATE parameter') - prev = unit.get(['GENERATE_SCRIPT_VALUE']) or '' - new_val = ( - prev + ' ' + six.ensure_str(base64.b64encode(six.ensure_binary(json.dumps(list(args)), encoding='utf-8'))) - ).strip() - unit.set(['GENERATE_SCRIPT_VALUE', new_val]) - - def onjava_module(unit, *args): args_delim = unit.get('ARGS_DELIM') @@ -88,7 +72,6 @@ def onjava_module(unit, *args): 'IDEA_EXCLUDE': extract_macro_calls(unit, 'IDEA_EXCLUDE_DIRS_VALUE', args_delim), 'IDEA_RESOURCE': extract_macro_calls(unit, 'IDEA_RESOURCE_DIRS_VALUE', args_delim), 'IDEA_MODULE_NAME': extract_macro_calls(unit, 'IDEA_MODULE_NAME_VALUE', args_delim), - 'GENERATE_SCRIPT': extract_macro_calls2(unit, 'GENERATE_SCRIPT_VALUE'), 'FAKEID': extract_macro_calls(unit, 'FAKEID', args_delim), 'TEST_DATA': extract_macro_calls(unit, 'TEST_DATA_VALUE', args_delim), 'JAVA_FORBIDDEN_LIBRARIES': extract_macro_calls(unit, 'JAVA_FORBIDDEN_LIBRARIES_VALUE', args_delim), @@ -349,7 +332,7 @@ def parse_words(words): yield o, templates[min(i, len(templates) - 1)], props -def on_ymake_generate_script(unit, *args): +def ongenerate_script(unit, *args): for out, tmpl, props in parse_words(list(args)): unit.on_add_gen_java_script([out, tmpl] + list(props)) diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py index 07ced44d044..744449d1098 100644 --- a/build/plugins/pybuild.py +++ b/build/plugins/pybuild.py @@ -5,7 +5,7 @@ import six from hashlib import md5 import ymake -from _common import stripext, rootrel_arc_src, listid, pathid, lazy, get_no_lint_value +from _common import stripext, rootrel_arc_src, listid, pathid, lazy, get_no_lint_value, ugly_conftest_exception YA_IDE_VENV_VAR = 'YA_IDE_VENV' @@ -15,12 +15,12 @@ DEFAULT_FLAKE8_FILE_PROCESSING_TIME = "1.5" # in seconds DEFAULT_BLACK_FILE_PROCESSING_TIME = "1.5" # in seconds -def _split_macro_call(macro_call, data, item_size, chunk_size=1024): +def _split_macro_call(macro_call, data, item_size, chunk_size=1024, compress=False): index = 0 length = len(data) offset = item_size * chunk_size while index + 1 < length: - macro_call(data[index : index + offset]) + macro_call(([] if compress else ['DONT_COMPRESS']) + data[index : index + offset]) index += offset @@ -507,10 +507,10 @@ def onpy_srcs(unit, *args): if py_files2res: # Compile original and generated sources into target for proper cython coverage calculation for files2res in (py_files2res, cpp_files2res): - unit.onresource_files([x for name, path in files2res for x in ('DEST', name, path)]) + unit.onresource_files(['DONT_COMPRESS'] + [x for name, path in files2res for x in ('DEST', name, path)]) if include_map: - data = [] + data = ['DONT_COMPRESS'] prefix = 'resfs/cython/include' for line in sorted( '{}/{}={}'.format(prefix, filename, ':'.join(sorted(files))) @@ -541,6 +541,7 @@ def onpy_srcs(unit, *args): if py3: mod_list_md5 = md5() + compress = False for path, mod in pys: mod_list_md5.update(six.ensure_binary(mod)) if not (venv and is_extended_source_search_enabled(path, unit)): @@ -552,17 +553,21 @@ def onpy_srcs(unit, *args): dst = path + uniq_suffix(path, unit) unit.on_py3_compile_bytecode([root_rel_path + '-', path, dst]) res += ['DEST', dest + '.yapyc3', dst + '.yapyc3'] + if not compress and ugly_conftest_exception(path): + compress = True if py_namespaces: # Note: Add md5 to key to prevent key collision if two or more PY_SRCS() used in the same ya.make - ns_res = [] + ns_res = ['DONT_COMPRESS'] for path, ns in sorted(py_namespaces.items()): key = '{}/{}/{}'.format(PY_NAMESPACE_PREFIX, mod_list_md5.hexdigest(), path) namespaces = ':'.join(sorted(ns)) ns_res += ['-', '{}="{}"'.format(key, namespaces)] unit.onresource(ns_res) - _split_macro_call(unit.onresource_files, res, (3 if with_py else 0) + (3 if with_pyc else 0)) + _split_macro_call( + unit.onresource_files, res, (3 if with_py else 0) + (3 if with_pyc else 0), compress=compress + ) add_python_lint_checks( unit, 3, [path for path, mod in pys] + unit.get(['_PY_EXTRA_LINT_FILES_VALUE']).split() ) @@ -571,12 +576,7 @@ def onpy_srcs(unit, *args): root_rel_path = rootrel_arc_src(path, unit) if with_py: key = '/py_modules/' + mod - res += [ - path, - key, - '-', - 'resfs/src/{}={}'.format(key, root_rel_path), - ] + res += [path, key, '-', 'resfs/src/{}=${{rootrel;input;context=TEXT:"{}"}}'.format(key, path)] if with_pyc: src = unit.resolve_arc_path(path) or path dst = path + uniq_suffix(path, unit) @@ -595,7 +595,7 @@ def onpy_srcs(unit, *args): pyis_dups = ', '.join(name for name in sorted(pyis_dups)) ymake.report_configure_error('Duplicate(s) is found in the PY_SRCS macro: {}'.format(pyis_dups)) - res = [] + res = ['DONT_COMPRESS'] for path, mod in pyis: dest = 'py/' + mod.replace('.', '/') + '.pyi' res += ['DEST', dest, path] @@ -671,7 +671,7 @@ def onpy_doctests(unit, *args): The packages should be part of a test (listed as sources of the test or its PEERDIRs). """ if unit.get('PY3TEST_BIN' if is_py3(unit) else 'PYTEST_BIN') != 'no': - unit.onresource(['-', 'PY_DOCTEST_PACKAGES="{}"'.format(' '.join(args))]) + unit.onresource(['DONT_COMPRESS', '-', 'PY_DOCTEST_PACKAGES="{}"'.format(' '.join(args))]) def py_register(unit, func, py3): @@ -716,7 +716,7 @@ def py_main(unit, arg): unit_needs_main = unit.get('MODULE_TYPE') in ('PROGRAM', 'DLL') if unit_needs_main: py_program(unit, is_py3(unit)) - unit.onresource(['-', 'PY_MAIN={}'.format(arg)]) + unit.onresource(['DONT_COMPRESS', '-', 'PY_MAIN={}'.format(arg)]) def onpy_main(unit, arg): @@ -748,7 +748,7 @@ def onpy_constructor(unit, arg): arg = arg + '=init' else: arg[arg.index(':')] = '=' - unit.onresource(['-', 'py/constructors/{}'.format(arg)]) + unit.onresource(['DONT_COMPRESS', '-', 'py/constructors/{}'.format(arg)]) def onpy_enums_serialization(unit, *args): diff --git a/build/plugins/ytest.py b/build/plugins/ytest.py index a8ef930a07d..49110348777 100644 --- a/build/plugins/ytest.py +++ b/build/plugins/ytest.py @@ -772,7 +772,7 @@ def onadd_check(unit, *args): def on_register_no_check_imports(unit): s = unit.get('NO_CHECK_IMPORTS_FOR_VALUE') if s not in ('', 'None'): - unit.onresource(['-', 'py/no_check_imports/{}="{}"'.format(_common.pathid(s), s)]) + unit.onresource(['DONT_COMPRESS', '-', 'py/no_check_imports/{}="{}"'.format(_common.pathid(s), s)]) @df.with_fields( @@ -936,7 +936,7 @@ def onjava_test_deps(fields, unit, *args): def onsetup_pytest_bin(unit, *args): use_arcadia_python = unit.get('USE_ARCADIA_PYTHON') == "yes" if use_arcadia_python: - unit.onresource(['-', 'PY_MAIN={}'.format("library.python.pytest.main:main")]) # XXX + unit.onresource(['DONT_COMPRESS', '-', 'PY_MAIN={}'.format("library.python.pytest.main:main")]) # XXX unit.onadd_pytest_bin(list(args)) diff --git a/build/ymake.core.conf b/build/ymake.core.conf index ed6dc8407e8..b37c8a6e2f4 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -575,7 +575,7 @@ module _BARE_UNIT { module GEN_LIBRARY: _BARE_UNIT { .PROXY=yes .RESTRICTED=SRCS SRC - .SEM=IGNORED + .SEM=_SEM_IGNORED # ENABLE(_FAKE_MODULE) SET(MODULE_TAG RESOURCE_LIB) @@ -1212,7 +1212,7 @@ module _BASE_PROGRAM: _LINK_UNIT { } VCS_INFO_SEM=target_macroses-ITEM && target_macroses-macro vcs_info && target_macroses-args ${hide;input:"build/scripts/vcs_info.py"} ${hide;input:"build/scripts/c_templates/svn_interface.c"} ${hide;input:"build/scripts/c_templates/svnversion.h"} -CPP_PROGRAM_SEM=add_executable $MODDIR $CMAKE_TARGET_NAME ${hide:TARGET} ${hide:AUTO_INPUT} $CMAKE_TARGET_ARTEFACT_RENAME_RULES \ +_CPP_PROGRAM_SEM=add_executable $MODDIR $CMAKE_TARGET_NAME ${hide:TARGET} ${hide:AUTO_INPUT} $CMAKE_TARGET_ARTEFACT_RENAME_RULES \ && ${VCS_INFO_SEM} \ && target_options-privates-ITEM && target_options-privates-option target_link_options && target_options-privates-args $LDFLAGS_GLOBAL_RAW $LDFLAGS $OBJADDE_LIB $OBJADDE_LIB_GLOBAL $OBJADDE \ && target_options-privates-ITEM && target_options-privates-option target_include_directories && target_options-privates-args $_C__INCLUDE_OWNED \ @@ -1224,7 +1224,7 @@ CPP_PROGRAM_SEM=add_executable $MODDIR $CMAKE_TARGET_NAME ${hide:TARGET} ${hide: ### Regular program module. ### If name is not specified it will be generated from the name of the containing project directory. module PROGRAM: _BASE_PROGRAM { - .SEM=CPP_PROGRAM_SEM + .SEM=_CPP_PROGRAM_SEM .ALIASES=EXTRALIBS=PY_EXTRALIBS ADD_YTEST($MODULE_PREFIX$REALPRJNAME coverage.extractor) @@ -1297,7 +1297,7 @@ module _BASE_UNITTEST: _BASE_PROGRAM { _TEST_SPLIT_FACTOR_SEM=1 _TEST_TIMEOUT_SEM= _TEST_PARTITION_SEM= -UNITTEST_SEM=$CPP_PROGRAM_SEM \ +_UNITTEST_SEM=$_CPP_PROGRAM_SEM \ && target_commands-ITEM && target_commands-macro set_property && target_commands-args TARGET $REALPRJNAME PROPERTY SPLIT_FACTOR $_TEST_SPLIT_FACTOR_SEM \ $_TEST_PARTITION_SEM \ && target_commands-ITEM && target_commands-macro add_yunittest && target_commands-args NAME $REALPRJNAME TEST_TARGET $REALPRJNAME TEST_ARG --print-before-suite --print-before-test --fork-tests --print-times --show-fails \ @@ -1314,7 +1314,7 @@ UNITTEST_SEM=$CPP_PROGRAM_SEM \ ### ### Documentation: https://wiki.yandex-team.ru/yatool/test/#opisanievya.make1 module UNITTEST: _BASE_UNITTEST { - .SEM=UNITTEST_SEM + .SEM=_UNITTEST_SEM .ARGS_PARSER=Base PEERDIR(library/cpp/testing/unittest_main) ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py) @@ -1340,7 +1340,7 @@ module UNITTEST: _BASE_UNITTEST { ### ### YT Unit test module based on library/cpp/testing/unittest with NYT::Initialize hook module YT_UNITTEST: _BASE_UNITTEST { - .SEM=UNITTEST_SEM + .SEM=_UNITTEST_SEM PEERDIR(library/cpp/testing/unittest_main yt/cpp/mapreduce/tests/yt_initialize_hook) ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py) } @@ -1350,11 +1350,11 @@ module YT_UNITTEST: _BASE_UNITTEST { ### ### Generic unit test module. module UNITTEST_WITH_CUSTOM_ENTRY_POINT: _BASE_UNITTEST { - .SEM=UNITTEST_SEM + .SEM=_UNITTEST_SEM ADD_YTEST($MODULE_PREFIX$REALPRJNAME unittest.py) } -GTEST_SEM=$CPP_PROGRAM_SEM \ +_GTEST_SEM=$_CPP_PROGRAM_SEM \ && target_commands-ITEM && target_commands-macro add_test && target_commands-args NAME $REALPRJNAME COMMAND $REALPRJNAME \ && target_commands-ITEM && target_commands-macro set_property && target_commands-args TEST $REALPRJNAME PROPERTY LABELS $TEST_SIZE_NAME $FILTER_ONLY_TEST_TAGS \ && add_test_requirements $REALPRJNAME $DEFAULT_REQUIREMENTS $TEST_REQUIREMENTS_VALUE \ @@ -1369,7 +1369,7 @@ GTEST_SEM=$CPP_PROGRAM_SEM \ ### ### Documentation: https://docs.yandex-team.ru/arcadia-cpp/docs/build/manual/tests/cpp#gtest module GTEST: _BASE_UNITTEST { - .SEM=GTEST_SEM + .SEM=_GTEST_SEM .DEFAULT_NAME_GENERATOR=FullPath .ARGS_PARSER=Base PEERDIR(library/cpp/testing/gtest library/cpp/testing/gtest_main) @@ -1702,12 +1702,12 @@ module EXECTEST: _BARE_UNIT { ### ### For more details see: https://wiki.yandex-team.ru/yatool/test/#zapuskbenchmark module Y_BENCHMARK: PROGRAM { - .SEM=CPP_PROGRAM_SEM + .SEM=_CPP_PROGRAM_SEM PEERDIR(library/cpp/testing/benchmark/main) ADD_YTEST($MODULE_PREFIX$REALPRJNAME y_benchmark) } -GBENCH_SEM=$CPP_PROGRAM_SEM \ +_GBENCH_SEM=$_CPP_PROGRAM_SEM \ && target_commands-ITEM && target_commands-macro add_test && target_commands-args NAME $REALPRJNAME COMMAND $REALPRJNAME \ && target_commands-ITEM && target_commands-macro set_property && target_commands-args TEST $REALPRJNAME PROPERTY LABELS SMALL $FILTER_ONLY_TEST_TAGS \ && add_test_requirements $REALPRJNAME $DEFAULT_REQUIREMENTS $TEST_REQUIREMENTS_VALUE \ @@ -1720,7 +1720,7 @@ GBENCH_SEM=$CPP_PROGRAM_SEM \ ### ### For more details see: https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/benchmark/README.md module G_BENCHMARK: _BASE_PROGRAM { - .SEM=GBENCH_SEM + .SEM=_GBENCH_SEM .ALLOWED=YT_SPEC PEERDIR(library/cpp/testing/gbenchmark) ADD_YTEST($MODULE_PREFIX$REALPRJNAME g_benchmark) @@ -1764,7 +1764,7 @@ when ($YA_DEV == "yes") { ### ### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/ module UNITTEST_FOR: UNITTEST { - .SEM=UNITTEST_SEM + .SEM=_UNITTEST_SEM PEERDIR(ADDINCL $UNITTEST_DIR) SRCDIR($UNITTEST_DIR) } @@ -1818,7 +1818,7 @@ module _LIBRARY: _BASE_UNIT { } CPP_LIBRARY_INDUCED_LINKS=link-publics -CPP_LIBRARY_SEM=add_library ${MODDIR} $CMAKE_TARGET_NAME ${hide:TARGET} ${hide:AUTO_INPUT} $CMAKE_TARGET_ARTEFACT_RENAME_RULES \ +_CPP_LIBRARY_SEM=add_library ${MODDIR} $CMAKE_TARGET_NAME ${hide:TARGET} ${hide:AUTO_INPUT} $CMAKE_TARGET_ARTEFACT_RENAME_RULES \ && is_fake_module ${FAKE_MODULE} \ && ${CPP_LIBRARY_INDUCED_LINKS} $CMAKE_LINK_TARGET \ && target_options-publics-ITEM && target_options-publics-option target_include_directories && target_options-publics-args $_C__INCLUDE_GLOBAL \ @@ -1852,17 +1852,17 @@ CMAKE_FIND_PKG_COMP= ### If you think you need to distribute static library please contact devtools@ for assistance. module LIBRARY: _LIBRARY { .GLOBAL=_AARS _PROGUARD_RULES - .SEM=CPP_LIBRARY_SEM + .SEM=_CPP_LIBRARY_SEM .ALIASES=EXTRALIBS=PY_EXTRALIBS .GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM .DEFAULT_NAME_GENERATOR=ThreeDirNames .ARGS_PARSER=Base when ($CMAKE_PACKAGE_SEM != "" || $CONAN_REQUIRES_SEM != "" || $CONAN_OPTS_SEM != "" || $CONAN_OS_REQUIRES_SEM != "" || $CONAN_OS_OPTIONS_SEM != "") { - CPP_LIBRARY_SEM=$CMAKE_PACKAGE_SEM && ${CPP_LIBRARY_INDUCED_LINKS} $CMAKE_LINK_TARGET $CONAN_REQUIRES_SEM $CONAN_OPTIONS_SEM $CONAN_OS_REQUIRES_SEM $CONAN_OS_OPTIONS_SEM && IGNORED + _CPP_LIBRARY_SEM=$CMAKE_PACKAGE_SEM && ${CPP_LIBRARY_INDUCED_LINKS} $CMAKE_LINK_TARGET $CONAN_REQUIRES_SEM $CONAN_OPTIONS_SEM $CONAN_OS_REQUIRES_SEM $CONAN_OS_OPTIONS_SEM && IGNORED } when ($OPENSOURCE_EXPORT == "no") { - CPP_LIBRARY_SEM=IGNORED + _CPP_LIBRARY_SEM=IGNORED } when ($HAS_CPP_PROTOBUF_PEERS == "yes") { @@ -1914,7 +1914,7 @@ macro _CONDITIONAL_SRCS(USE_CONDITIONAL_SRCS[], DYMMY...) { # XXX: dirty hack for correct LDFLAGS passing RESOURCES_LIBRARY_LINK=$TOUCH_UNIT -RESOURCES_LIBRARY_SEM=IGNORED +_RESOURCES_LIBRARY_SEM=IGNORED ### @usage: RESOURCES_LIBRARY() ### @@ -1924,7 +1924,7 @@ RESOURCES_LIBRARY_SEM=IGNORED ### @see: [DECLARE_EXTERNAL_RESOURCE()](#macro_DECLARE_EXTERNAL_RESOURCE) module RESOURCES_LIBRARY: _BARE_UNIT { .CMD=RESOURCES_LIBRARY_LINK - .SEM=RESOURCES_LIBRARY_SEM + .SEM=_RESOURCES_LIBRARY_SEM .ALLOWED=DECLARE_EXTERNAL_RESOURCE EXTRALIBS OBJADDE_GLOBAL .RESTRICTED=ALLOCATOR SIZE TAG DATA TEST_DATA DEPENDS FORK_TESTS FORK_SUBTESTS SPLIT_FACTOR TEST_CWD RUN TIMEOUT SRC SRCS SPLIT_DWARF .ALIASES=EXTRALIBS=PY_EXTRALIBS @@ -1938,7 +1938,7 @@ module RESOURCES_LIBRARY: _BARE_UNIT { SET(PEERDIR_TAGS RESOURCE_LIB) when ($CMAKE_PACKAGE_SEM != "" || $CONAN_REQUIRES_SEM != "" || $CONAN_OPTS_SEM != "" || $CONAN_OS_REQUIRES_SEM != "" || $CONAN_OS_OPTIONS_SEM != "") { - RESOURCES_LIBRARY_SEM=$CMAKE_PACKAGE_SEM && ${CPP_LIBRARY_INDUCED_LINKS} $CMAKE_LINK_TARGET $CONAN_REQUIRES_SEM $CONAN_OPTIONS_SEM $CONAN_OS_REQUIRES_SEM $CONAN_OS_OPTIONS_SEM && IGNORED + _RESOURCES_LIBRARY_SEM=$CMAKE_PACKAGE_SEM && ${CPP_LIBRARY_INDUCED_LINKS} $CMAKE_LINK_TARGET $CONAN_REQUIRES_SEM $CONAN_OPTIONS_SEM $CONAN_OS_REQUIRES_SEM $CONAN_OS_OPTIONS_SEM && IGNORED } MODULE_SUFFIX=.pkg.fake @@ -1946,7 +1946,7 @@ module RESOURCES_LIBRARY: _BARE_UNIT { WITHOUT_LICENSE_TEXTS() } -FAT_OBJECT_SEM=add_fat_object ${MODDIR} ${CMAKE_TARGET_NAME} ${hide:TARGET} ${hide:AUTO_INPUT} ${CMAKE_TARGET_ARTEFACT_RENAME_RULES} \ +_FAT_OBJECT_SEM=add_fat_object ${MODDIR} ${CMAKE_TARGET_NAME} ${hide:TARGET} ${hide:AUTO_INPUT} ${CMAKE_TARGET_ARTEFACT_RENAME_RULES} \ && target_options-privates-ITEM && target_options-privates-option target_include_directories && target_options-privates-args $_C__INCLUDE_OWNED \ && target_options-privates-ITEM && target_options-privates-option target_compile_options && target_options-privates-args $USER_CFLAGS $USER_CXXFLAGS $_SEM_EXTRA_CXX_FLAGS \ && platform_vars-FAT_OBJECT_PREFIX ${quo:MODULE_PREFIX} \ @@ -1966,7 +1966,7 @@ KEEP_FAT_OBJECT_SYMBOLS=no module FAT_OBJECT: LIBRARY { .ALLOWED=PACK_GLOBALS_IN_LIBRARY .CMD=$LINK_FAT_OBJECT - .SEM=FAT_OBJECT_SEM + .SEM=_FAT_OBJECT_SEM .PEERDIR_POLICY=as_build_from when ($MSVC == "yes" || $CYGWIN == "yes") { @@ -2001,7 +2001,7 @@ module FAT_OBJECT: LIBRARY { SRCS(build/scripts/_fake_src.cpp) } -RECURSIVE_LIBRARY_SEM=add_recursive_library ${MODDIR} ${CMAKE_TARGET_NAME} ${hide:TARGET} ${hide:AUTO_INPUT} ${CMAKE_TARGET_ARTEFACT_RENAME_RULES} \ +_RECURSIVE_LIBRARY_SEM=add_recursive_library ${MODDIR} ${CMAKE_TARGET_NAME} ${hide:TARGET} ${hide:AUTO_INPUT} ${CMAKE_TARGET_ARTEFACT_RENAME_RULES} \ && target_options-publics-ITEM && target_options-publics-option target_include_directories && target_options-publics-args $_C__INCLUDE_GLOBAL \ && target_options-privates-ITEM && target_options-privates-option target_include_directories && target_options-privates-args $_C__INCLUDE_OWNED \ && target_options-privates-ITEM && target_options-privates-option target_compile_options && target_options-privates-args $USER_CFLAGS $USER_CXXFLAGS $_SEM_EXTRA_CXX_FLAGS \ @@ -2016,7 +2016,7 @@ RECURSIVE_LIBRARY_SEM=add_recursive_library ${MODDIR} ${CMAKE_TARGET_NAME} ${hid ### Designed for use in XCode projects for iOS. module RECURSIVE_LIBRARY: LIBRARY { .CMD=$LINK_RECURSIVE_LIBRARY - .SEM=RECURSIVE_LIBRARY_SEM + .SEM=_RECURSIVE_LIBRARY_SEM .PEERDIR_POLICY=as_build_from # This module requires at least one .o which is not subject to removal so just add _fake_src.cpp as SRCS @@ -2031,7 +2031,7 @@ _CLEAN_TEXTREL= macro _ADD_DYNLYB_SEM(Libname) { .SEM=add_shared_library ${MODDIR} ${Libname} ${hide:TARGET} ${hide:AUTO_INPUT} && target_options-publics-ITEM && target_options-publics-option target_include_directories && target_options-publics-args $_C__INCLUDE_GLOBAL && target_options-privates-ITEM && target_options-privates-option target_include_directories && target_options-privates-args $_C__INCLUDE_OWNED && target_options-privates-ITEM && target_options-privates-option target_compile_options && target_options-privates-args $USER_CFLAGS $USER_CXXFLAGS $_SEM_EXTRA_CXX_FLAGS && target_options-publics-ITEM && target_options-publics-option target_compile_options && target_options-publics-args $USER_CFLAGS_GLOBAL_RAW $USER_CXXFLAGS_GLOBAL_RAW && target_options-privates-ITEM && target_options-privates-option target_link_options && target_options-privates-args $LDFLAGS_GLOBAL_RAW $LDFLAGS $OBJADDE_LIB $OBJADDE_LIB_GLOBAL $OBJADDE && ${VCS_INFO_SEM} $_EXPORT_SCRIPT_SEM } -CPP_DYN_LIBRARY_SEM=$_ADD_DYNLYB_SEM($CMAKE_TARGET_NAME) $CMAKE_TARGET_ARTEFACT_RENAME_RULES +_CPP_DYN_LIBRARY_SEM=$_ADD_DYNLYB_SEM($CMAKE_TARGET_NAME) $CMAKE_TARGET_ARTEFACT_RENAME_RULES macro CLEAN_TEXTREL() { SET(_CLEAN_TEXTREL yes) @@ -2043,7 +2043,7 @@ macro CLEAN_TEXTREL() { ### Cannot participate in linking to programs, intended to be used as final artifact (packaged and deployed). module DLL_UNIT: _LINK_UNIT { .CMD=$LINK_DYN_LIB - .SEM=CPP_DYN_LIBRARY_SEM + .SEM=_CPP_DYN_LIBRARY_SEM .NODE_TYPE=Library .SYMLINK_POLICY=SO .GLOBAL=USER_CFLAGS USER_CXXFLAGS USER_CONLYFLAGS LDFLAGS _WHOLE_ARCHIVE_LIBS_VALUE RPATH OBJADDE_LIB @@ -2115,7 +2115,7 @@ module DLL_UNIT: _LINK_UNIT { ### 3. Processing EXPORTS and PREFIX is the same as for DLL module ### This is native DLL, so it will select C++ version from PROTO_LIBRARY. module R_MODULE: DLL_UNIT { - .SEM=CPP_DYN_LIBRARY_SEM + .SEM=_CPP_DYN_LIBRARY_SEM when ($DARWIN == "yes") { LDFLAGS+=-flat_namespace -dynamiclib } @@ -2145,7 +2145,7 @@ macro DYNAMIC_LIBRARY_FROM(Path...) { ### ### DLL cannot participate in linking to programs but can be used from Java or as final artifact (packaged and deployed). module DLL: DLL_UNIT { - .SEM=CPP_DYN_LIBRARY_SEM + .SEM=_CPP_DYN_LIBRARY_SEM SET(MAKE_ONLY_SHARED_LIB yes) when ($OS_WINDOWS) { MODULE_SUFFIX=.dll @@ -2162,7 +2162,7 @@ module DLL: DLL_UNIT { ### DLL_TOOL is a DLL that can be used as a LD_PRELOAD tool. module DLL_TOOL: DLL { - .SEM=CPP_DYN_LIBRARY_SEM + .SEM=_CPP_DYN_LIBRARY_SEM # ymake resolves only program nodes as tools. .NODE_TYPE=Program } @@ -3185,32 +3185,32 @@ macro _SRC("m", SRC, SRCFLAGS...) { .CMD=$_SRC(c $SRC $SRCFLAGS) } -MASM_SEM=target_options-privates-ITEM && target_options-privates-option target_sources && target_options-privates-args ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} \ +_MASM_SEM=target_options-privates-ITEM && target_options-privates-option target_sources && target_options-privates-args ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} \ && dir_macroses-ITEM && dir_macroses-macro curdir_masm_flags && dir_macroses-args ${MASMFLAGS} -YASM_SEM=target_macroses-ITEM && target_macroses-macro target_yasm_source && target_macroses-args PRIVATE ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS ${pre=-P :PREINCLUDES} ${hide;input:"build/scripts/run_tool.py"} \ +_YASM_SEM=target_macroses-ITEM && target_macroses-macro target_yasm_source && target_macroses-args PRIVATE ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS ${pre=-P :PREINCLUDES} ${hide;input:"build/scripts/run_tool.py"} \ && platform_vars-YASM_FLAGS "-f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE -D ${pre=_;suf=_:HARDWARE_TYPE} -D _YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE" \ && project_languages ASM \ && conan-tool_requires yasm/1.3.0 && conan-imports 'bin, *yasm* -> ./bin' && conan-imports 'bin, ytasm* -> ./bin' -ASM_SEM=target_macroses-ITEM && target_macroses-macro target_yasm_source && target_macroses-args PRIVATE ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS ${hide;input:"build/scripts/run_tool.py"} \ +_ASM_SEM=target_macroses-ITEM && target_macroses-macro target_yasm_source && target_macroses-args PRIVATE ${input:SRC} ${hide;output;suf=${OBJ_SUF}.o:SRC} $YASM_FLAGS ${pre=-I :_ASM__INCLUDE} $SRCFLAGS ${hide;input:"build/scripts/run_tool.py"} \ && platform_vars-YASM_FLAGS "-f ${_YASM_FMT_VALUE}${HARDWARE_ARCH} $_YASM_PLATFORM_FLAGS_VALUE -D ${pre=_;suf=_:HARDWARE_TYPE} -D _YASM_ $ASM_PREFIX_VALUE $_YASM_PREDEFINED_FLAGS_VALUE" \ && project_languages ASM \ && conan-tool_requires yasm/1.3.0 && conan-imports 'bin, *yasm* -> ./bin' && conan-imports 'bin, ytasm* -> ./bin' # tag:src-processing macro _SRC("masm", SRC, SRCFLAGS...) { .CMD=$_SRC_masm($SRC $SRCFLAGS) - .SEM=$MASM_SEM + .SEM=$_MASM_SEM } # tag:src-processing macro _SRC("yasm", SRC, SRCFLAGS...) { .CMD=$_SRC_yasm($SRC $SRCFLAGS PREINCLUDES $YASM_PREINCLUDES_VALUE) - .SEM=$YASM_SEM + .SEM=$_YASM_SEM } # tag:src-processing macro _SRC("asm", SRC, SRCFLAGS...) { .CMD=$_SRC_ASM($SRC $SRCFLAGS PREINCLUDES $YASM_PREINCLUDES_VALUE) - .SEM=$ASM_SEM + .SEM=$_ASM_SEM } # tag:src-processing @@ -3219,12 +3219,6 @@ macro _SRC("lua", SRC, SRCFLAGS...) { .PEERDIR=$LUAJIT_PATH } -NVCC_CFLAGS= -when ($IDE_MSVS_CALL == "yes") { - # This is to avoid issues with .pdb from MSVC calling nvcc calling cl - NVCC_CFLAGS+=/Fd$(TEMP) -} - when ($MSVC == "yes") { NVCC_STD=/std:c++${NVCC_STD_VER} } diff --git a/build/ymake_conf.py b/build/ymake_conf.py index 762b6f4e9fe..dc1a6880b74 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -1794,30 +1794,13 @@ class MSVCToolchainOptions(ToolchainOptions): self.under_wine_link = self.under_wine_tools self.under_wine_lib = self.under_wine_tools self.system_msvc = self.params.get('system_msvc', False) - self.ide_msvs = self.params.get('ide_msvs', False) self.use_clang = self.params.get('use_clang', False) self.use_msvc_linker = is_positive('USE_MSVC_LINKER') self.use_arcadia_toolchain = self.params.get('use_arcadia_toolchain', False) self.sdk_version = None - if self.ide_msvs: - bindir = '$(VC_ExecutablePath_x64_x64)\\' - self.c_compiler = bindir + 'cl.exe' - self.cxx_compiler = self.c_compiler - - self.link = bindir + 'link.exe' - self.lib = bindir + 'lib.exe' - self.masm_compiler = bindir + 'ml64.exe' - - self.vc_root = None - - sdk_dir = '$(WindowsSdkDir)' - self.sdk_version = '$(WindowsTargetPlatformVersion)' - self.kit_includes = win_path_fix(os.path.join(sdk_dir, 'Include', self.sdk_version)) - self.kit_libs = win_path_fix(os.path.join(sdk_dir, 'Lib', self.sdk_version)) - - elif detector: + if detector: self.use_clang = is_positive('USE_CLANG_CL') self.masm_compiler = which('ml64.exe') @@ -1900,7 +1883,7 @@ class MSVCToolchain(MSVC, Toolchain): Toolchain.__init__(self, tc, build) MSVC.__init__(self, tc, build) - if self.tc.from_arcadia and not self.tc.ide_msvs: + if self.tc.from_arcadia: if not is_positive('DISABLE_YMAKE_CONF_CUSTOMIZATION'): self.platform_projects.append('build/internal/platform/msvc') self.platform_projects.append('build/platform/wine') @@ -1920,8 +1903,6 @@ class MSVCToolchain(MSVC, Toolchain): emit('_UNDER_WINE_COMPILER', 'yes') if self.tc.use_clang: emit('CLANG_CL', 'yes') - if self.tc.ide_msvs: - emit('IDE_MSVS', 'yes') if self.tc.use_arcadia_toolchain: emit('USE_ARCADIA_TOOLCHAIN', 'yes') emit('_MSVC_TC_KIT_LIBS', self.tc.kit_libs) @@ -1984,8 +1965,8 @@ class MSVCCompiler(MSVC, Compiler): '${hide:CPP_FAKEID}', # FIXME: This is quick fix to let catboost build from MSVS IDE # This place is questionable overall, see YMAKE-437 - '/DARCADIA_ROOT=' + ('${ARCADIA_ROOT}' if not self.tc.ide_msvs else '.'), - '/DARCADIA_BUILD_ROOT=' + ('${ARCADIA_BUILD_ROOT}' if not self.tc.ide_msvs else '.'), + '/DARCADIA_ROOT=${ARCADIA_ROOT}', + '/DARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT}', '/DWIN32', '/D_WIN32', '/D_WINDOWS', @@ -2092,11 +2073,6 @@ class MSVCCompiler(MSVC, Compiler): '-Wno-undefined-var-template', ] - if self.tc.ide_msvs: - cxx_warnings += [ - '-Wno-unused-command-line-argument', - ] - defines.append('/D_WIN32_WINNT={0}'.format(WINDOWS_VERSION_MIN)) if winapi_unicode: @@ -2104,20 +2080,17 @@ class MSVCCompiler(MSVC, Compiler): else: defines += ['/D_MBCS'] - vc_include = win_path_fix(os.path.join(self.tc.vc_root, 'include')) if not self.tc.ide_msvs else "$(VC_VC_IncludePath.Split(';')[0].Replace('\\','/'))" + vc_include = win_path_fix(os.path.join(self.tc.vc_root, 'include')) - if not self.tc.ide_msvs: - def include_flag(path): - return '{flag}"{path}"'.format(path=path, flag='/I ' if not self.tc.use_clang else '-imsvc') + def include_flag(path): + return '{flag}"{path}"'.format(path=path, flag='/I ' if not self.tc.use_clang else '-imsvc') - for name in ('shared', 'ucrt', 'um', 'winrt'): - flags.append(include_flag(win_path_fix(os.path.join(self.tc.kit_includes, name)))) - flags.append(include_flag(vc_include)) + for name in ('shared', 'ucrt', 'um', 'winrt'): + flags.append(include_flag(win_path_fix(os.path.join(self.tc.kit_includes, name)))) + flags.append(include_flag(vc_include)) if self.tc.use_clang: emit('CLANG_CL', 'yes') - if self.tc.ide_msvs: - emit('IDE_MSVS', 'yes') if self.tc.use_arcadia_toolchain: emit('USE_ARCADIA_TOOLCHAIN', 'yes') @@ -2142,7 +2115,7 @@ class MSVCCompiler(MSVC, Compiler): emit('_MSVC_FLAGS', flags) - ucrt_include = win_path_fix(os.path.join(self.tc.kit_includes, 'ucrt')) if not self.tc.ide_msvs else "$(UniversalCRT_IncludePath.Split(';')[0].Replace('\\','/'))" + ucrt_include = win_path_fix(os.path.join(self.tc.kit_includes, 'ucrt')) # clang-cl has '#include_next', and MSVC hasn't. It needs separately specified CRT and VC include directories for libc++ to include second in order standard C and C++ headers. if not self.tc.use_clang: @@ -2171,8 +2144,6 @@ class MSVCLinker(MSVC, Linker): emit('LINK_EXE_FLAGS_PER_TYPE', '$LINK_EXE_FLAGS_RELEASE') if self.build.is_debug: emit('LINK_EXE_FLAGS_PER_TYPE', '$LINK_EXE_FLAGS_DEBUG') - if self.build.is_ide and self.tc.ide_msvs: - emit('LINK_EXE_FLAGS_PER_TYPE', '@[debug|$LINK_EXE_FLAGS_DEBUG]@[release|$LINK_EXE_FLAGS_RELEASE]') print('@import "${CONF_ROOT}/conf/linkers/msvc_linker.conf"') @@ -2425,7 +2396,7 @@ class Cuda(object): mtime = ' --mtime ${tool:"tools/mtime0"} ' custom_pid = '--custom-pid ${tool:"tools/custom_pid"} ' if not self.cuda_use_clang.value: - cmd = '$YMAKE_PYTHON ${input:"build/scripts/compile_cuda.py"}' + mtime + custom_pid + '$NVCC $NVCC_STD $NVCC_FLAGS -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} --cflags $C_FLAGS_PLATFORM $CXXFLAGS $NVCC_STD $NVCC_CFLAGS $SRCFLAGS ${hide;input:"build/platform/cuda/cuda_runtime_include.h"} $NVCC_ENV $CUDA_HOST_COMPILER_ENV ${hide;kv:"p CC"} ${hide;kv:"pc light-green"}' # noqa E501 + cmd = '$YMAKE_PYTHON ${input:"build/scripts/compile_cuda.py"}' + mtime + custom_pid + '$NVCC $NVCC_STD $NVCC_FLAGS -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} --cflags $C_FLAGS_PLATFORM $CXXFLAGS $NVCC_STD $SRCFLAGS ${hide;input:"build/platform/cuda/cuda_runtime_include.h"} $NVCC_ENV $CUDA_HOST_COMPILER_ENV ${hide;kv:"p CC"} ${hide;kv:"pc light-green"}' # noqa E501 else: cmd = '$CXX_COMPILER --cuda-path=$CUDA_ROOT $C_FLAGS_PLATFORM -c ${input:SRC} -o ${output;suf=${OBJ_SUF}${NVCC_OBJ_EXT}:SRC} ${pre=-I:_C__INCLUDE} $CXXFLAGS $SRCFLAGS $TOOLCHAIN_ENV ${hide;kv:"p CU"} ${hide;kv:"pc green"}' # noqa E501 @@ -2540,7 +2511,7 @@ class Cuda(object): 'Y_SDK_Root': '$WINDOWS_KITS_RESOURCE_GLOBAL', } - if not self.build.tc.ide_msvs and not is_positive('DISABLE_YMAKE_CONF_CUSTOMIZATION'): + if not is_positive('DISABLE_YMAKE_CONF_CUSTOMIZATION'): self.peerdirs.append('build/internal/platform/msvc') self.cuda_host_compiler_env.value = format_env(env) self.cuda_host_msvc_version.value = vc_version diff --git a/contrib/python/zope.interface/py3/.dist-info/METADATA b/contrib/python/zope.interface/py3/.dist-info/METADATA index eb379d3172d..279d71d4f08 100644 --- a/contrib/python/zope.interface/py3/.dist-info/METADATA +++ b/contrib/python/zope.interface/py3/.dist-info/METADATA @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: zope.interface -Version: 7.1.1 +Version: 7.2 Summary: Interfaces for Python Home-page: https://github.com/zopefoundation/zope.interface Author: Zope Foundation and Contributors @@ -76,12 +76,22 @@ For detailed documentation, please see https://zopeinterface.readthedocs.io/en/l Changes ========= +7.2 (2024-11-28) +================ + +- Add preliminary support for Python 3.14a2, this means that + ``.common.builtins.IByteString`` and ``.common.collections.IByteString`` are + no longer available from this Python version onwards as Python 3.14 dropped + ``collections.abc.ByteString``. + + 7.1.1 (2024-10-23) ================== - Fix segmentation faults in `weakrefobject.c` on Python 3.12 and 3.13. (`#323 <https://github.com/zopefoundation/zope.interface/issues/323>`_) + 7.1.0 (2024-10-10) ================== diff --git a/contrib/python/zope.interface/py3/ya.make b/contrib/python/zope.interface/py3/ya.make index cb1aa87e6df..fd9015ba6bc 100644 --- a/contrib/python/zope.interface/py3/ya.make +++ b/contrib/python/zope.interface/py3/ya.make @@ -2,7 +2,7 @@ PY3_LIBRARY() -VERSION(7.1.1) +VERSION(7.2) LICENSE(ZPL-2.1) diff --git a/contrib/python/zope.interface/py3/zope/interface/_compat.py b/contrib/python/zope.interface/py3/zope/interface/_compat.py index bc3f8671142..380329532b1 100644 --- a/contrib/python/zope.interface/py3/zope/interface/_compat.py +++ b/contrib/python/zope.interface/py3/zope/interface/_compat.py @@ -22,6 +22,9 @@ import os import sys +PY313_OR_OLDER = sys.version_info < (3, 14) + + def _normalize_name(name): if isinstance(name, bytes): name = str(name, 'ascii') diff --git a/contrib/python/zope.interface/py3/zope/interface/common/builtins.py b/contrib/python/zope.interface/py3/zope/interface/common/builtins.py index 09de5b3b2f8..9e543c83f5b 100644 --- a/contrib/python/zope.interface/py3/zope/interface/common/builtins.py +++ b/contrib/python/zope.interface/py3/zope/interface/common/builtins.py @@ -19,6 +19,7 @@ that they implement the appropriate interface. """ from zope.interface import classImplements +from zope.interface._compat import PY313_OR_OLDER from zope.interface.common import collections from zope.interface.common import io from zope.interface.common import numbers @@ -67,17 +68,18 @@ class ITextString(collections.ISequence): extra_classes = (str,) -class IByteString(collections.IByteString): - """ - Interface for immutable byte strings. +if PY313_OR_OLDER: + class IByteString(collections.IByteString): + """ + Interface for immutable byte strings. - On all Python versions this is :class:`bytes`. + On all Python versions this is :class:`bytes`. - Unlike :class:`zope.interface.common.collections.IByteString` - (the parent of this interface) this does *not* include - :class:`bytearray`. - """ - extra_classes = (bytes,) + Unlike :class:`zope.interface.common.collections.IByteString` + (the parent of this interface) this does *not* include + :class:`bytearray`. + """ + extra_classes = (bytes,) class INativeString(ITextString): diff --git a/contrib/python/zope.interface/py3/zope/interface/common/collections.py b/contrib/python/zope.interface/py3/zope/interface/common/collections.py index 543266d9cf3..defa8a15b94 100644 --- a/contrib/python/zope.interface/py3/zope/interface/common/collections.py +++ b/contrib/python/zope.interface/py3/zope/interface/common/collections.py @@ -38,6 +38,7 @@ from collections import UserList from collections import UserString from collections import abc +from zope.interface._compat import PY313_OR_OLDER from zope.interface.common import ABCInterface from zope.interface.common import optional @@ -190,13 +191,14 @@ class IMutableSequence(ISequence): extra_classes = (UserList,) -class IByteString(ISequence): - """ - This unifies `bytes` and `bytearray`. - """ - abc = _new_in_ver( - 'ByteString', True, (ISequence.getABC(),), (bytes, bytearray), - ) +if PY313_OR_OLDER: + class IByteString(ISequence): + """ + This unifies `bytes` and `bytearray`. + """ + abc = _new_in_ver( + 'ByteString', True, (ISequence.getABC(),), (bytes, bytearray), + ) class ISet(ICollection): diff --git a/contrib/python/zope.interface/py3/zope/interface/common/tests/test_builtins.py b/contrib/python/zope.interface/py3/zope/interface/common/tests/test_builtins.py index cf7019bfc50..3c764392833 100644 --- a/contrib/python/zope.interface/py3/zope/interface/common/tests/test_builtins.py +++ b/contrib/python/zope.interface/py3/zope/interface/common/tests/test_builtins.py @@ -12,6 +12,7 @@ import unittest +from zope.interface._compat import PY313_OR_OLDER from zope.interface.common import builtins from . import VerifyClassMixin @@ -24,16 +25,22 @@ class TestVerifyClass(VerifyClassMixin, pass -add_verify_tests(TestVerifyClass, ( +VERIFY_TESTS = [ (builtins.IList, (list,)), (builtins.ITuple, (tuple,)), (builtins.ITextString, (str,)), - (builtins.IByteString, (bytes,)), (builtins.INativeString, (str,)), (builtins.IBool, (bool,)), (builtins.IDict, (dict,)), (builtins.IFile, ()), -)) + +] +if PY313_OR_OLDER: + VERIFY_TESTS.append( + (builtins.IByteString, (bytes,)) + ) + +add_verify_tests(TestVerifyClass, tuple(VERIFY_TESTS)) class TestVerifyObject(VerifyObjectMixin, diff --git a/contrib/python/zope.interface/py3/zope/interface/interface.py b/contrib/python/zope.interface/py3/zope/interface/interface.py index e5dddb88115..ad8a7de6b36 100644 --- a/contrib/python/zope.interface/py3/zope/interface/interface.py +++ b/contrib/python/zope.interface/py3/zope/interface/interface.py @@ -825,6 +825,8 @@ class InterfaceClass(_InterfaceClassBase): # __firstlineno__: Python 3.13b1+ # https://github.com/python/cpython/pull/118475 '__firstlineno__', + # __classdictcell__: Python 3.14 + '__classdictcell__', ) and aval is not _decorator_non_return # noqa W503 } diff --git a/library/python/runtime_py3/ya.make b/library/python/runtime_py3/ya.make index 05687fdd8fc..0ad7d3e13f7 100644 --- a/library/python/runtime_py3/ya.make +++ b/library/python/runtime_py3/ya.make @@ -29,6 +29,7 @@ IF (CYTHON_COVERAGE) # Let covarage support add all needed files to resources ELSE() RESOURCE_FILES( + DONT_COMPRESS PREFIX ${MODDIR}/ __res.pyx importer.pxi @@ -39,33 +39,33 @@ REGISTRY_ENDPOINT = os.environ.get("YA_REGISTRY_ENDPOINT", "https://devtools-reg PLATFORM_MAP = { "data": { "darwin": { - "md5": "2681da06d5efed12b75718f2458aae68", + "md5": "b81c67cd2cde0a12fe690f1430c99941", "urls": [ - f"{REGISTRY_ENDPOINT}/7631719535" + f"{REGISTRY_ENDPOINT}/7658413669" ] }, "darwin-arm64": { - "md5": "81ac4dc49f0dffdba0ba9ea0b13a77c5", + "md5": "c34587db83d79e32d60183582adb1c01", "urls": [ - f"{REGISTRY_ENDPOINT}/7631718357" + f"{REGISTRY_ENDPOINT}/7658413007" ] }, "linux-aarch64": { - "md5": "5103f6a6d9571ef9315666b4f068992d", + "md5": "0fb37b9d38d74645a40e17496ee5deac", "urls": [ - f"{REGISTRY_ENDPOINT}/7631717025" + f"{REGISTRY_ENDPOINT}/7658412328" ] }, "win32-clang-cl": { - "md5": "27d458347a8bdbc1a2f0dd382fda9ddf", + "md5": "f125434f581643c417f36530354bf23b", "urls": [ - f"{REGISTRY_ENDPOINT}/7631721020" + f"{REGISTRY_ENDPOINT}/7658414238" ] }, "linux": { - "md5": "457ca1c08df27589ed0ead9002a7ef20", + "md5": "2bf185899c8783f9d3bf462abee89470", "urls": [ - f"{REGISTRY_ENDPOINT}/7631722496" + f"{REGISTRY_ENDPOINT}/7658415156" ] } } diff --git a/ydb/ci/rightlib.txt b/ydb/ci/rightlib.txt index 5dcbf2d2181..1378086d5f0 100644 --- a/ydb/ci/rightlib.txt +++ b/ydb/ci/rightlib.txt @@ -1 +1 @@ -fab222fd8176d00eee5ddafc6bce8cb95a6e3ab0 +fab10ff25473117c056fd8c4ec06e7cbc4783cbd diff --git a/yql/essentials/core/yql_type_annotation.cpp b/yql/essentials/core/yql_type_annotation.cpp index 9d8ed5648ac..0c627df4049 100644 --- a/yql/essentials/core/yql_type_annotation.cpp +++ b/yql/essentials/core/yql_type_annotation.cpp @@ -227,7 +227,7 @@ TString FormatColumnOrder(const TMaybe<TColumnOrder>& columnOrder, TMaybe<size_t ss << "["; size_t i = 0; for (auto& [e, gen_e]: *columnOrder) { - + ss << "(" << e << "->" << gen_e << ")"; if (++i != columnOrder->Size()) { ss << ", "; @@ -341,6 +341,10 @@ TString TModuleResolver::NormalizeModuleName(const TString& path) { return path.substr(0, path.size() - 4); } + if (path.EndsWith(".yqls")) { + return path.substr(0, path.size() - 5); + } + return path; } @@ -405,8 +409,9 @@ bool TModuleResolver::AddFromFile(const std::string_view& file, TExprContext& ct const auto fullName = TUserDataStorage::MakeFullName(file); const bool isSql = file.ends_with(".sql"); const bool isYql = file.ends_with(".yql"); - if (!isSql && !isYql) { - ctx.AddError(TIssue(pos, TStringBuilder() << "Unsupported syntax of library file, expected one of (.sql, .yql): " << file)); + const bool isYqls = file.ends_with(".yqls"); + if (!isSql && !isYql && !isYqls) { + ctx.AddError(TIssue(pos, TStringBuilder() << "Unsupported syntax of library file, expected one of (.sql, .yql, .yqls): " << file)); return false; } @@ -450,7 +455,7 @@ bool TModuleResolver::AddFromFile(const std::string_view& file, TExprContext& ct } } - return AddFromMemory(fullName, moduleName, isYql, body, ctx, syntaxVersion, packageVersion, pos); + return AddFromMemory(fullName, moduleName, isYql || isYqls, body, ctx, syntaxVersion, packageVersion, pos); } bool TModuleResolver::AddFromMemory(const std::string_view& file, const TString& body, TExprContext& ctx, ui16 syntaxVersion, ui32 packageVersion, TPosition pos) { @@ -462,8 +467,9 @@ bool TModuleResolver::AddFromMemory(const std::string_view& file, const TString& const auto fullName = TUserDataStorage::MakeFullName(file); const bool isSql = file.ends_with(".sql"); const bool isYql = file.ends_with(".yql"); - if (!isSql && !isYql) { - ctx.AddError(TIssue(pos, TStringBuilder() << "Unsupported syntax of library file, expected one of (.sql, .yql): " << file)); + const bool isYqls = file.ends_with(".yqls"); + if (!isSql && !isYql && !isYqls) { + ctx.AddError(TIssue(pos, TStringBuilder() << "Unsupported syntax of library file, expected one of (.sql, .yql, .yqls): " << file)); return false; } @@ -477,10 +483,10 @@ bool TModuleResolver::AddFromMemory(const std::string_view& file, const TString& } } - return AddFromMemory(fullName, moduleName, isYql, body, ctx, syntaxVersion, packageVersion, pos, exports, imports); + return AddFromMemory(fullName, moduleName, isYql || isYqls, body, ctx, syntaxVersion, packageVersion, pos, exports, imports); } -bool TModuleResolver::AddFromMemory(const TString& fullName, const TString& moduleName, bool isYql, const TString& body, TExprContext& ctx, ui16 syntaxVersion, ui32 packageVersion, TPosition pos, std::vector<TString>* exports, std::vector<TString>* imports) { +bool TModuleResolver::AddFromMemory(const TString& fullName, const TString& moduleName, bool sExpr, const TString& body, TExprContext& ctx, ui16 syntaxVersion, ui32 packageVersion, TPosition pos, std::vector<TString>* exports, std::vector<TString>* imports) { auto query = body; if (QContext.CanRead()) { auto item = QContext.GetReader()->Get({ModuleResolverComponent, fullName}).GetValueSync(); @@ -501,7 +507,7 @@ bool TModuleResolver::AddFromMemory(const TString& fullName, const TString& modu }; TAstParseResult astRes; - if (isYql) { + if (sExpr) { astRes = ParseAst(query, nullptr, fullName); if (!astRes.IsOk()) { ctx.AddError(addSubIssues(TIssue(pos, TStringBuilder() << "Failed to parse YQL: " << fullName), astRes.Issues)); diff --git a/yql/essentials/core/yql_type_annotation.h b/yql/essentials/core/yql_type_annotation.h index 7275801c6c4..05ede6e8979 100644 --- a/yql/essentials/core/yql_type_annotation.h +++ b/yql/essentials/core/yql_type_annotation.h @@ -104,7 +104,7 @@ public: TString GetFileAliasPrefix() const override; private: - bool AddFromMemory(const TString& fullName, const TString& moduleName, bool isYql, const TString& body, TExprContext& ctx, ui16 syntaxVersion, ui32 packageVersion, TPosition pos, std::vector<TString>* exports = nullptr, std::vector<TString>* imports = nullptr); + bool AddFromMemory(const TString& fullName, const TString& moduleName, bool sExpr, const TString& body, TExprContext& ctx, ui16 syntaxVersion, ui32 packageVersion, TPosition pos, std::vector<TString>* exports = nullptr, std::vector<TString>* imports = nullptr); THashMap<TString, TLibraryCohesion> FilterLibsByVersion() const; static TString ExtractPackageNameFromModule(TStringBuf moduleName); TString SubstParameters(const TString& str); diff --git a/yql/essentials/sql/v1/node.cpp b/yql/essentials/sql/v1/node.cpp index 31d72385ca7..2339fa894e7 100644 --- a/yql/essentials/sql/v1/node.cpp +++ b/yql/essentials/sql/v1/node.cpp @@ -91,6 +91,14 @@ void INode::MarkImplicitLabel(bool isImplicitLabel) { ImplicitLabel = isImplicitLabel; } +void INode::SetRefPos(TPosition pos) { + RefPos = pos; +} + +TMaybe<TPosition> INode::GetRefPos() const { + return RefPos; +} + void INode::SetCountHint(bool isCount) { State.Set(ENodeState::CountHint, isCount); } diff --git a/yql/essentials/sql/v1/node.h b/yql/essentials/sql/v1/node.h index c2c46c60775..ba14584543c 100644 --- a/yql/essentials/sql/v1/node.h +++ b/yql/essentials/sql/v1/node.h @@ -140,6 +140,8 @@ namespace NSQLTranslationV1 { void SetLabel(const TString& label, TMaybe<TPosition> pos = {}); bool IsImplicitLabel() const; void MarkImplicitLabel(bool isImplicitLabel); + void SetRefPos(TPosition pos); + TMaybe<TPosition> GetRefPos() const; void SetCountHint(bool isCount); bool GetCountHint() const; @@ -276,6 +278,7 @@ namespace NSQLTranslationV1 { TString Label; TMaybe<TPosition> LabelPos; bool ImplicitLabel = false; + TMaybe<TPosition> RefPos; mutable TNodeState State; bool AsInner = false; bool DisableSort_ = false; diff --git a/yql/essentials/sql/v1/select.cpp b/yql/essentials/sql/v1/select.cpp index d2e4c0a8749..1442215e15c 100644 --- a/yql/essentials/sql/v1/select.cpp +++ b/yql/essentials/sql/v1/select.cpp @@ -124,6 +124,10 @@ public: Node = Y("SingleMember", Y("SqlAccess", Q("dict"), Y("Take", Node, Y("Uint64", Q("1"))), Y("Uint64", Q("0")))); } else { ctx.Error(Pos) << "Source used in expression should contain one concrete column"; + if (RefPos) { + ctx.Error(*RefPos) << "Source is used here"; + } + return false; } } @@ -565,6 +569,10 @@ public: Node = Y("SingleMember", Y("SqlAccess", Q("dict"), Y("Take", Node, Y("Uint64", Q("1"))), Y("Uint64", Q("0")))); } else { ctx.Error(Pos) << "Source used in expression should contain one concrete column"; + if (RefPos) { + ctx.Error(*RefPos) << "Source is used here"; + } + return false; } } diff --git a/yql/essentials/sql/v1/sql_expression.cpp b/yql/essentials/sql/v1/sql_expression.cpp index 1f506991a2c..675d36ed464 100644 --- a/yql/essentials/sql/v1/sql_expression.cpp +++ b/yql/essentials/sql/v1/sql_expression.cpp @@ -1152,7 +1152,12 @@ TNodePtr TSqlExpression::BindParameterRule(const TRule_bind_parameter& rule, con return {}; } Ctx.IncrementMonCounter("sql_features", "NamedNodeUseAtom"); - return GetNamedNode(namedArg); + auto ret = GetNamedNode(namedArg); + if (ret) { + ret->SetRefPos(Ctx.Pos()); + } + + return ret; } TNodePtr TSqlExpression::LambdaRule(const TRule_lambda& rule) { diff --git a/yql/essentials/sql/v1/sql_into_tables.cpp b/yql/essentials/sql/v1/sql_into_tables.cpp index 43cc08de0d7..ac9ce53061a 100644 --- a/yql/essentials/sql/v1/sql_into_tables.cpp +++ b/yql/essentials/sql/v1/sql_into_tables.cpp @@ -124,6 +124,7 @@ TNodePtr TSqlIntoTable::Build(const TRule_into_table_stmt& node) { return nullptr; } + named->SetRefPos(Ctx.Pos()); if (cluster.Empty()) { Ctx.Error() << "No cluster name given and no default cluster is selected"; return nullptr; diff --git a/yql/essentials/sql/v1/sql_ut.cpp b/yql/essentials/sql/v1/sql_ut.cpp index 3ef964fa0d4..0cb626f5b03 100644 --- a/yql/essentials/sql/v1/sql_ut.cpp +++ b/yql/essentials/sql/v1/sql_ut.cpp @@ -5040,6 +5040,45 @@ select FormatType($f()); )"; ExpectFailWithError(query, "<main>:2:33: Error: Aggregation function Min requires exactly 1 argument(s), given: 2\n"); } + + Y_UNIT_TEST(ScalarContextUsage1) { + TString query = R"( + $a = (select 1 as x, 2 as y); + select 1 + $a; + )"; + ExpectFailWithError(query, "<main>:2:39: Error: Source used in expression should contain one concrete column\n" + "<main>:3:24: Error: Source is used here\n"); + } + + Y_UNIT_TEST(ScalarContextUsage2) { + TString query = R"( + use plato; + $a = (select 1 as x, 2 as y); + select * from concat($a); + )"; + ExpectFailWithError(query, "<main>:3:39: Error: Source used in expression should contain one concrete column\n" + "<main>:4:34: Error: Source is used here\n"); + } + + Y_UNIT_TEST(ScalarContextUsage3) { + TString query = R"( + use plato; + $a = (select 1 as x, 2 as y); + select * from range($a); + )"; + ExpectFailWithError(query, "<main>:3:39: Error: Source used in expression should contain one concrete column\n" + "<main>:4:33: Error: Source is used here\n"); + } + + Y_UNIT_TEST(ScalarContextUsage4) { + TString query = R"( + use plato; + $a = (select 1 as x, 2 as y); + insert into $a select 1; + )"; + ExpectFailWithError(query, "<main>:3:39: Error: Source used in expression should contain one concrete column\n" + "<main>:4:25: Error: Source is used here\n"); + } } void CheckUnused(const TString& req, const TString& symbol, unsigned row, unsigned col) { diff --git a/yql/essentials/sql/v1/sql_ut_antlr4.cpp b/yql/essentials/sql/v1/sql_ut_antlr4.cpp index c3c5f9c9833..ae2ef947592 100644 --- a/yql/essentials/sql/v1/sql_ut_antlr4.cpp +++ b/yql/essentials/sql/v1/sql_ut_antlr4.cpp @@ -5037,6 +5037,45 @@ select FormatType($f()); )"; ExpectFailWithError(query, "<main>:2:33: Error: Aggregation function Min requires exactly 1 argument(s), given: 2\n"); } + + Y_UNIT_TEST(ScalarContextUsage1) { + TString query = R"( + $a = (select 1 as x, 2 as y); + select 1 + $a; + )"; + ExpectFailWithError(query, "<main>:2:39: Error: Source used in expression should contain one concrete column\n" + "<main>:3:24: Error: Source is used here\n"); + } + + Y_UNIT_TEST(ScalarContextUsage2) { + TString query = R"( + use plato; + $a = (select 1 as x, 2 as y); + select * from concat($a); + )"; + ExpectFailWithError(query, "<main>:3:39: Error: Source used in expression should contain one concrete column\n" + "<main>:4:34: Error: Source is used here\n"); + } + + Y_UNIT_TEST(ScalarContextUsage3) { + TString query = R"( + use plato; + $a = (select 1 as x, 2 as y); + select * from range($a); + )"; + ExpectFailWithError(query, "<main>:3:39: Error: Source used in expression should contain one concrete column\n" + "<main>:4:33: Error: Source is used here\n"); + } + + Y_UNIT_TEST(ScalarContextUsage4) { + TString query = R"( + use plato; + $a = (select 1 as x, 2 as y); + insert into $a select 1; + )"; + ExpectFailWithError(query, "<main>:3:39: Error: Source used in expression should contain one concrete column\n" + "<main>:4:25: Error: Source is used here\n"); + } } void CheckUnused(const TString& req, const TString& symbol, unsigned row, unsigned col) { diff --git a/yql/essentials/tests/sql/sql2yql/canondata/result.json b/yql/essentials/tests/sql/sql2yql/canondata/result.json index e73aa91e9e2..ab345774f4e 100644 --- a/yql/essentials/tests/sql/sql2yql/canondata/result.json +++ b/yql/essentials/tests/sql/sql2yql/canondata/result.json @@ -10653,6 +10653,13 @@ "uri": "https://{canondata_backend}/1937429/434276f26b2857be3c5ad3fdbbf877d2bf775ac5/resource.tar.gz#test_sql2yql.test_library-library_via_http_/sql.yql" } ], + "test_sql2yql.test[library-library_yqls]": [ + { + "checksum": "da2872b19c48276062e74b52d7310e26", + "size": 1082, + "uri": "https://{canondata_backend}/1937001/cf140a1b2b53c08f9746ee7c7b322863316889f0/resource.tar.gz#test_sql2yql.test_library-library_yqls_/sql.yql" + } + ], "test_sql2yql.test[library-package]": [ { "checksum": "106486465eec39d06f2253ff07547c25", @@ -27580,6 +27587,11 @@ "uri": "file://test_sql_format.test_library-library_via_http_/formatted.sql" } ], + "test_sql_format.test[library-library_yqls]": [ + { + "uri": "file://test_sql_format.test_library-library_yqls_/formatted.sql" + } + ], "test_sql_format.test[library-package]": [ { "uri": "file://test_sql_format.test_library-package_/formatted.sql" @@ -32262,9 +32274,9 @@ ], "test_sql_negative.test[select-autoextract_source_value_in_where-default.txt]": [ { - "checksum": "0a04f9617e0bd69931c6f09f4579ad25", - "size": 237, - "uri": "https://{canondata_backend}/1937429/434276f26b2857be3c5ad3fdbbf877d2bf775ac5/resource.tar.gz#test_sql_negative.test_select-autoextract_source_value_in_where-default.txt_/err_file.out" + "checksum": "8dae30c2b591ac52d6135d1fdc127b81", + "size": 347, + "uri": "https://{canondata_backend}/1889210/2ddfda0b16ee484b8c32025195f554d885acf48d/resource.tar.gz#test_sql_negative.test_select-autoextract_source_value_in_where-default.txt_/err_file.out" } ], "test_sql_negative.test[select-normalize_name-default.txt]": [ @@ -32290,9 +32302,9 @@ ], "test_sql_negative.test[select-use_subrequest_as_table-default.txt]": [ { - "checksum": "b487c7081e29ca693370513c4786c0b5", - "size": 134, - "uri": "https://{canondata_backend}/1937429/434276f26b2857be3c5ad3fdbbf877d2bf775ac5/resource.tar.gz#test_sql_negative.test_select-use_subrequest_as_table-default.txt_/err_file.out" + "checksum": "e0ce66df53204c1c27e622ecb103c627", + "size": 289, + "uri": "https://{canondata_backend}/1889210/2ddfda0b16ee484b8c32025195f554d885acf48d/resource.tar.gz#test_sql_negative.test_select-use_subrequest_as_table-default.txt_/err_file.out" } ], "test_sql_negative.test[udf-named_args_for_script_with_wrong_order-default.txt]": [ diff --git a/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_library-library_yqls_/formatted.sql b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_library-library_yqls_/formatted.sql new file mode 100644 index 00000000000..84fd1a4451b --- /dev/null +++ b/yql/essentials/tests/sql/sql2yql/canondata/test_sql_format.test_library-library_yqls_/formatted.sql @@ -0,0 +1,7 @@ +PRAGMA library("lib1.yqls"); + +IMPORT lib1 SYMBOLS $sqr; + +SELECT + $sqr(10) +; diff --git a/yql/essentials/tests/sql/suites/library/lib1.yqls.txt b/yql/essentials/tests/sql/suites/library/lib1.yqls.txt new file mode 100644 index 00000000000..c53ec8e756b --- /dev/null +++ b/yql/essentials/tests/sql/suites/library/lib1.yqls.txt @@ -0,0 +1,4 @@ +( +(let $sqr (lambda '($x) (* $x $x))) +(export $sqr) +) diff --git a/yql/essentials/tests/sql/suites/library/library_yqls.cfg b/yql/essentials/tests/sql/suites/library/library_yqls.cfg new file mode 100644 index 00000000000..d66b4537eab --- /dev/null +++ b/yql/essentials/tests/sql/suites/library/library_yqls.cfg @@ -0,0 +1 @@ +file lib1.yqls lib1.yqls.txt diff --git a/yql/essentials/tests/sql/suites/library/library_yqls.sql b/yql/essentials/tests/sql/suites/library/library_yqls.sql new file mode 100644 index 00000000000..393249f2170 --- /dev/null +++ b/yql/essentials/tests/sql/suites/library/library_yqls.sql @@ -0,0 +1,4 @@ +pragma library("lib1.yqls"); +import lib1 symbols $sqr; +select $sqr(10); + diff --git a/yql/essentials/utils/oom_helper/inject.cpp b/yql/essentials/utils/oom_helper/inject.cpp new file mode 100644 index 00000000000..089d1a3b24f --- /dev/null +++ b/yql/essentials/utils/oom_helper/inject.cpp @@ -0,0 +1,48 @@ +#include <unistd.h> +#include <sys/mman.h> +#include <errno.h> +#include <stdint.h> +#include <limits.h> +#include <stdio.h> +#include <sys/syscall.h> + + +#define SYSCALL_MMAP2_UNIT 4096ULL +#define UNIT SYSCALL_MMAP2_UNIT +#define OFF_MASK ((-0x2000ULL << (8*sizeof(long)-1)) | (UNIT-1)) + +void *__mmap(void *start, size_t len, int prot, int flags, int fd, off_t off) +{ + void* ret = (void*)-1; + if (off & OFF_MASK) { + errno = EINVAL; + return ret; + } + if (len >= PTRDIFF_MAX) { + errno = ENOMEM; + return ret; + } +#ifdef SYS_mmap2 + ret = (void*)syscall(SYS_mmap2, start, len, prot, flags, fd, off/UNIT); +#else + ret = (void*)syscall(SYS_mmap, start, len, prot, flags, fd, off); +#endif + /* Fixup incorrect EPERM from kernel. */ + if (ret == (void*)-1 && errno == EPERM && !start && (flags & MAP_ANON) && !(flags & MAP_FIXED)) { + errno = ENOMEM; + return (void*)-1; + } + + return ret; +} + + +void *mmap(void *start, size_t len, int prot, int flags, int fd, off_t off) +{ + auto res = __mmap(start, len, prot, flags, fd, off); + if (res == (void*) -1 && errno == ENOMEM) { + fprintf(stderr, "mmap failed with ENOMEM\n"); + _exit(2); + } + return res; +} diff --git a/yql/essentials/utils/oom_helper/ya.make b/yql/essentials/utils/oom_helper/ya.make new file mode 100644 index 00000000000..6049debee44 --- /dev/null +++ b/yql/essentials/utils/oom_helper/ya.make @@ -0,0 +1,8 @@ +IF (OS_LINUX) + LIBRARY(oom_helper) + SRCS(inject.cpp) + END() +ELSE() + LIBRARY() + END() +ENDIF() diff --git a/yql/essentials/utils/ya.make b/yql/essentials/utils/ya.make index 768c5538b98..e42fe3e369c 100644 --- a/yql/essentials/utils/ya.make +++ b/yql/essentials/utils/ya.make @@ -63,6 +63,7 @@ IF (OPENSOURCE_PROJECT != "yt") log memory_profiling network + oom_helper signals sys test_http_server |
