Browse Source

Restoring authorship annotation for <mkolom@yandex-team.ru>. Commit 1 of 2.

mkolom 3 years ago
parent
commit
5cc85744b3

+ 1 - 1
build/plugins/java.py

@@ -85,7 +85,7 @@ def onjava_module(unit, *args):
             return
 
     data = {
-        'BUNDLE_NAME': unit.name(),
+        'BUNDLE_NAME': unit.name(), 
         'PATH': unit.path(),
         'IDEA_ONLY': 'yes' if idea_only else 'no',
         'MODULE_TYPE': unit.get('MODULE_TYPE'),

+ 4 - 4
build/plugins/llvm_bc.py

@@ -7,14 +7,14 @@ def onllvm_bc(unit, *args):
     free_args, kwds = sort_by_keywords({'SYMBOLS': -1, 'NAME': 1, 'NO_COMPILE': 0}, args)
     name = kwds['NAME'][0]
     symbols = kwds.get('SYMBOLS')
-    obj_suf = unit.get('OBJ_SUF')
+    obj_suf = unit.get('OBJ_SUF') 
     skip_compile_step = 'NO_COMPILE' in kwds 
-    merged_bc = name + '_merged' + obj_suf + '.bc'
-    out_bc = name + '_optimized' + obj_suf + '.bc'
+    merged_bc = name + '_merged' + obj_suf + '.bc' 
+    out_bc = name + '_optimized' + obj_suf + '.bc' 
     bcs = []
     for x in free_args:
         rel_path = rootrel_arc_src(x, unit)
-        bc_path = '${ARCADIA_BUILD_ROOT}/' + skip_build_root(rel_path) + obj_suf + '.bc'
+        bc_path = '${ARCADIA_BUILD_ROOT}/' + skip_build_root(rel_path) + obj_suf + '.bc' 
         if not skip_compile_step:
             if x.endswith('.c'):
                 llvm_compile = unit.onllvm_compile_c

+ 1 - 1
build/plugins/pybuild.py

@@ -53,7 +53,7 @@ def ev_cc_arg(path, unit):
     return '{}.ev.pb.cc'.format(stripext(to_build_root(path, unit)))
 
 def ev_arg(path, mod, unit):
-    return '{}__int___ev_pb2.py={}_ev_pb2'.format(stripext(to_build_root(path, unit)), mod)
+    return '{}__int___ev_pb2.py={}_ev_pb2'.format(stripext(to_build_root(path, unit)), mod) 
 
 def mangle(name):
     if '.' not in name:

+ 3 - 3
build/scripts/fetch_from.py

@@ -28,7 +28,7 @@ def add_common_arguments(parser):
     parser.add_argument('--rename', action='append', default=[], metavar='FILE', help='rename FILE to the corresponding output')
     parser.add_argument('--executable', action='store_true', help='make outputs executable')
     parser.add_argument('--log-path')
-    parser.add_argument('-v', '--verbose', action='store_true', default=os.environ.get('YA_VERBOSE_FETCHER'), help='increase stderr verbosity')
+    parser.add_argument('-v', '--verbose', action='store_true', default=os.environ.get('YA_VERBOSE_FETCHER'), help='increase stderr verbosity') 
     parser.add_argument('outputs', nargs='*', default=[])
 
 
@@ -105,8 +105,8 @@ def setup_logging(args, base_name):
     args.abs_log_path = os.path.abspath(log_file_name)
     makedirs(os.path.dirname(args.abs_log_path))
     logging.basicConfig(filename=args.abs_log_path, level=logging.DEBUG)
-    if args.verbose:
-        logging.getLogger().addHandler(logging.StreamHandler(sys.stderr))
+    if args.verbose: 
+        logging.getLogger().addHandler(logging.StreamHandler(sys.stderr)) 
 
 
 def is_temporary(e):

+ 37 - 37
build/scripts/gen_py_protos.py

@@ -1,15 +1,15 @@
-import os
-from os import path
-import shutil
-import subprocess
-import sys
-import tempfile
+import os 
+from os import path 
+import shutil 
+import subprocess 
+import sys 
+import tempfile 
 import argparse
 import re
-
-
-OUT_DIR_ARG = '--python_out='
-
+ 
+ 
+OUT_DIR_ARG = '--python_out=' 
+ 
 def main():
     parser = argparse.ArgumentParser()
     parser.add_argument("--suffixes", nargs="*", default=[])
@@ -21,15 +21,15 @@ def main():
     if args[0] == "--":
         args = args[1:]
 
-    out_dir_orig = None
-    out_dir_temp = None
+    out_dir_orig = None 
+    out_dir_temp = None 
     plugin_out_dirs_orig = {}
-    for i in range(len(args)):
-        if args[i].startswith(OUT_DIR_ARG):
-            assert not out_dir_orig, 'Duplicate "{0}" param'.format(OUT_DIR_ARG)
-            out_dir_orig = args[i][len(OUT_DIR_ARG):]
-            out_dir_temp = tempfile.mkdtemp(dir=out_dir_orig)
-            args[i] = OUT_DIR_ARG + out_dir_temp
+    for i in range(len(args)): 
+        if args[i].startswith(OUT_DIR_ARG): 
+            assert not out_dir_orig, 'Duplicate "{0}" param'.format(OUT_DIR_ARG) 
+            out_dir_orig = args[i][len(OUT_DIR_ARG):] 
+            out_dir_temp = tempfile.mkdtemp(dir=out_dir_orig) 
+            args[i] = OUT_DIR_ARG + out_dir_temp 
             continue
 
         match = re.match(r"^(--(\w+)_out=).*", args[i])
@@ -41,27 +41,27 @@ def main():
             assert plugin_out_dirs_orig[plugin] == out_dir_orig, 'Params "{0}" and "{1}" expected to have the same value'.format(OUT_DIR_ARG, plugin_out_dir_arg)
             args[i] = plugin_out_dir_arg + out_dir_temp
 
-    assert out_dir_temp, 'Param "{0}" not found'.format(OUT_DIR_ARG)
-
-    retcode = subprocess.call(args)
+    assert out_dir_temp, 'Param "{0}" not found'.format(OUT_DIR_ARG) 
+ 
+    retcode = subprocess.call(args) 
     assert not retcode, 'Protoc failed for command {}'.format(' '.join(args))
-
-    for root_temp, dirs, files in os.walk(out_dir_temp):
-        sub_dir = path.relpath(root_temp, out_dir_temp)
-        root_orig = path.join(out_dir_orig, sub_dir)
-        for d in dirs:
-            d_orig = path.join(root_orig, d)
-            if not path.exists(d_orig):
-                os.mkdir(d_orig)
-        for f in files:
-            f_orig = f
+ 
+    for root_temp, dirs, files in os.walk(out_dir_temp): 
+        sub_dir = path.relpath(root_temp, out_dir_temp) 
+        root_orig = path.join(out_dir_orig, sub_dir) 
+        for d in dirs: 
+            d_orig = path.join(root_orig, d) 
+            if not path.exists(d_orig): 
+                os.mkdir(d_orig) 
+        for f in files: 
+            f_orig = f 
             for suf in script_args.suffixes:
                 if f.endswith(suf):
                     f_orig = f[:-len(suf)] + "__int__" + suf
-                    break
-            os.rename(path.join(root_temp, f), path.join(root_orig, f_orig))
-    shutil.rmtree(out_dir_temp)
-
-
-if __name__ == '__main__':
+                    break 
+            os.rename(path.join(root_temp, f), path.join(root_orig, f_orig)) 
+    shutil.rmtree(out_dir_temp) 
+ 
+ 
+if __name__ == '__main__': 
     main()

+ 56 - 56
build/ya.conf.json

@@ -269,10 +269,10 @@
             "description": "Run contexts_difference tool",
             "visible": false
         },
