Skip to content

Commit 3b515ed

Browse files
authored
GH-50394: [Docs][C++] Reduce Sphinx warnings when building HTML (#50396)
### Rationale for this change Fixes Sphinx warnings during the docs build. Doxygen/Breathe expose the multi-line lambda initializers on `writer_pre_finish`/`writer_post_finish` and the macros `ARROW_SUPPRESS_DEPRECATION_WARNING` / `ARROW_UNSUPPRESS_DEPRECATION_WARNING` to Sphinx C++ parses which can't parse them. ### What changes are included in this PR? Added `\hideinitializer` to `dataset/file_base.h` and `dataset/scanner.h`. Added `ARROW_SUPPRESS_DEPRECATION_WARNING` and `ARROW_UNSUPPRESS_DEPRECATION_WARNING` to `apidoc/Doxyfile` PREDEFINED list so Doxygen strips them from declarations. ### Are these changes tested? Yes, locally and on fork CI - logs [AMD64 Debian 12 Complete Documentation](https://github.com/tadeja/arrow/actions/runs/28794724664/job/85382053293#step:7:5577): `build succeeded, 15 warnings.` (down from [26 warnings on main](https://github.com/apache/arrow/actions/runs/28808141817/job/85428862231#step:7:5654)) ### Are there any user-facing changes? No. * GitHub Issue: #50394 Authored-by: Tadeja Kadunc <tadeja.kadunc@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 98a92c2 commit 3b515ed

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

cpp/apidoc/Doxyfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2484,6 +2484,8 @@ PREDEFINED = __attribute__(x)= \
24842484
ARROW_EXTERN_TEMPLATE= \
24852485
ARROW_FLIGHT_EXPORT= \
24862486
ARROW_FLIGHT_SQL_EXPORT= \
2487+
ARROW_SUPPRESS_DEPRECATION_WARNING= \
2488+
ARROW_UNSUPPRESS_DEPRECATION_WARNING= \
24872489
GANDIVA_EXPORT= \
24882490
PARQUET_EXPORT=
24892491

cpp/src/arrow/dataset/file_base.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,12 +451,14 @@ struct ARROW_DS_EXPORT FileSystemDatasetWriteOptions {
451451

452452
/// Callback to be invoked against all FileWriters before
453453
/// they are finalized with FileWriter::Finish().
454+
/// \hideinitializer
454455
std::function<Status(FileWriter*)> writer_pre_finish = [](FileWriter*) {
455456
return Status::OK();
456457
};
457458

458459
/// Callback to be invoked against all FileWriters after they have
459460
/// called FileWriter::Finish().
461+
/// \hideinitializer
460462
std::function<Status(FileWriter*)> writer_post_finish = [](FileWriter*) {
461463
return Status::OK();
462464
};

cpp/src/arrow/dataset/scanner.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ struct ARROW_DS_EXPORT ScanOptions {
150150
std::vector<FieldRef> MaterializedFields() const;
151151

152152
/// Parameters which control when the plan should pause for a slow consumer
153+
/// \hideinitializer
153154
acero::BackpressureOptions backpressure =
154155
acero::BackpressureOptions::DefaultBackpressure();
155156
};

0 commit comments

Comments
 (0)