| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NYT::Format had several problems:
1. There are too many ways to enable printing of T. Not all are equally good. You could specialize TValueFormatter, you could write an overload of FormatValue, you could write an overload of ToString, you could write an overload of operator << for special stream or you could specialize the Out function.
2. If you attempt to print T which cannot be printed, you get a linker error without a proper source location which is very frustrating to work with.
3. There is no static analysis of format string performed even when it is possible.
4. If you write FormatValue overload, you still have to write ToString overload if you want to use this function (and people tend to use it quite a bit, since it is defined for util types and enums.
This pr addresses these issues to some extent. Relevant changes:
1. The only way to support NYT::Format is to define the FormatValue overload. Otherwise, you get a compile-time error.
2. Format overloads have changed: Now you have two options for general use:
```
TString Format(TStaticFormat<TArgs...> fmt, TArgs&&... args);
TString Format(TRuntimeFormat fmt, TArgs&&... args);
```
Either overload checks if TArg has a FormatValue overload. TStaticFormat performs a compile-time check of flags and the argument count. It binds to any string literal and constexpr string/string_view (and TStringBuf). TRuntimeFormat has to be mentioned explicitly. Otherwise, you will get a compile-time error for using runtime variable as a format.
3(!!!). Types which name begins with NYT:: have a specialization of ToString function which uses FormatValue. Thus, if you write class in namespace NYT and define FormatValue, you get ToString automatically. If your type is not from namespace enclosing NYT, you can just call NYT::ToString for the same effect. This limitation was caused by the fact, that we cannot review all of the external projects code which might inherit from stl classes or adopt some other questionable code practises which may completely break the dispatching mechanism of ToString due to the specialization (there were such cases). Proper documentation of this library will be added soon, so that this interaction is made known. This limitation might be lifted later
77beb68082e10aaf48be1842aad8aba63f26c1bd
|
| |
|
|
| |
f18a9a891758a7ec308b2a88b2cdf3f0942b2301
|
| |
|
|
| |
feeb90a4704dca0309a6252ea872283ea9302a4b
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Added static analysis to format of YT_LOG_XXX macro's. We expect you to write format string as first or the second argument and follow the rules as if you are writing arguments for `NYT::Format`, which match those of printf: https://en.cppreference.com/w/cpp/io/c/fprintf plus few extra flags like 'v'. At the moment analyser checks if flags sequences is
1. Correctly terminated
2. Only contains specifiers valid for a given argument (if we are parsing nth argument of type T, then T must have all specifiers from its list of Conversion or Flag specifiers.
(2) Also means that the number of flag sequences must match the number of arguments supplied to format.
You can specialize `TFormatArg<T>` which is used to determine allowed Conversion and Flag specifiers to customise rules of static analysis. E.g. you can introduce new flags to the mix which you promise to parse in the related FormatValue function.
If you feel like this produces to much overhead in terms of compile time, you are free to use macro YT_DISABLE_FORMAT_STATIC_ANALYSIS to turn the entire thing into a no-op. We have measured compile time to be affected by roughly 3-5% in a log intensive files.
ae6def509474e8a42027bb4ed84ac040509b7c85
|
| |
|
|
| |
85eb5ffdc79771c842f049e9392902ac6868cece
|
| |
|
|
|
| |
YTORM-1057
0aa4ceb80d984a15c92a69f242ecf517b3c7a07c
|
| |
|
|
|
|
| |
apply to global loggers in yt/yt/core
787f98549edf6e8d46ac63cdb8db0609ccde42da
|
| |
|
|
| |
5da23499c430efcdae980093fd84c8391537660c
|
| |
|
|
|
|
| |
TYsonStruct implementation (now with a fixed bug)
94a777c1510546c0a8a7ef3e3b327add7dfc3813
|
| |
|
|
|
|
|
|
|
| |
TYsonStruct implementation
Revert "YT-21310: Introduce CYsonStructSource to remove code duplication in TYsonStruct implementation"
This reverts commit b5dbf4de1df8156e23176662e15b167361fddb19, reversing
changes made to 5ab2a4add3801f5d310e76bf9ba496342d2b765a.
1f84c055d6e4df384230688c946a45dd6351a386
|
| | |
|
| |
|
|
| |
4a6fd6fb52fcb4d43f76651d645dc2e1affe3dd0
|
| |
|
|
|
|
|
| |
TYsonStruct implementation
done
b5dbf4de1df8156e23176662e15b167361fddb19
|
| |
|
|
| |
c2cf2ec6852cbccda74fe6f6de74283db553a809
|
| |
|
|
| |
970c33b44a7bd166b2716d86d3d2053dcaf05d7d
|
| |
|
|
| |
8b95cb159efca3d611ef0361a6f53a20b2fb5b37
|
| |
|
|
|
| |
Done
b2c0a25fcacbb46fcf6294ce86b1a27ad2adac50
|
| |
|
|
| |
ed3889fb0e8fb71a059686f7c4133e9058935718
|
| |
|
|
| |
0f22987a2824410add2233f4434e26c9e1903da1
|
| |
|
|
|
|
|
| |
attributes
No tests for now
9e6aa6815b8d892d1e76281e95f5d044196801e1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AfterSwitch and improved registry algorithm
1) Added FunctionView -- non-owning type-erasure container. If we know that lambda lifetime is long enough, we can save up allocation by using this instead of TCallback.
2) Used FunctionView as AfterSwitch inside FiberSchedulerThread. We saved up a bunch of allocations (e.g. net worst-case allocations per suspend changed from 4 (x2 after switch + fiber allocation + enqueue to idle pool lf stack) to 2 (fiber allocation + enqueue to idle pool lf stack).
3) Fiber is not longer RefCounted. Its lifetime is managed via contract with TFiberRegistry.
4) TFiberRegistry is now lock-free for fiber insertion and deletion. For introspector it is still blocking.
5) "Introduced" SimpleIntrusiveList and IntrusiveMPSCStack to work be used in aforementioned TFiberRegistry.
6) elsedef branch of YT_REUSE_FIBERS was broken for about 3 years cause of double SetAfterSwitch. Now fixed.
7) (3), (4) and (5) caused some changes in yt_fiber_printers because some stuff was hardcoded there. Compat is in place.
d6cf2ae5801c87813a21ca3e7243e1b2baa09f35
|
| |
|
|
|
| |
Iss
50866203dbb2e8797cb32b2d1fdaa44bda88e1c1
|
| |
|
|
|
|
|
| |
simple attributes
Expand the CompositeException
9a10ec65bfc1df854e03bb3a4d8d0a0c0e4a3a5d
|
| |
|
|
|
| |
Increase preprocessor recursion depth limit because after commit YT-21331 to release branch number of enum fields exceeds 199
3536c4e6a39e1d48a4225f4845f43b16025ec73c
|
| |
|
|
| |
47845f7aede6898d43680bd7c6f1d48c05607e34
|
| | |
|
| |
|
|
| |
62c4cf20966ac12ba500e1b7f7f048969a8aacca
|
| |
|
|
| |
f637e6debdcb60f78ab07fb4be833a881a1452f7
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Relates: https://st.yandex-team.ru/, https://st.yandex-team.ru/
|
| |
|
|
|
| |
* Library import 8
* Add contrib/libs/cxxsupp/libcxx/include/__verbose_abort
|
| | |
|
| | |
|
| |
|
|
|
| |
* Library import 5, delete go dependencies
* Fix yt client
|
| |
|
|
|
|
|
| |
* Import libs 1
* Add new file without extension
* Add file missed in export config
|
| | |
|
| |
|
|
| |
First commit
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Update tools: yexport, os-yexport
|
| |
|
|
|
|
|
|
|
|
| |
We are building a service that uses dynamic tables as a metadata storage. Cypress is used for a leader election and prerequisite transactions are used to prevent races, however prerequisite transactions are not supported for dynamic table operations. This PR fixes that.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
---
Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/162
|
| | |
|
| | |
|
| |
|
|
| |
Some new overloads to better support allocationId as strongly typed entity
|