Conversation
The largest item on any card here, at 15, and the last big one on zu-c's. The card goes from 50 to 67 of the 90 it is scored out of, since zu-c owes no api-map and no perf. What landed is tamnd/zu-c#9. Ninety [[nodiscard]] attributes on the calls whose return value is the failure report; a to_string and a std::formatter for every type worth printing, which is what ZU_HAS_FORMAT was for and had never been used for; and test_idiom.cpp, which is mostly static_assert on purpose, because a Result being a random access range and deliberately not a borrowed one is a promise the compiler should keep at every call site rather than one a case checked once. The sweep found a bug on its way through. zu.hpp read __cpp_lib_expected before <version> had defined it, so ZU_HAS_EXPECTED came out 0 on GCC 13 at -std=c++23 and the whole try_ half of the API went undeclared on a toolchain that has it. It depended on include order, so two translation units in one build got two different headers. Nothing said so, because the suite for that half is one #if and compiled down to a single placeholder case that passed. That file now carries an #error on the floor branch: at C++23 and above, this half missing is a broken build rather than a quiet one. Left on the card: reference, install and stability, at 10 each.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zu-c's practice score goes from 50 to 67. The item is
idiom, at 15, the largest single item on any card here: "The language's own shapes: how it iterates, how it releases a resource, how it awaits, what it raises. A binding that reads like the C ABI in another syntax is a binding nobody wants to write against."67 rather than 75 because zu-c is scored out of 90: it owes no
api-map, since the C names arezu.handzu.his generated in the engine, and noperfreport.reference,idiom,install,stabilityreference,install,stabilityThe work is tamnd/zu-c#9. Three parts.
A dropped return was a lost failure. Ninety of the calls in
zu.hppanswer something a caller must not drop, and three of them said so. Atry_call answers astd::expectedwhose error half is the failure report, soconn.try_query(q);on a line of its own compiles, throws nothing, returns nothing and loses the reason. All ninety are[[nodiscard]]now, and it caught a real one in the existing suite on the first build.The bug it found.
zu.hppread__cpp_lib_expectedbefore<version>had defined it. An undefined identifier is nought in a preprocessor arithmetic expression, soZU_HAS_EXPECTEDcame out 0 on GCC 13 at-std=c++23, wherestd::expectedhas been available since GCC 12, and the wholetry_half of the API went undeclared on a toolchain that has it. Worse than absent, it depended on include order: a translation unit that had already included<version>got a differentzu.hppthan one that had not, in the same build.Nothing said so, because
test_expected.cppis one#ifwith a single placeholder case in the#elsefor the C++20 floor. ctest ran the placeholder, printedPassed, and eleven cases about the half a caller who builds without exceptions depends on had not been compiled by anything. That branch now carries an#error: below C++23 there is nothing to run, but at C++23 and above this half missing is a broken build rather than a quiet one.Printing.
<format>was included at the top of the header andZU_HAS_FORMATdefined beside it, and neither was used in the header, the tests, the examples or the README. There is now ato_stringfor every type worth printing and astd::formatterover each, one line apiece, so the C++20 floor gets the same text as C++23. Nooperator<<, because<ostream>would land in every translation unit that includes the header whether it prints or not.test_idiom.cpppins the shapes with concepts rather than prose:Resultis a sized, common, random access range ofRowand deliberately not aborrowed_range, so filtering a temporary result is a compile error where it was written rather than a use after free that works in a debug build; handles move and do not copy; exceptions descend fromstd::runtime_error; the value structs arestd::regular.The overview below was regenerated by
cargo xtask clients, which still reports "7 clients, 5 of them tier 1, 4 at their tier's practice threshold". zu-c is not one of the four and should not be until its card is finished.