Skip to content

feat: make SnapshotUtil a public installed header#4

Open
smaheshwar-pltr wants to merge 2 commits into
mainfrom
make-snapshot-util-public
Open

feat: make SnapshotUtil a public installed header#4
smaheshwar-pltr wants to merge 2 commits into
mainfrom
make-snapshot-util-public

Conversation

@smaheshwar-pltr
Copy link
Copy Markdown
Owner

@smaheshwar-pltr smaheshwar-pltr commented Apr 16, 2026

Issue

Closes #8

SnapshotUtil provides essential snapshot operations (ancestry traversal, time-travel queries, schema lookup) that consumers using iceberg-cpp via find_package(iceberg) need. The class is marked ICEBERG_EXPORT (public ABI), but the header is named snapshot_util_internal.h. The iceberg_install_all_headers CMake function skips filenames containing "internal", so the header is never installed.

Consumers using iceberg-cpp as an installed package hit:

fatal error: 'iceberg/util/snapshot_util_internal.h' file not found

PR

  • Renames snapshot_util_internal.h to snapshot_util.h so it is included in the installed headers
  • The iceberg_install_all_headers CMake function skips filenames containing "internal", which prevented downstream consumers using find_package(iceberg) from accessing SnapshotUtil without vendoring a copy
  • The class is already marked ICEBERG_EXPORT (public ABI), so the _internal suffix was inconsistent with the intended visibility

Motivation

SnapshotUtil provides essential snapshot operations (ancestry traversal, time travel queries, schema lookup) that any engine built on iceberg-cpp needs. The class was always intended to be public (evidenced by the ICEBERG_EXPORT macro), but the _internal filename suffix prevented the header from being installed.

Changes

  • src/iceberg/util/snapshot_util_internal.h -> src/iceberg/util/snapshot_util.h
  • Updated all 7 source files that #include this header

No CMake or Meson build file changes needed -- the .cc file was already named snapshot_util.cc, and the install function works by globbing *.h and filtering out *internal* names.

Test plan

  • Existing snapshot_util_test continues to pass (include path updated)
  • Verify header appears in install directory after cmake --install

Rename snapshot_util_internal.h to snapshot_util.h so that it is
included in the installed headers. The iceberg_install_all_headers
CMake function skips any header whose filename contains "internal",
which prevented downstream consumers using find_package(iceberg)
from accessing SnapshotUtil without vendoring a copy.

The class is already marked ICEBERG_EXPORT (public ABI), so the
"_internal" suffix was inconsistent. SnapshotUtil provides essential
snapshot operations (ancestry traversal, time travel, schema lookup)
that engines built on iceberg-cpp need.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@smaheshwar-pltr smaheshwar-pltr force-pushed the make-snapshot-util-public branch from 7ffc6d8 to 4908911 Compare April 16, 2026 22:47
@smaheshwar-pltr smaheshwar-pltr marked this pull request as draft April 16, 2026 22:48
@smaheshwar-pltr smaheshwar-pltr marked this pull request as ready for review April 17, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SnapshotUtil header not installed — filename contains 'internal'

1 participant