Skip to content

Restore disabled code#68

Merged
dietmarkuehl merged 13 commits into
mainfrom
restore-disabled-code
Jul 19, 2026
Merged

Restore disabled code#68
dietmarkuehl merged 13 commits into
mainfrom
restore-disabled-code

Conversation

@dietmarkuehl

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 19, 2026 16:16
@dietmarkuehl
dietmarkuehl requested a review from camio as a code owner July 19, 2026 16:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the public forwarding header and expands/updates the Postgres examples (including adding two new “talk” variants), alongside a small build/dependency update.

Changes:

  • Simplified include/beman/net.hpp to a minimal forwarding include.
  • Updated Postgres examples to reduce unused-variable warnings and added postgres_talk_accuonsea / postgres_talk_cppnow to the examples build.
  • Updated the bemanproject/task FetchContent commit and adjusted beman-tidy path ignores.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
include/beman/net.hpp Removes previously disabled/empty namespace declarations; now only forwards to <beman/net/net.hpp>.
examples/postgres.cpp Adds [[maybe_unused]] and changes which example branch is compiled/executed.
examples/postgres_talk.cpp Refactors Postgres coroutine/mutex example and changes error/cancellation handling.
examples/postgres_talk_cppnow.cpp Adds a new “talk” variant example (CppNow).
examples/postgres_talk_accuonsea.cpp Adds a new “talk” variant example (AccuOnSea), similar to postgres_talk.cpp.
examples/CMakeLists.txt Fixes/extends the Postgres example list so the new examples are built when Postgres is available.
CMakeLists.txt Updates the task dependency commit hash and comment formatting.
.beman-tidy.yaml Adds include/beman/net.hpp to beman-tidy ignored paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/postgres.cpp Outdated
Comment on lines +253 to +258
if constexpr (true) {
spawn(std::move(timer));
#if 0
spawn(std::move(request1) | ex::then([&scope] noexcept { scope.request_stop(); }));
ex::sync_wait(ex::when_all(io.async_run(), scope.join()));
#endif
Comment on lines 66 to 69
if (!PQsendQuery(conn, query.c_str())) {
co_yield ex::with_error(pg::error(PQerrorMessage(conn)));
std::cout << "ERROR: " << PQerrorMessage(conn) << "\n";
throw std::runtime_error("ERROR");
}
Comment on lines 70 to 72
while (PQflush(conn)) {
co_await ex::unstoppable(net::async_poll(conn.socket, net::event_type::out));
co_await net::async_poll(conn.socket, net::event_type::out);
}
Comment on lines 78 to 81
co_await ex::unstoppable(net::async_poll(conn.socket, net::event_type::in));
if (!PQconsumeInput(conn)) {
co_yield ex::with_error(pg::error(PQerrorMessage(conn)));
// error handling
}
Comment thread .beman-tidy.yaml
Comment on lines 9 to +11
ignored_paths:
- infra/
- include/beman/net.hpp
Comment on lines +66 to +69
if (!PQsendQuery(conn, query.c_str())) {
std::cout << "ERROR: " << PQerrorMessage(conn) << "\n";
throw std::runtime_error("ERROR");
}
Comment on lines +77 to +81
while (PQisBusy(conn)) {
co_await ex::unstoppable(net::async_poll(conn.socket, net::event_type::in));
if (!PQconsumeInput(conn)) {
// error handling
}
@dietmarkuehl
dietmarkuehl merged commit ee70b62 into main Jul 19, 2026
37 checks passed
@dietmarkuehl
dietmarkuehl deleted the restore-disabled-code branch July 19, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants