summaryrefslogtreecommitdiffstats
path: root/util
Commit message (Collapse)AuthorAgeFilesLines
* Fix newline formatting in FormatCurrentException()svkrasnov2022-03-262-4/+4
| | | | ref:1aefdabc38ec01ea10f53aa279edaa0dee29380d
* Introduce FormatCurrentException() based on TBackTrace::FromCurrentException()svkrasnov2022-03-233-1/+114
| | | | ref:60218909c48b580eebc0b518f039afd46ca51713
* util: Fix -Wunused-but-set-variablekmartynkov2022-03-231-2/+0
| | | | ref:0186c219d9c56c8f183ce0236e33f6d647fe5fa0
* util: Do not define SIZEOF_SIZE_T, as it is not used in our codebasethegeorg2022-03-202-5/+1
| | | | | | | | | | | | | | codesearch shows [114 usages](https://a.yandex-team.ru/search?search=%5CbSIZEOF_SIZE_T%5Cb,,jC,arcadia,,500) of this macro outside of contrib. None of these usages looks as being util-dependent. Defining this in util triggers `-Wmacro-redefined` whenever `` gets included after our ``. UPD: It turns out that our curl was using this define for a reason, so I have implemented an util-independent solution instead. ref:c80e45c42a9c0ec76eda33e63b560b285e1ee502
* Standard way to include zlib iface headersvidyuk2022-03-191-1/+1
| | | | | | | | | This allows to use user provided zib when building projects exported from arcadia to opensource. DEVTOOLS-9036 ref:84d7fd128cd82c56df10f8cefd3e1e292d4d80be
* Remove read-only files and directories on Windows (to match behavior on unix)setser2022-03-162-0/+75
| | | | | | | | | | Current behavior of RemoveDirWithContents does not allow removing directories if any of files in this directory is read-only. This behavior, however, does not allow, for example, to remove temporary directory, in which git repository was created (on *nix systems, however, this problem was not noticed). This PR overrides this behavior. ref:1faf91e233008b4aece4f2b953884b52346ce2be
* intermediate changesarcadia-devtools2022-03-1583-1728/+0
| | | | ref:ca7a95e8c9a9d780f96497136a152091d54e61b5
* rm unused includetobo2022-03-101-2/+0
| | | | ref:7effc120450f64adfbd00fa1a0427152ef1cf6a9
* intermediate changesarcadia-devtools2022-03-103-298/+615
| | | | ref:7e819949a28b77d60c98019ed1950733e734a77e
* Fix -Wpragma-pack in trie.hthegeorg2022-03-071-1/+13
| | | | | | | | | | `#include ` and `#include ` modify current `#pragma pack` value and thus trigger `-Wpragma-pack` under clang-cl. As there is no way to implement packed structs via attributes, introduce proper compiler-specific variables in `` and use them to check whether we are compiling with MSVC. ref:e47cdb9c38eb305b9c5bcc5ad719e21ec52eb14c
* rm unused includestobo2022-03-053-10/+0
| | | | ref:b9f56a64ccc7a4f4980fa176af362932c04214b3
* Enable yet another warning under clang-clthegeorg2022-03-032-37/+50
| | | | ref:fdd92250532d24eebbf27cb8f8369eeb88e17df9
* Support std::filesystem::path in Arcadia streamsthegeorg2022-03-033-3/+21
| | | | ref:11bbdd83544b9579747dd12d51395840bda86faf
* Improve SystemCommand check in YDB CLI, KIKIMR-14321pnv12022-03-013-0/+26
| | | | ref:fe5ed49138dce046a93c364cc8879fad3abf3eef
* clang-tidy - move-constructor and move-assignment operators should be marked ↵tobo2022-02-286-6/+6
| | | | | | noexcept + pass some args by reference ref:5da43163e6b3c2499597234dc80ad47042259013
* DTCC-822 Put double-conversion under yamakershadchin2022-02-251-1/+1
| | | | ref:50f8b947dedd3183d21db08bf8ab226bb09535d1
* rm unused includetobo2022-02-251-1/+0
| | | | ref:98e6837fcfff74a0af567f24b8c63f3353a501a1
* Implement SRC_CPP_NO_LTO and use it util/thegeorg2022-02-252-9/+1
| | | | | | | | `-flto` / `-fno-lto` is not available in clang-cl, so we should not use it in order to prevent `-Wunknown-argument` from being triggered Raw CFLAGS are not user-friendly, we should define a better macro for thi (somewhat popular) case. ref:6f969138dc8b6fe4c420eb2ef4c0e50c2503d184
* intermediate changesarcadia-devtools2022-02-241-1/+1
| | | | ref:70ac1bca1acbb458c863fb4686263967ea009057
* fix CLion perf warnings - use const references instead of passing by valuetobo2022-02-244-20/+21
| | | | ref:e94e72a813a3aa41c543fd1d9f7d73f02cca8bc0
* intermediate changesarcadia-devtools2022-02-241-0/+3
| | | | ref:fb678b285db60965c2b65db96852ae4cfb5879d6
* clang-cl: Enable yet another warning with the very long namethegeorg2022-02-233-4/+13
| | | | ref:878ef48a386627a1eb0325b0ccff820b1d627900
* rollback r9158440 cause of failed RM testsfedorenko2022-02-232-69/+6
| | | | ref:7ea361b10868cc51450f6e43c8428e8447e6781d
* intermediate changesarcadia-devtools2022-02-221-3/+0
| | | | ref:b4effc9582e42dfa79e9a44a91df283419947b3a
* rm unused includetobo2022-02-221-1/+0
| | | | ref:f0f0572f52d7977841789105c6b51d4ca5ea1382
* Properly attribute err.h replacements as [[noreturn]]thegeorg2022-02-192-9/+12
| | | | ref:e86419934a6858c3f36f45e15d1e42cc501ea395
* pass string by reference, rm unused includetobo2022-02-192-3/+2
| | | | ref:b2a9abb354b18c7a8d339a26c1e23fba39e48c06
* intermediate changesarcadia-devtools2022-02-183-0/+340
| | | | ref:1a0585d83f27cb6fb5b9c4f68a08177e10faf3b3
* introduce util/digest/city_ut.cppgleb-kov2022-02-183-11/+17
| | | | ref:2bd6e26cda5245c96d0b2f3c326dd13e0827c326
* IGNIETFERRO-1975, BIGRT-39 [RESUBMIT]: add ↵svkrasnov2022-02-182-6/+69
| | | | | | TBackTrace::FromCurrentException() to CurrentExceptionMessage() ref:8d5b72512d2b80cfd1ae859a4175cc92cf32a99a
* [util] fix fstat for archive directories on windowskikht2022-02-174-32/+154
| | | | | | | | | | | | | | | | | | | Currently TFileStat has a bunch of problems on Windows: 1. Mode computation ORs different types, but file attributes it checks are not mutually exclusive. E.g. it is possible for directory to have both `FILE_ATTRIBUTE_DIRECTORY` and `FILE_ATTRIBUTE_ARCHIVE`, but it will currently lead to invalid `_S_IFDIR | _S_IFREG` mode. 2. Any file with `FILE_ATTRIBUTE_REPARSE_POINT` flag is considered to be symlink. But there are many other types of reparse points even user-defined ones. For more info see https://docs.microsoft.com/en-us/windows/win32/fileio/reparse-point-tags To fix all this we do the following: 1. Add `ReparseTag` field to `TSystemFStat` and fill it for reparse points in `GetStatByHandle`. 2. Refactor `GetWinFileType` out of `GetFileMode` to ensure that we always select only single `S_IFMT` value. 3. Pass reparse tag value into `GetWinFileType` and select `S_IFLNK` only for `IO_REPARSE_TAG_SYMLINK` and `IO_REPARSE_TAG_MOUNT_POINT` tags. The latter one is a bit strange, but this behaviour is aligned with current implementation of `WinReadLink`. 4. Factor `ReadReparsePoint` out of `WinReadLink`. This function uses `DeviceIoControl` to read reparse point data into structures copied from WDK. 5. Add `WinReadReparseTag` that uses `ReadReparsePoint` to extract reparse point tag. We use this approach instead of MSDN-recommended `FindFirstFile` because latter requires file path, but we have file handle at this point. AFAIK golang and python use similar approach for this. 6. Add test for archived directory case. 7. Make symlink nofollow tests run only when symlink creation is possible for current user. Discovered in https://st.yandex-team.ru/ARC-3931 ref:4f6735817b9f85f3351a1021a56dd7eb4606bd65
* TShellCommand::TImpl via TShellCommandOptionsgleb-kov2022-02-172-96/+65
| | | | ref:f149c0bc76521a1273f6a2c155f2bd116141b1eb
* util unittests: replace try-catch-UNIT_ASSERT via UNIT_ASSERT_EXCEPTIONgleb-kov2022-02-165-101/+11
| | | | ref:f59ddae7dbb42f5fa999e6071769f709e8b80b85
* Rollback: r9145043robot-srch-releaser2022-02-152-69/+6
| | | | | | | | | [diff-resolver:svkrasnov] Sandbox task: https://sandbox.yandex-team.ru/task/1216524490/view Task author: omakovski@ Description: Revert 9145043 Note: mandatory check (NEED_CHECK) was skipped ref:dbe6517dcb523875d1e5de010069988b428c98bb
* IGNIETFERRO-1975, BIGRT-39: add TBackTrace::FromCurrentException() to ↵svkrasnov2022-02-152-6/+69
| | | | | | | | CurrentExceptionMessage() support TBackTrace::FromCurrentException() in CurrentExceptionMessage() ref:ca43c6538722fc9d169d92f85395093a21136884
* Remove #ifdefthegeorg2022-02-151-5/+0
| | | | ref:dbda5031b1bd1b53792dfdcd1d8edf91a0132311
* BALANCER-3382: fix UB in AsciiEqualsIgnoreCase for empty TStringBufsnocomer2022-02-131-1/+7
| | | | | | | | Under ubsan call to AsciiEqualsIgnoreCase with empty TStringBuf passed in arguments results in error arcadia/util/string/ascii.h:183:52: runtime error: null pointer passed as argument 1, which is declared to never be null due to nullptr being passed to strnicmp ref:1996fab2dbf1aaf0eb58ee694522ec0973971fd9
* rm unused includetobo2022-02-111-1/+0
| | | | ref:58f9777b21e10d88e9796d1186d62af610fd09a4
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.karavashkin2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.karavashkin2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.timuratshin2022-02-102-8/+8
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.timuratshin2022-02-102-8/+8
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.gridem2022-02-102-86/+86
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.gridem2022-02-102-86/+86
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.whitehead2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.whitehead2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.angshu2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.angshu2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.mskorokhod2022-02-103-22/+22
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.mskorokhod2022-02-103-22/+22
|