chitralverma opened a new pull request, #9387: URL: https://github.com/apache/opendal/pull/9387
# Which issue does this PR close? Part of #9324 (tracker #9320). # Rationale for this change Generate the existing C++ `WriteOptions` from core, as #9331, #9361, #9366, #9378, and #9382 do for the other options structs. # What changes are included in this PR? - `dev/src/generate/cpp.rs` lists the 11 `WriteOptions` members in their released order and pins the core kind of each. - `content_language`, `expires`, `if_version_match`, `if_version_not_match`, `if_not_changed`, and `checksum` stay unexposed. - A new `OptionStringMap` kind carries `user_metadata` in one bridge struct. An empty map stays different from `std::nullopt`, as on `main`. - Generated code replaces the hand-written struct, bridge mirror, and converters. `Write` and `GetWriter` keep their signatures. - The member docs are the full core docs. Nested list items keep their indentation, so Doxygen renders them nested. - The struct doc says that `GetWriter` does not access storage, so a false condition fails `Writer::Write` or `Writer::Close`. It drops the `if_not_changed` sentence. - The `user_metadata` doc names `Operator::Stat` and drops `Reader::metadata`, which C++ does not have. - The `concurrent` doc names `Operator::Write` for the one-buffer write. Verified: comment-stripped headers match `main`, except the `WriteOptions` move and `<unordered_map>` in `options.hpp`; an old-consumer probe (layout, positional and designated init, structured bindings) gives the same output with GCC 13.3 and clang 18.1.3, C++17 and C++20, on Linux x86-64; 17 scratch mutations each fail a new test; doc claims hold on `memory`, `dashmap`, `fs`, and Silo S3, with the `direct_io` split and chunk writes traced by strace on Linux ext4; the C++ CI job passes in a Linux container. Not verified: `if_none_match` with a service that supports it (`memory`, `fs`, and Silo S3 return `Unsupported`); Windows MSVC build (CI only). # Are there any user-facing changes? - `WriteOptions` moves from `data_structure.hpp` to `options.hpp`. `data_structure.hpp` includes `options.hpp`, so existing includes compile. - `WriteOptions` gets doc comments. Members, types, defaults, and behaviour do not change. # Breaking changes None # AI Usage Statement - Harness: Claude Code via T3 Code. Model: Claude Opus 5.5 (`claude-opus-5-5`). Effort: xhigh. - Role: wrote the generator entry, string-map bridge, binding wiring, tests, and this description. Ran the doc-claim, mutation, layout, and Linux container checks. The author reviews every change and claim. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
