fix(asio): keep std::println usable with import asio - #175
Merged
Conversation
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.
Summary
chriskohlhoff.asio@1.38.1module recipe by propagating Asio's supportedASIO_NO_IOSTREAMdefine through the default separate-compilation feature.<print>out of theasioBMI sostd::printlnremains usable afterimport std; import fmt; import asio;.asio-moduleconsumer with the reported import combination and both plain and formattedstd::printlncalls.Root cause
The Asio module wrapper includes the TCP surface. Without
ASIO_NO_IOSTREAM, that path also exposes Asio's iostream adapters and pulls libc++<print>into theasioBMI. With the same standard-library declarations already provided by thestdBMI, Clang 22.1.8 can bindstd::printlnincorrectly and reports failures such as:Defining
ASIO_NO_IOSTREAMat the existing separate-compilation feature boundary keeps the BMI, Asio implementation sources, and consumer TUs on one consistent macro contract.Compatibility
This disables Asio's iostream/streambuf adapter surface, including
basic_socket_iostream(asio::ip::tcp::iostream) and streambuf-basedread_at/write_atoverloads. Core socket, timer, coroutine, and asynchronous APIs remain available and continue to be exercised by the consumer tests.This is a recipe repair only:
index.toml'smin_mcppand the workflow mcpp pin are unchanged;OpenSSL CI follow-up
The original Linux matrix failure was independent of the Asio BMI repair.
compat.openssl@3.5.1builds through its own Configure/Make flow, and that external build did not inherit the resolved Linux payload paths. GCC therefore failed onstdlib.h,limits.h, andassert.hwhileasio-moduleitself had already passed.An OpenSSL descriptor repair was developed and pushed on this branch, and run 31179027882 passed all eight checks, including Linux
asio-module5/5,asio-ssl1/1,grpc-module1/1, andopenssl1/1.While that run was executing, #174 merged a more complete OpenSSL repair into
main. It supplies payload headers, crt objects, and libc search paths and pins the same glibc compatibility range as the GCC toolchain. This branch now includes currentmainand intentionally carries no duplicatecompat.openssl.luadiff.The generic mcpp
install()toolchain contract remains a separate follow-up: external builds should eventually inherit resolved toolchain inputs without descriptor-specific flag plumbing.Verification
2026.8.6.2, LLVM22.1.8, andimport std; import fmt; import asio;.main,mcpp test -p asio-module --cache=offwith mcpp2026.8.6.3: 5 passed, 0 failed; bothstd::printlnregression lines executed.main,mcpp test -p asio-ssl --cache=offwith mcpp2026.8.6.3: 1 passed, 0 failed.git diff --checkchecks passed for the changed descriptor.