Repository navigation
Backlog
Labels
enhancementNew feature or requestknown-downstream-workaroundsDownstream consumer pain or workaround observed in real-world OSS reposneeds-triageMaintainer needs to evaluate this issue
Description
Part of #138
Popularity: 3/7 corpus consumers (cuda-quantum, holoscan-sdk, slang-server)
Problem
reflect-cpp (v0.25.0) requires C++ exceptions and RTTI even though its public error-reporting API (rfl::Result<T>) is value-based (expected-style). Large compiler/runtime ecosystems (LLVM/MLIR), WASI builds, and low-level SDK components compile with -fno-exceptions and/or -fno-rtti, forcing consumers either to selectively re-enable -fexceptions -frtti on every TU touching reflect-cpp (and on reflectcpp itself) or to exclude reflect-cpp from exception-free public codec layers altogether.
Observed Downstream Workarounds
NVIDIA/cuda-quantum (90e4aa08)
- LLVM/MLIR builds default to
-fno-exceptions -fno-rtti, socuda-quantummust explicitly re-enable both flags on every target that builds or consumes the target config / YAML / reflection layer:cudaq/lib/Target/CMakeLists.txt#L53(CUDAQTargetConfig)cudaq/lib/Target/CMakeLists.txt#L74(CUDAQTargetYamlObjects)cudaq/lib/Target/CMakeLists.txt#L120(CUDAQTargetCatalog)cudaq/lib/Target/test/CMakeLists.txt#L51(TargetCatalogTestDriver)
target_compile_options(CUDAQTargetYamlObjects PRIVATE "-fexceptions" "-frtti")
nvidia-holoscan/holoscan-sdk (358c772f)
tests/config/CMakeLists.txt#L17-L29(andtests/config/no_exceptions_codec.cpp#L100-L114):holoscan::configenforces-fno-exceptions//EHs-c-compilation in CI (config_no_exceptions_compile), which keepsreflect-cppisolated behind a private test-only adapter rather than usable in public header/codec code.
hudson-trading/slang-server (1b413a46)
slang-servermust explicitly append-fexceptionsdirectly onto thereflectcpptarget (CMakeLists.txt#L317-L321) and globally enable-fexceptionsunder WASI (CMakeLists.txt#L125-L126):# Suppress warnings in reflect-cpp library if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") target_compile_options(reflectcpp PRIVATE -Wno-missing-field-initializers -Wno-unused-parameter -fexceptions) endif()
Impact
- Prevents header-only compile-time reflection (
rfl::to_view,rfl::enums,rfl::type_name) from being used cleanly inside-fno-exceptions -fno-rttiLLVM/MLIR, WASI, or embedded SDK translation units without per-target flag overrides.
Upstream Overlap
- Make sure it compiles with fno-exceptions munich-data-engineering/reflect-cpp#71 (open, exact for
-fno-exceptions, partial overall) — "Make sure it compiles with fno-exceptions", opened by maintainer@liuzicheng1987in March 2024 and still open. Related incremental PRs: Added support for exception-free TOML; resolves #436 munich-data-engineering/reflect-cpp#447 (merged, exception-free TOML), Use the jsoncons non-throwing versions of decode for cbor and ubjson munich-data-engineering/reflect-cpp#550 (merged, non-throwing CBOR/UBJSON decode), and Avoid needless copies, allocations and exceptions when reading and writing munich-data-engineering/reflect-cpp#767 (merged, non-throwing validator read); however, Use exceptions inside the writers munich-data-engineering/reflect-cpp#535 (merged) introduced exceptions inside writers. - Unfiled upstream:
-fno-rttisupport.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestknown-downstream-workaroundsDownstream consumer pain or workaround observed in real-world OSS reposneeds-triageMaintainer needs to evaluate this issue
Activity