aboutsummaryrefslogtreecommitdiffstats
path: root/build/conf/proto.conf
diff options
context:
space:
mode:
authorvpozdyayev <vpozdyayev@yandex-team.com>2024-10-17 05:53:05 +0300
committervpozdyayev <vpozdyayev@yandex-team.com>2024-10-17 06:05:29 +0300
commite32c333ec89518990261e57edeeacae47c954a93 (patch)
tree18ac477bd07e756aa404b16a71c673ba7c327974 /build/conf/proto.conf
parent7f20b8a02aba71899d6a0271a92fdb685771c8b8 (diff)
downloadydb-e32c333ec89518990261e57edeeacae47c954a93.tar.gz
More mod ordering
commit_hash:a6f9325e26045597decde41f1fe1a18707c1224f
Diffstat (limited to 'build/conf/proto.conf')
-rw-r--r--build/conf/proto.conf46
1 files changed, 23 insertions, 23 deletions
diff --git a/build/conf/proto.conf b/build/conf/proto.conf
index b53adb1256..0f906cabab 100644
--- a/build/conf/proto.conf
+++ b/build/conf/proto.conf
@@ -150,8 +150,8 @@ macro _PROTO_PLUGIN_ARGS_BASE(Name, Tool, OutParm...) {
# tag:proto tag:python-specific
macro _ADD_PY_PROTO_OUT(Suf) {
- SET_APPEND(PY_PROTO_OUTS \${output;hide;noauto;norel;nopath;noext;suf=$Suf:File})
- SET_APPEND(PY_PROTO_OUTS_INTERNAL \${output;hide;noauto;norel;nopath;noext;suf=__int${_PYTHON_VER}__$Suf:File} \${hide;kv:"ext_out_name_for_\${nopath;noext;suf=__int${_PYTHON_VER}__$Suf:File} \${nopath;noext;suf=$Suf:File}"})
+ SET_APPEND(PY_PROTO_OUTS \${hide;noauto;output;norel;nopath;noext;suf=$Suf:File})
+ SET_APPEND(PY_PROTO_OUTS_INTERNAL \${hide;noauto;output;norel;nopath;noext;suf=__int${_PYTHON_VER}__$Suf:File} \${hide;kv:"ext_out_name_for_\${nopath;noext;suf=__int${_PYTHON_VER}__$Suf:File} \${nopath;noext;suf=$Suf:File}"})
# XXX fix variable expansion in plugins
SET(PY_PROTO_SUFFIXES $PY_PROTO_SUFFIXES $Suf)
}
@@ -210,7 +210,7 @@ macro WITH_KOTLIN_GRPC() {
# tag:proto tag:cpp-specific
macro _ADD_CPP_PROTO_OUT(Suf) {
- .SEM=append_target_property PROTOC_EXTRA_OUTS $Suf ${output;hide;suf=.o:Suf} $_ADD_SEM_PROP_IF_NON_EMPTY(PROTO_NAMESPACE $PROTO_NAMESPACE)
+ .SEM=append_target_property PROTOC_EXTRA_OUTS $Suf ${hide;output;suf=.o:Suf} $_ADD_SEM_PROP_IF_NON_EMPTY(PROTO_NAMESPACE $PROTO_NAMESPACE)
SET_APPEND(CPP_PROTO_OUTS \${output;norel;nopath;noext;suf=$Suf:File})
SET_APPEND(PROTOC_EXTRA_OUTS_SEM && protoc_extra_outs $Suf)
@@ -228,7 +228,7 @@ CPP_PROTOBUF_PEERS=
### Define protoc plugin for C++ with given Name that emits code into regular outputs
### using Tool. Extra dependencies are passed via DEPS.
macro CPP_PROTO_PLUGIN0(NAME, TOOL, DEPS[], EXTRA_OUT_FLAG="") {
- .SEM=target_proto_plugin $NAME ${tool;rootrel:TOOL} ${output;hide;suf=.fake.o:NAME} && target_macroses-ITEM && target_macroses-macro target_proto_plugin && target_macroses-args $NAME ${tool;rootrel:TOOL} ${output;hide;suf=.fake.o:NAME}
+ .SEM=target_proto_plugin $NAME ${tool;rootrel:TOOL} ${hide;output;suf=.fake.o:NAME} && target_macroses-ITEM && target_macroses-macro target_proto_plugin && target_macroses-args $NAME ${tool;rootrel:TOOL} ${hide;output;suf=.fake.o:NAME}
SET_APPEND(CPP_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL $EXTRA_OUT_FLAG))
# XXX fix variable expansion in plugins
@@ -256,7 +256,7 @@ macro CPP_PROTO_PLUGIN2(NAME, TOOL, SUF1, SUF2, DEPS[], EXTRA_OUT_FLAG="") {
CPP_PROTO_PLUGIN($NAME $TOOL $SUF1 DEPS $DEPS ${pre=EXTRA_OUT_FLAG :EXTRA_OUT_FLAG})
_ADD_CPP_PROTO_OUT($SUF2)
- SET_APPEND(CPP_PROTO_OUTS_SEM \${output;hide;norel;nopath;noext;suf=$SUF2:File})
+ SET_APPEND(CPP_PROTO_OUTS_SEM \${hide;output;norel;nopath;noext;suf=$SUF2:File})
}
# tag:proto
@@ -357,7 +357,7 @@ GO_PROTOBUF_WELLKNOWN_TYPES=\
### Ext using Tool. Extra dependencies are passed via DEPS.
macro GO_PROTO_PLUGIN(NAME, EXT, TOOL, DEPS[]) {
SET_APPEND(GO_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE($NAME $TOOL))
- SET_APPEND(GO_PROTO_OUTS \${output;hide;noauto;norel;nopath;noext;suf=$EXT:File})
+ SET_APPEND(GO_PROTO_OUTS \${hide;noauto;output;norel;nopath;noext;suf=$EXT:File})
PEERDIR(${DEPS})
}
@@ -366,7 +366,7 @@ GO_PROTO_CMDLINE=${cwd;rootdir;input:File} $YMAKE_PYTHON3 ${input:"build/scripts
# tag:go-specific tag:proto
macro _GO_PROTO_CMD_IMPL(File, OPTS...) {
- .CMD=$GO_PROTO_CMDLINE $OPTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .CMD=$GO_PROTO_CMDLINE $OPTS ${hide;kv:"p PB"} ${hide;kv:"pc yellow"}
.PEERDIR=${GO_PROTOBUF_IMPORTS} ${GO_PROTOBUF_WELLKNOWN_TYPES}
.ADDINCL=FOR proto ${PROTOBUF_INCLUDE_PATH}
}
@@ -381,7 +381,7 @@ macro _GO_PROTO_CMD(File) {
###
### Generate .yson.go from .proto using yt/yt/orm/go/codegen/yson/internal/proto-yson-gen/cmd/proto-yson-gen
macro YT_ORM_PROTO_YSON(OUT_OPTS[], Files...) {
- .CMD=${cwd:BINDIR} $PROTOC --plugin=protoc-gen-custom=${tool:"yt/yt/orm/go/codegen/yson/internal/proto-yson-gen/cmd/proto-yson-gen"} -I=${ARCADIA_ROOT}/${PROTO_NAMESPACE} ${pre=-I=:_PROTO__INCLUDE} -I=${ARCADIA_ROOT} --custom_out="$OUT_OPTS paths=base_name:." --custom_opt="goroot=${GO_TOOLS_ROOT}" $_PROTOC_FLAGS ${input:Files} ${output;hide;noauto;nopath;noext;suf=.yson.go:Files} ${hide:PROTO_FAKEID}
+ .CMD=${cwd:BINDIR} $PROTOC --plugin=protoc-gen-custom=${tool:"yt/yt/orm/go/codegen/yson/internal/proto-yson-gen/cmd/proto-yson-gen"} -I=${ARCADIA_ROOT}/${PROTO_NAMESPACE} ${pre=-I=:_PROTO__INCLUDE} -I=${ARCADIA_ROOT} --custom_out="$OUT_OPTS paths=base_name:." --custom_opt="goroot=${GO_TOOLS_ROOT}" $_PROTOC_FLAGS ${input:Files} ${hide;noauto;output;nopath;noext;suf=.yson.go:Files} ${hide:PROTO_FAKEID}
.ADDINCL=FOR proto ${ARCADIA_ROOT}/${MODDIR} FOR proto ${ARCADIA_ROOT}/${GO_TEST_IMPORT_PATH} FOR proto yt ${ARCADIA_BUILD_ROOT}/yt FOR proto ${PROTOBUF_INCLUDE_PATH}
.PEERDIR=$GOSTD/strings $GOSTD/fmt $GOSTD/errors $GOSTD/encoding/json library/go/core/xerrors yt/go/yson yt/go/yterrors yt/yt/orm/go/codegen/yson/ytypes contrib/libs/protobuf
@@ -389,7 +389,7 @@ macro YT_ORM_PROTO_YSON(OUT_OPTS[], Files...) {
_SEM_CPP_PROTO_CMD=target_proto_messages PRIVATE ${input:File} \
&& target_options-privates-ITEM && target_options-privates-option target_proto_messages && target_options-privates-args ${input:File} \
- $CPP_PROTO_OUTS_SEM ${output;hide;suf=${OBJ_SUF}.pb.o:File} $DEFAULT_PROTOC_TOOLS \
+ $CPP_PROTO_OUTS_SEM ${hide;output;suf=${OBJ_SUF}.pb.o:File} $DEFAULT_PROTOC_TOOLS \
$PROTOC_EXTRA_OUTS_SEM \
&& set_global_flags COMMON_PROTOC_FLAGS \
&& platform_vars-COMMON_PROTOC_FLAGS "" \
@@ -400,20 +400,20 @@ _SEM_CPP_PROTO_CMD=target_proto_messages PRIVATE ${input:File} \
# tag:proto
macro _CPP_PROTO_CMD(File) {
- .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS ${hide;kv:"p PB"} ${hide;kv:"pc yellow"}
.SEM=$_SEM_CPP_PROTO_CMD
.PEERDIR=contrib/libs/protobuf
}
# tag:proto
macro _CPP_VANILLA_PROTO_CMD(File) {
- .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .CMD=$CPP_PROTO_CMDLINE $CPP_PROTO_OPTS ${hide;kv:"p PB"} ${hide;kv:"pc yellow"}
.PEERDIR=contrib/libs/protobuf_std
}
_SEM_CPP_EV_CMD=target_ev_messages PRIVATE ${input:File} \
&& target_options-privates-ITEM && target_options-privates-option target_ev_messages && target_options-privates-args ${input:File} \
- $CPP_EV_OUTS_SEM ${output;hide;suf=${OBJ_SUF}.pb.o:File} ${hide;tool:"tools/event2cpp/bin"} $DEFAULT_PROTOC_TOOLS \
+ $CPP_EV_OUTS_SEM ${hide;output;suf=${OBJ_SUF}.pb.o:File} ${hide;tool:"tools/event2cpp/bin"} $DEFAULT_PROTOC_TOOLS \
&& set_global_flags COMMON_PROTOC_FLAGS \
&& platform_vars-COMMON_PROTOC_FLAGS "" \
&& target_proto_outs --cpp_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $PROTOC_STYLEGUIDE_OUT --event2cpp_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE \
@@ -423,7 +423,7 @@ _SEM_CPP_EV_CMD=target_ev_messages PRIVATE ${input:File} \
# tag:proto
macro _CPP_EVLOG_CMD(File) {
- .CMD=$CPP_EV_CMDLINE $CPP_EV_OPTS ${kv;hide:"p EV"} ${kv;hide:"pc yellow"}
+ .CMD=$CPP_EV_CMDLINE $CPP_EV_OPTS ${hide;kv:"p EV"} ${hide;kv:"pc yellow"}
.SEM=$_SEM_CPP_EV_CMD
.PEERDIR=library/cpp/eventlog contrib/libs/protobuf
}
@@ -431,14 +431,14 @@ macro _CPP_EVLOG_CMD(File) {
# tag:proto
macro _CPP_PROTO_EVLOG_CMD(File) {
# process .proto as .ev
- .CMD=$CPP_PROTO_CMDLINE $CPP_EV_OPTS ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .CMD=$CPP_PROTO_CMDLINE $CPP_EV_OPTS ${hide;kv:"p PB"} ${hide;kv:"pc yellow"}
.PEERDIR=library/cpp/eventlog contrib/libs/protobuf
}
# tag:proto
macro _CPP_CFGPROTO_CMD(File) {
# keep extension in output just as in EV: this is hard-coded behaviour of protoc for non-.proto extensions
- .CMD=$CPP_EV_CMDLINE --plugin=protoc-gen-config=${tool:"library/cpp/proto_config/plugin"} --config_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .CMD=$CPP_EV_CMDLINE --plugin=protoc-gen-config=${tool:"library/cpp/proto_config/plugin"} --config_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${hide;kv:"p PB"} ${hide;kv:"pc yellow"}
.PEERDIR=library/cpp/proto_config/codegen library/cpp/proto_config/protos contrib/libs/protobuf
}
@@ -458,7 +458,7 @@ macro NO_MYPY() {
# tag:proto tag:python-specific
macro _PY_PROTO_CMD_BASE(File, Suf, Args...) {
- .CMD=$PY_PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_INCLUDE_PATH --python_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $_PROTOC_FLAGS ${input;rootrel:File} ${output;main;hide;noauto;norel;nopath;noext;suf=$Suf:File} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} $Args ${hide:PROTO_FAKEID}
+ .CMD=$PY_PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_INCLUDE_PATH --python_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE $_PROTOC_FLAGS ${input;rootrel:File} ${output;main;hide;noauto;norel;nopath;noext;suf=$Suf:File} ${hide;kv:"p PB"} ${hide;kv:"pc yellow"} $Args ${hide:PROTO_FAKEID}
}
# tag:proto tag:python-specific
@@ -505,7 +505,7 @@ otherwise {
KOTLIN_PROTO_FLAGS=
# tag:proto tag:java-specific
macro _JAVA_PROTO_CMD(File) {
- .CMD=${cwd;rootdir;input:File} $YMAKE_PYTHON ${input:"build/scripts/tared_protoc.py"} --tar-output ${output;norel;nopath;noext;suf=.jsrc:File} --protoc-out-dir $ARCADIA_BUILD_ROOT/java_out $JAVA_PROTOC -I=./$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_ROOT --java_out=${_JAVA_PROTO_LITE_ARG}$ARCADIA_BUILD_ROOT/java_out ${KOTLIN_PROTO_FLAGS} $_PROTOC_FLAGS ${input;rootrel:File} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} $JAVA_PROTO_ARGS ${hide:PROTO_FAKEID}
+ .CMD=${cwd;rootdir;input:File} $YMAKE_PYTHON ${input:"build/scripts/tared_protoc.py"} --tar-output ${output;norel;nopath;noext;suf=.jsrc:File} --protoc-out-dir $ARCADIA_BUILD_ROOT/java_out $JAVA_PROTOC -I=./$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_ROOT --java_out=${_JAVA_PROTO_LITE_ARG}$ARCADIA_BUILD_ROOT/java_out ${KOTLIN_PROTO_FLAGS} $_PROTOC_FLAGS ${input;rootrel:File} ${hide;kv:"p PB"} ${hide;kv:"pc yellow"} $JAVA_PROTO_ARGS ${hide:PROTO_FAKEID}
.SEM=proto_files ${input;rootrel:File} ${hide;output:File.jsrc}
}
@@ -544,7 +544,7 @@ macro _PY_EVLOG_CMD_INTERNAL(File) {
# tag:java-specific tag:proto
macro _JAVA_EVLOG_CMD(File) {
- .CMD=$COPY_CMD ${input:File} ${output;nopath;noext;norel;suf=_ev.proto:File} ${kv;hide:"p EV"} ${kv;hide:"pc yellow"}
+ .CMD=$COPY_CMD ${input:File} ${output;nopath;noext;norel;suf=_ev.proto:File} ${hide;kv:"p EV"} ${hide;kv:"pc yellow"}
.PEERDIR=library/cpp/eventlog/proto
}
@@ -583,7 +583,7 @@ macro GRPC_WITH_GMOCK() {
SET(_GRPC_GMOCK_OUTFLAG EXTRA_OUT_FLAG generate_mock_code=true)
GRPC()
_ADD_CPP_PROTO_OUT(_mock$_GRPC_SUF_H)
- SET_APPEND(CPP_PROTO_OUTS_SEM ${output;hide;norel;nopath;noext;suf=_mock$_GRPC_SUF_H:File})
+ SET_APPEND(CPP_PROTO_OUTS_SEM ${hide;output;norel;nopath;noext;suf=_mock$_GRPC_SUF_H:File})
}
macro GO_PROTO_USE_V2() {
@@ -638,13 +638,13 @@ macro _GENERATE_PY_EVS_INTERNAL(FILES...) {
###
### TODO: proper implementation needed
macro LIST_PROTO(TO="files.proto", Files...) {
- .CMD=$YMAKE_PYTHON3 ${input:"build/scripts/list.py"} ${Files} ${input;hide:Files} ${stdout;output;noauto:TO} ${output_include;from_input;hide:Files}
+ .CMD=$YMAKE_PYTHON3 ${input:"build/scripts/list.py"} ${Files} ${hide;input:Files} ${stdout;noauto;output:TO} ${output_include;from_input;hide:Files}
_COMPILE_LIST_PROTO(${TO})
_EXPOSE(${TO})
}
macro _COMPILE_LIST_PROTO(SRC) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${input;hide:SRC} ${output;noext;suf=.pb.h:SRC}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${hide;input:SRC} ${output;noext;suf=.pb.h:SRC}
}
# tag:proto
@@ -652,8 +652,8 @@ macro _PROTO_DESC_RAWPROTO_CMD(File) {
.CMD=${cwd;rootdir;input:File} $YMAKE_PYTHON3 ${input:"build/scripts/desc_rawproto_wrapper.py"} --desc-output ${output;suf=.desc:File} --rawproto-output ${output;norel;suf=.${_MODDIR_HASH}.rawproto:File} --proto-file ${input;rootrel:File} -- $PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_INCLUDE_PATH --include_source_info $_PROTOC_FLAGS ${hide:PROTO_FAKEID}
}
-_PROTO_DESC_MERGE_CMD=$YMAKE_PYTHON3 ${input:"build/scripts/merge_files.py"} $TARGET ${ext=.desc:AUTO_INPUT} ${kv;hide:"p PD"} ${kv;hide:"pc light-cyan"} && ${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/collect_rawproto.py"} --output ${output;suf=.protosrc:REALPRJNAME} ${rootrel;ext=.rawproto:AUTO_INPUT}
-_PROTO_DESC_MERGE_PEERS_CMD=$YMAKE_PYTHON3 ${input:"build/scripts/merge_files.py"} $TARGET $PEERS ${ext=.protodesc:SRCS_GLOBAL} ${kv;hide:"p PD"} ${kv;hide:"pc light-cyan"} && ${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/merge_protosrc.py"} --output ${output;suf=.tar:REALPRJNAME} ${rootrel:PEERS}
+_PROTO_DESC_MERGE_CMD=$YMAKE_PYTHON3 ${input:"build/scripts/merge_files.py"} $TARGET ${ext=.desc:AUTO_INPUT} ${hide;kv:"p PD"} ${hide;kv:"pc light-cyan"} && ${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/collect_rawproto.py"} --output ${output;suf=.protosrc:REALPRJNAME} ${rootrel;ext=.rawproto:AUTO_INPUT}
+_PROTO_DESC_MERGE_PEERS_CMD=$YMAKE_PYTHON3 ${input:"build/scripts/merge_files.py"} $TARGET $PEERS ${ext=.protodesc:SRCS_GLOBAL} ${hide;kv:"p PD"} ${hide;kv:"pc light-cyan"} && ${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON3 ${input:"build/scripts/merge_protosrc.py"} --output ${output;suf=.tar:REALPRJNAME} ${rootrel:PEERS}
NEED_GOOGLE_PROTO_PEERDIRS=yes