<format>/<chrono>: Remove <array> dependency.#2031
Conversation
<format: Remove <array> dependency (closes #2027).<format>: Remove <array> dependency (closes #2027).
|
Thanks for the PR! The checks are failing in the following tests (you can see this by clicking on Details next to the failing checks, then "View more details on Azure Pipelines" - we split the x86 tests across 8 machines or "shards", and clicking on Run Tests under "x86 1" will display one shard's failures. Clicking on the back arrow next to "Jobs in run BLAH" and then clicking on the Tests tab will allow you to see failure logs with compiler errors). One of the errors, emitted by Clang, is: Line 5970 in e745bad That's defined here: Lines 6294 to 6295 in e745bad These are the only mentions of Lines 11 to 41 in e745bad Thus, either Please let us know if you need any help with resolving these failures (we're also available on the STL Discord, linked at the top of the README). To validate a fix, you should run the STL's test suite locally (instructions are in the README, we can also help with getting started there) - at a minimum, the 3 failing test directories here. (Running all of the |
|
Thank you for the explanation. I think adding Sorry for the local testing absence, just didn't think that such tiny change could lead to such a big chaos🙄 |
…t>. Resolving barcharcraz comments.
miscco
left a comment
There was a problem hiding this comment.
Looks neat, we should definitely not go through _STD begin(_Buffer) if simply _Buffer will do
|
barcharcraz
miscco
I guess you have to reach some consensus here, I can't change it back and forth 😎 |
|
Oh sorry, I did not see that @barcharcraz suggested those. Usually we try to avoid adding those function calls as they do impair debug performance. Lets wait for feedback from the maintainers |
I don't have super strong thoughts on this. Debug experience isn't a huge deal here as the functions in question don't appear in the callstack above user functions. I'm willing to keep things explicit though. _STD begin(_Buffer) definitely isn't necessary |
|
Someone please, what's wrong with Format Validation here? P.S. How to run this Code Format Validation test locally? Because running all tests take way too long. |
clang-format. If you click on details you will see a diff of what clang-format says it should be diff --git a/stl/inc/format b/stl/inc/format
index cafb5b2..e8d3977 100644
--- a/stl/inc/format
+++ b/stl/inc/format
@@ -1871,8 +1871,7 @@ template <class _CharT, class _OutputIt>
_NODISCARD _OutputIt _Fmt_write(_OutputIt _Out, const void* const _Value) {
// TRANSITION, Reusable buffer
char _Buffer[_Format_min_buffer_length];
- const auto [_End, _Ec] =
- _STD to_chars(_Buffer, _STD end(_Buffer), reinterpret_cast<uintptr_t>(_Value), 16);
+ const auto [_End, _Ec] = _STD to_chars(_Buffer, _STD end(_Buffer), reinterpret_cast<uintptr_t>(_Value), 16);
_STL_ASSERT(_Ec == errc{}, "to_chars failed");
*_Out++ = '0';
*_Out++ = 'x';
You don't need to, really. Validation is just clang-format and validate.cpp. If you open repo folder with VS Code and use that to save the file it should automatically ensure all of that (I think it uses the |
|
Thanks. If I run May be a different version or something... |
Definitely, I just tried it with clang-format 12 and got the same thing. The repo currently uses the version that ships with Visual Studio which is version 11. |
<format>: Remove <array> dependency (closes #2027).<format>/<chrono>: Remove <array> dependency.
|
Well, I took the opportunity to rework So the |
|
Status update: We merge changes on GitHub and our MSVC-internal repo simultaneously; as this is a semi-manual process we batch up PRs to save time. Your PR will be part of the next batch, almost certainly this week. |
|
Thanks for improving compiler throughput - and congratulations on your first microsoft/STL commit! 😺 🎉 🚀 This will ship in VS 2022 17.0 Preview 4. |
This removes
<array>header dependency from the<format>.Closes #2027.