Closed sean-parent closed 3 months ago
Just reading the summary it seems like a lot of changes that could've been separate PR's, for example, a clang tidy pass seems like a different topic from fixing the bug.
Just reading the summary it seems like a lot of changes that could've been separate PR's, for example, a clang tidy pass seems like a different topic from fixing the bug.
Yes - it should have been about 5 PRs. It started with "could clang-tidy find the same issue as Coverity" (answer, not that I've been able to determine) - and snowballed.
FYI I ran clang-tidy locally over these changes and it seems to work. The presets are nice. Haven't had time yet to review the changes themselves, though.
Going to take the heat for pushing my own oversized PR...
This PR was started to address an issue reported by Covarity regarding the exception handling in the future reduction code. It led to a rewrite of the future reduction code, the inclusion of clang-tidy and clang-tidy fixes in the CMake setup, and several other changes:
API Changes
package()
will now reduce futures (future<futureawait()
andawait_for()
take thefuture
by rvalue-ref. They now take it by rvalue-ref with deprecated overloads for const-ref for compatibility. I'm moving away from implicit copies. Usestlab::copy()
orstd::move()
as appropriate to upgrade to the new interface.[[nodiscard]]
to many interfaces. In general, these should catch misuse.get_ready()
API tofuture
that can be used in a recover() clause or when the future is known to be ready. It asserts the future is ready and would be a race to invoke on a non-ready future.Fixes
task(const task&&)
is now deleted, which avoids a bad recursive runtime error if you attempt to copy a task.future<>
with C++20 coroutines, exceptions are now correctly reported.forest
is now atomic. Aconst forest
can be safely shared across threads.Improvements
cert-*
,performance-*
, andmodernize*-
checks for C++17.