Public headers require C++23, forcing the same on every consumer
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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++
- 星标
- 223
- 派生
- 127
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 28
环境准备
我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/iceberg-cpp 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
apache/iceberg-cpp#973 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 20/100
apache/iceberg-cpp#959 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
apache/iceberg-cpp#955 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
apache/iceberg-cpp#946 · 5 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 45/100
apache/iceberg-cpp#944 ·
维护者通常 1 天内回复
查看 apache/iceberg-cpp 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
cp-algorithms/cp-algorithms#1715 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
Icinga/icinga2#11058 · 1 条评论 ·
维护者通常 1 天内回复
-
status:needs-triage
难度 2/5 1-3 小时 新手友好度 88/100
PX4/PX4-Autopilot#28924 ·
维护者通常 1 天内回复
-
component: split-view platform: windows
难度 2/5 1-3 小时 新手友好度 74/100
zen-browser/desktop#15616 · 1 个 reaction ·
维护者通常 1 天内回复