Public headers require C++23, forcing the same on every consumer
維護者通常 3 天內回覆
已經有一個關聯 PR 被合併了。
- #936 來自 @PingLiuPing —— 已合併
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 42/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- cmake, cpp
- 領域
- api, build-system
研究方向
從 CMakeLists.txt:35 和公開標頭檔 src/iceberg/result.h 開始,接著追蹤列出的、暴露 Result 的 Catalog 進入點。將所需的 C++23 程式庫功能與 issue 中提到的較舊 toolchain 進行比較。完成的標準是:使用者無需採用 C++23 即可 include 並使用公開 API,同時程式庫本身的原始碼仍可繼續以 C++23 建置,且 API 形狀維持不變。
由索引模型根據 Issue 內容生成。
描述
CMakeLists.txt:35 sets CMAKE_CXX_STANDARD 23, which is a fine choice for the
library's own sources. The requirement is not confined to them, though.
src/iceberg/result.h includes <expected> and <format>, and defines:
template <typename T, typename E = typename DefaultError<T>::type>
using Result = std::expected<T, E>;
using Status = Result<void>;
Result<T> is the return type of most public entry points —
Catalog::ListNamespaces, ListTables, LoadTable, CreateTable,
StageCreateTable and so on. Every consumer translation unit that calls them
must therefore compile as C++23 as well. std::expected needs libstdc++ 12 or
libc++ 16 and <format> needs libstdc++ 13, so a consumer on an older but still
widely deployed toolchain cannot include the headers at all.
This matters for the engines the library is meant to be embedded in: Velox
builds as C++20, Arrow as C++17, DuckDB as C++11. Integrating leaves two
options — move the whole engine to C++23, or add an isolation layer whose only
purpose is keeping iceberg-cpp headers out of the rest of the build. We are
looking at iceberg-cpp for an Iceberg connector in
Axiom, which builds on Velox at
C++20, and would rather do neither.
Would you consider making the public error type portable while keeping the API
shape unchanged?
#if defined(__cpp_lib_expected)
template <typename T, typename E = typename DefaultError<T>::type>
using Result = std::expected<T, E>;
#else
// vendored fallback with the same interface
#endif
arrow::Result, absl::StatusOr and tl::expected all exist for this reason.
The library's own sources could keep building as C++23; only the public headers
would need to hold a lower baseline.
Happy to send a patch if the direction is agreeable.
cc @PingLiuPing, who is proposing the Iceberg connector for Axiom.
- 主要語言
- C++
- 星號
- 228
- 分支
- 136
- 平均合併
- 4 天 18 小時
- 30 天內合併 PR
- 61
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/iceberg-cpp 的其他 Issue
-
Parquet reader: fall back to positional field IDs when a file has no field IDs and no name mapping未關閉
難度 4/5 3-5 天 新手友好度 45/100
apache/iceberg-cpp#1046 ·
維護者通常 3 天內回覆
-
難度 5/5 一週以上 新手友好度 12/100
apache/iceberg-cpp#1027 · 3 則留言 ·
維護者通常 3 天內回覆
-
難度 4/5 3-5 天 新手友好度 35/100
apache/iceberg-cpp#1000 · 2 則留言 · 1 個 reaction ·
維護者通常 3 天內回覆
-
難度 5/5 一週以上 新手友好度 8/100
apache/iceberg-cpp#988 · 2 則留言 ·
維護者通常 3 天內回覆
-
難度 5/5 一週以上 新手友好度 20/100
apache/iceberg-cpp#959 · 1 則留言 ·
維護者通常 3 天內回覆
查看 apache/iceberg-cpp 的全部 Issue
相似的 Issue
-
(S1 - Need confirmation)
難度 2/5 1-3 小時 新手友好度 68/100
CleverRaven/Cataclysm-DDA#89212 ·
維護者通常 1 天內回覆
-
Status: Needs confirmation Status: Needs triage
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
ai_p2 comp-dictionary
難度 2/5 1-3 小時 新手友好度 78/100
ClickHouse/ClickHouse#127261 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
NVIDIA-Omniverse/usd-brep#23 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
qbittorrent/qBittorrent#25121 ·
維護者通常 2 天內回覆