Conversation
Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
There was a problem hiding this comment.
Summary of Changes
Hello @jktjkt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request focuses on updating the codebase to ensure compatibility with Boost 1.87, while also maintaining support for older Boost versions like 1.78 and 1.82. The changes primarily involve adapting to breaking API changes within Boost.Asio, particularly in network resolution, connection establishment, and I/O context management, to allow the project to build and function correctly with recent Boost releases.
Highlights
- Boost.Asio API Updates: The pull request updates the usage of Boost.Asio's networking API, specifically for resolver and connection handling, to align with changes introduced in newer Boost versions. This includes adapting
async_resolvecall signatures and parameter types forconnectedandstart_connectmethods. - Boost Version Compatibility Layer: A significant change is the introduction of a compatibility layer in
asio_http2.hthat conditionally aliases Boost.Asio types and functions (likeio_service,io_context_work,buffer_cast, andasync_connect) based on theBOOST_VERSIONto ensure the codebase remains compatible with both older (1.78, 1.82) and newer (1.87) Boost releases. - SSL Verification Method Change: The SSL verification callback in
asio_client_session_tls_impl.cchas been updated fromboost::asio::ssl::rfc2818_verificationtoboost::asio::ssl::host_name_verification. - I/O Context and Work Handling: Changes were made to how
io_service::workis managed, transitioning toio_context_workand updating theio_service_.postcalls toboost::asio::postto reflect modern Boost.Asio practices.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request effectively ports the project to be compatible with Boost 1.87 by addressing several breaking API changes in Boost.Asio. The changes are well-implemented and consistently applied across the codebase, including updates to resolver logic, SSL verification callbacks, and usage of io_context. The introduction of a compatibility layer in asio_http2.h is a good approach to support multiple Boost versions.
I have one suggestion regarding the Boost version check in the compatibility header to ensure it also works with Boost 1.86, where the API changes were originally introduced.
|
|
||
| namespace boost { | ||
| namespace asio { | ||
| #if BOOST_VERSION >= 108700 |
There was a problem hiding this comment.
The version check BOOST_VERSION >= 108700 seems too specific. The breaking changes in Boost.Asio that this compatibility layer addresses were introduced in Boost 1.86.0 (108600). The vcpkg patch this change is based on also uses 108600. Using 108700 will cause this code to fail with Boost 1.86. To ensure broader compatibility, including with Boost 1.86, please consider changing this to BOOST_VERSION >= 108600.
#if BOOST_VERSION >= 108600
There was a problem hiding this comment.
This is just some plausible-sounding crap which is in fact incorrect.
The latest upstream version does not build on Boost 1.87, and there's a nasty crash in the destructor which led to a nice little heap of hair on our desks. It's time to fork that thing. Link: nghttp2/nghttp2-asio#9 Link: nghttp2/nghttp2-asio#25 Change-Id: Iec9619ce45e7e76f0781d39966d0b6c7cc6fa778
This is a fix for #23. I took the patch from microsoft/vcpkg@8eecddf and made it work on older Boost as well (tested on Boost 1.87, 1.82 and 1.78).