This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
181
stars
126
forks
source link
Removed builders from AMQP layer to conform to Rust guidelines; Fixed AMQP bug in message sender tests #6208
Integrated Rust changes after API guidelines update which removed builders from ClientOptions related types.
Updated the Rust wrapper to reflect those changes. Also added a new API Wrapper for Rust APIs to handle APIs which return an i32 as an error.
Also fixed a bug in Rust MessageSender::detach - ignore SessionRemoteClosed errors on MessageSender::detach calls since RemoteClosed is an expected error in that case.
Also synchronized the root cargo.toml file with the root cargo.toml file from the rust repo.
Note for Reviewers: All the azure_core_amqp changes were already reviewed in an earlier PR to the Rust library, with the exception of fe2o3\sender.rs (which has the fix to detach I mentioned above)
CoPilot Summary
This pull request includes significant changes to the azure-core-amqp Rust and C++ codebase, focusing on simplifying the code by removing builder patterns and using a new InvokeAmqpApi function for error handling. Additionally, several dependencies in the Cargo.toml file have been updated.
Dependency Updates:
Added new dependencies: async-stream, cargo_metadata, log, proc-macro2, syn, and quote in Cargo.toml. [1][2][3]
Updated version of serde_amqp from 0.12.2 to 0.12.
Added a new lint rule for clippy to deny large futures.
Code Simplification:
Introduced InvokeAmqpApi function in runtime_context.hpp to handle Rust AMQP API calls and error checking.
Removed builder patterns and replaced them with direct API calls using InvokeAmqpApi in connection.cpp. [1][2][3][4][5]
Removal of Builders:
Removed builder-related code and replaced it with direct API calls in message_sender.cpp. [1][2][3][4][5]
Removed builder-related code in session.cpp and replaced it with direct API calls. [1][2]
Cleanup:
Removed unnecessary builder-related typedefs and functions in various header files (connection_impl.hpp, session_impl.hpp). [1][2][3][4]
Integrated Rust changes after API guidelines update which removed builders from ClientOptions related types.
Updated the Rust wrapper to reflect those changes. Also added a new API Wrapper for Rust APIs to handle APIs which return an i32 as an error.
Also fixed a bug in
Rust MessageSender::detach
- ignoreSessionRemoteClosed
errors onMessageSender::detach
calls since RemoteClosed is an expected error in that case.Also synchronized the root cargo.toml file with the root cargo.toml file from the rust repo.
Note for Reviewers: All the azure_core_amqp changes were already reviewed in an earlier PR to the Rust library, with the exception of fe2o3\sender.rs (which has the fix to
detach
I mentioned above)CoPilot Summary
This pull request includes significant changes to the
azure-core-amqp
Rust and C++ codebase, focusing on simplifying the code by removing builder patterns and using a newInvokeAmqpApi
function for error handling. Additionally, several dependencies in theCargo.toml
file have been updated.Dependency Updates:
async-stream
,cargo_metadata
,log
,proc-macro2
,syn
, andquote
inCargo.toml
. [1] [2] [3]serde_amqp
from0.12.2
to0.12
.clippy
to deny large futures.Code Simplification:
InvokeAmqpApi
function inruntime_context.hpp
to handle Rust AMQP API calls and error checking.InvokeAmqpApi
inconnection.cpp
. [1] [2] [3] [4] [5]Removal of Builders:
message_sender.cpp
. [1] [2] [3] [4] [5]session.cpp
and replaced it with direct API calls. [1] [2]Cleanup:
connection_impl.hpp
,session_impl.hpp
). [1] [2] [3] [4]