-        "ycmerge": {
-            "description": "Run ycmerge tool",
-            "visible": false
-        },
+        "ycmerge": { 
+            "description": "Run ycmerge tool", 
+            "visible": false 
+        }, 
         "ygdiff": {
             "description": "Run ygdiff tool",
             "visible": false
@@ -4590,42 +4590,42 @@
                 }
             ]
         },
-        "ycmerge": {
-            "tools": {
-                "ycmerge": {
-                    "bottle": "ycmerge",
-                    "executable": "ycmerge"
-                }
-            },
-            "platforms": [
-                {
-                    "host": {
-                        "os": "LINUX"
-                    },
-                    "default": true
-                },
-                {
-                    "host": {
-                        "os": "DARWIN"
-                    },
-                    "default": true
-                },
-                {
-                    "host": {
-                        "os": "WIN"
-                    },
-                    "default": true
-                }
-            ]
-        },
-        "ygdiff": {
-            "tools": {
+        "ycmerge": { 
+            "tools": { 
+                "ycmerge": { 
+                    "bottle": "ycmerge", 
+                    "executable": "ycmerge" 
+                } 
+            }, 
+            "platforms": [ 
+                { 
+                    "host": { 
+                        "os": "LINUX" 
+                    }, 
+                    "default": true 
+                }, 
+                { 
+                    "host": { 
+                        "os": "DARWIN" 
+                    }, 
+                    "default": true 
+                }, 
+                { 
+                    "host": { 
+                        "os": "WIN" 
+                    }, 
+                    "default": true 
+                } 
+            ] 
+        }, 
+        "ygdiff": { 
+            "tools": { 
                 "ygdiff": {
                     "bottle": "ygdiff",
                     "executable": "ygdiff"
                 }
-            },
-            "platforms": [
+            }, 
+            "platforms": [ 
                 {
                     "host": {
                         "os": "LINUX"
@@ -4644,8 +4644,8 @@
                     },
                     "default": true
                 }
-            ]
-        },
+            ] 
+        }, 
         "ya-tc": {
             "tools": {
                 "ya-tc": {
@@ -6589,7 +6589,7 @@
         },
         "uc": {
             "formula": {
-                "sandbox_id": 505682252,
+                "sandbox_id": 505682252, 
                 "match": "UC"
             },
             "executable": {
@@ -7282,28 +7282,28 @@
                 ]
             }
         },
-        "ycmerge": {
-            "formula": {
+        "ycmerge": { 
+            "formula": { 
                 "sandbox_id": 1164600398,
-                "match": "ycmerge"
-            },
-            "executable": {
-                "ycmerge": [
-                    "ycmerge"
-                ]
-            }
-        },
-        "ygdiff": {
-            "formula": {
+                "match": "ycmerge" 
+            }, 
+            "executable": { 
+                "ycmerge": [ 
+                    "ycmerge" 
+                ] 
+            } 
+        }, 
+        "ygdiff": { 
+            "formula": { 
                 "sandbox_id": 982695480,
-                "match": "ygdiff"
-            },
-            "executable": {
+                "match": "ygdiff" 
+            }, 
+            "executable": { 
                 "ygdiff": [
                     "ygdiff"
                 ]
-            }
-        },
+            } 
+        }, 
         "ya-tc": {
             "formula": {
                 "sandbox_id": 981372621,

+ 22 - 22
build/ymake.core.conf

@@ -13,7 +13,7 @@ CPP_FAKEID=9107927
 GO_FAKEID=9056219
 ANDROID_FAKEID=8821472
 CLANG_TIDY_FAKEID=8625699
-
+ 
 CURDIR=.
 MODDIR=.
 BINDIR=bin:/
@@ -488,8 +488,8 @@ BUILD_PROTO_AS_EVLOG=no
 PROTO_NAMESPACE=
 
 # tag:proto tag:python-specific
-GEN_PY_PROTOS=$YMAKE_PYTHON ${input:"build/scripts/gen_py_protos.py"}
-
+GEN_PY_PROTOS=$YMAKE_PYTHON ${input:"build/scripts/gen_py_protos.py"} 
+ 
 # tag:proto tag:cpp-specific
 PROTO_HEADER_EXTS=.pb.h
 CPP_PROTO_CMDLINE=
@@ -894,8 +894,8 @@ macro NO_MYPY() {
 # tag:proto tag:python-specific
 macro _PY_PROTO_CMD_BASE(File, Suf, Args...) {
     .CMD=$PROTOC -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE ${pre=-I=:_PROTO__INCLUDE} -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --python_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;noauto;norel;nopath;noext;suf=$Suf:File} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} $Args
-}
-
+} 
+ 
 # tag:proto tag:python-specific
 macro _PY_PROTO_CMD(File) {
     .CMD=${cwd;rootdir;input:File} $_PY_PROTO_CMD_BASE($File _pb2.py $PY_PROTO_OPTS $PY_PROTO_OUTS $PY_PROTO_MYPY_PLUGIN)
@@ -904,8 +904,8 @@ macro _PY_PROTO_CMD(File) {
 # tag:proto tag:python-specific
 macro _PY_PROTO_CMD_INTERNAL(File) {
     .CMD=${cwd;rootdir;input:File} $GEN_PY_PROTOS --suffixes $PY_PROTO_SUFFIXES $PY_PROTO_MYPY_SUFFIX -- $_PY_PROTO_CMD_BASE($File __int___pb2.py $PY_PROTO_OPTS $PY_PROTO_OUTS_INTERNAL ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___pb2.py:File} ${nopath;noext;suf=_pb2.py:File}"} $PY_PROTO_MYPY_PLUGIN_INTERNAL)
-}
-
+} 
+ 
 # tag:proto tag:java-specific
 JAVA_PROTO_RUNTIME=
 
@@ -971,13 +971,13 @@ macro _PY_EVLOG_CMD_BASE(File, Suf, Args...) {
 # tag:python-specific tag:proto
 macro _PY_EVLOG_CMD(File) {
     .CMD=${cwd;rootdir;input:File} $_PY_EVLOG_CMD_BASE($File _ev_pb2.py)
-}
-
+} 
+ 
 # tag:python-specific tag:proto
 macro _PY_EVLOG_CMD_INTERNAL(File) {
     .CMD=${cwd;rootdir;input:File} $GEN_PY_PROTOS --suffixes $PY_EVLOG_SUFFIXES -- $_PY_EVLOG_CMD_BASE($File __int___ev_pb2.py ${hide;kv:"ext_out_name_for_${nopath;noext;suf=__int___ev_pb2.py:File} ${nopath;noext;suf=_ev_pb2.py: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"}
@@ -5435,18 +5435,18 @@ macro GENERATE_PY_PROTOS(FILES...) {
 
 # tag:python-specific tag:proto
 macro _GENERATE_PY_PROTOS_INTERNAL(FILES...) {
-    foreach (FILE : $FILES) {
+    foreach (FILE : $FILES) { 
         _PY_PROTO_CMD_INTERNAL($FILE)
-    }
-}
-
+    } 
+} 
+ 
 # tag:python-specific
 macro _GENERATE_PY_EVS_INTERNAL(FILES...) {
-    foreach (FILE : $FILES) {
+    foreach (FILE : $FILES) { 
         _PY_EVLOG_CMD_INTERNAL($FILE)
-    }
-}
-
+    } 
+} 
+ 
 macro _COPY_FILE_IMPL(FILE, AUTO_DST="", NOAUTO_DST="", OUTPUT_INCLUDES[], REQUIREMENTS[]) {
     .CMD=$COPY_CMD ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST} ${output_include;hide:OUTPUT_INCLUDES} ${requirements;hide:REQUIREMENTS} ${kv;hide:"p CP"} ${kv;hide:"pc light-cyan"}
     .SEM=copy_file ${input:FILE} ${output:AUTO_DST} ${output;noauto:NOAUTO_DST}
@@ -7523,7 +7523,7 @@ multimodule PROTO_LIBRARY {
         SET(PEERDIR_TAGS PY2 PY_PROTO)
         ENABLE(PY_PROTO)
         OPTIMIZE_PY_PROTOS()
-        OBJ_SUF=.py2
+        OBJ_SUF=.py2 
         # Can not use NO_LINT(), because is not allowed outside of contrib directory
         SET(LINT_LEVEL_VALUE none_internal)
 
@@ -7553,7 +7553,7 @@ multimodule PROTO_LIBRARY {
         otherwise {
             MODULE_PREFIX=libpy3
         }
-        OBJ_SUF=.py3
+        OBJ_SUF=.py3 
         # Can not use NO_LINT(), because is not allowed outside of contrib directory
         SET(LINT_LEVEL_VALUE none_internal)
 
@@ -8551,7 +8551,7 @@ module GO_PROGRAM: _GO_BASE_UNIT {
     .CMD=GO_LINK_EXE
     .NODE_TYPE=Bundle
     .SYMLINK_POLICY=EXE
-    .ALLOWED=INDUCED_DEPS
+    .ALLOWED=INDUCED_DEPS 
     .FINAL_TARGET=yes
     .ALIASES=GO_REQUIREMENTS=LD_REQUIREMENTS
     SET(_GO_TOOL_MODE exe)

+ 7 - 7
contrib/libs/cxxsupp/openmp/omp.h

@@ -114,14 +114,14 @@
     extern int  __KAI_KMPC_CONVENTION  omp_get_team_num (void);
     extern int  __KAI_KMPC_CONVENTION  omp_get_cancellation (void);
 
-#if 0  // !defined(NORUNTIME) && !defined(USE_STL_SYSTEM)
-    // We need to put all possible dependencies to prevent blinking:
-    // on all stdlib.h that can be mentioned here within a platform.
-#   include <contrib/libs/cxxsupp/libcxx/include/stdlib.h>
-#else
+#if 0  // !defined(NORUNTIME) && !defined(USE_STL_SYSTEM) 
+    // We need to put all possible dependencies to prevent blinking: 
+    // on all stdlib.h that can be mentioned here within a platform. 
+#   include <contrib/libs/cxxsupp/libcxx/include/stdlib.h> 
+#else 
 #   include <stdlib.h>
-#endif
-
+#endif 
+ 
     /* kmp API functions */
     extern int    __KAI_KMPC_CONVENTION  kmp_get_stacksize          (void);
     extern void   __KAI_KMPC_CONVENTION  kmp_set_stacksize          (int);

+ 4 - 4
contrib/restricted/abseil-cpp-tstring/y_absl/strings/numbers.h

@@ -28,12 +28,12 @@
 #endif
 
 #ifdef _Y__SSE4_2__
-#ifdef _MSC_VER
-#include <intrin.h>
-#else
+#ifdef _MSC_VER 
+#include <intrin.h> 
+#else 
 #include <x86intrin.h>
 #endif
-#endif
+#endif 
 
 #include <cstddef>
 #include <cstdlib>

+ 4 - 4
contrib/restricted/abseil-cpp-tstring/y_absl/time/time_zone/ya.make

@@ -15,10 +15,10 @@ ADDINCL(
     GLOBAL contrib/restricted/abseil-cpp-tstring
 )
 
-IF (OS_DARWIN)
-    EXTRALIBS("-framework CoreFoundation")
-ENDIF()
-
+IF (OS_DARWIN) 
+    EXTRALIBS("-framework CoreFoundation") 
+ENDIF() 
+ 
 NO_COMPILER_WARNINGS()
 
 SRCDIR(contrib/restricted/abseil-cpp-tstring/y_absl/time/internal/cctz/src)

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