Skip to content

Use the full osctap/ prefix in all project includes - #28

Merged
tap merged 1 commit into
mainfrom
claude/header-include-quotes-4l9ue3
Aug 7, 2026
Merged

Use the full osctap/ prefix in all project includes#28
tap merged 1 commit into
mainfrom
claude/header-include-quotes-4l9ue3

Conversation

@tap

@tap tap commented Aug 7, 2026

Copy link
Copy Markdown
Owner

What this changes

Every project include in the tree — shipped headers, tests, demos, examples, fuzz targets, and the Android JNI bridge — now uses the full "osctap/ip/..." / "osctap/osc/..." path from the repo root instead of the bare "ip/..." / "osc/..." forms. The now-redundant extra include dir (include_directories(osctap) at the root, ${OSCTAP_ROOT}/osctap in the Android build) is dropped, the ClusterFuzzLite build script and the CI fuzz-smoke job switch from -I osctap to -I ., and the doc snippets are updated to match.

Why

The headers under osctap/ included their cross-directory siblings as "ip/..." / "osc/...", which only resolves when the osctap/ directory itself is on the include path. The exported tap::osc INTERFACE target only adds the repo root, so an external CMake consumer including <osctap/ip/TcpSocket.h> failed at #include "ip/IpEndpointName.h". With the full prefix, a single include root (the repo root) serves the library's internal includes, the public <osctap/...> prefix, and the deprecated <oscpack/...> shim alike.

Two deliberate exceptions: tests/OscUnitTests.cpp keeps "OscUnitTests.h" (test-local header, resolves relative to its own file), and CompatIncludeShim.cpp keeps its <oscpack/...> includes, since regressing that path is exactly what it guards against.

Verification

  • Reproduced the bug on main: a consumer TU including <osctap/ip/TcpSocket.h> with only the repo root on the include path dies at ip/IpEndpointName.h: No such file or directory. The same TU compiles clean on this branch.
  • Full CMake build with OSCPACK_BUILD_EXAMPLES=ON and OSCTAP_FREESTANDING=ON: all 10 ctest tests pass, including CompatIncludeShim.
  • Fuzz smoke build per the updated recipe (g++ -I . -fsanitize=address,undefined fuzz/fuzz_parse.cpp fuzz/standalone_main.cpp): replayed 4 seeds + 200k mutations, no crash.
  • pre-commit run (clang-format) passes.
  • Not run here: Windows/MinGW CI legs, the Android NDK build, and the ClusterFuzzLite Docker build — CI is the first real gate for those. The Pico 2 W doc snippet is doc-only and untested on hardware.

Notes for the reviewer

  • Contract change. The bare-include style (-I <repo>/osctap + #include "osc/...") no longer works; the supported spellings are <osctap/...> (or the deprecated <oscpack/...>) with the repo root on the include path. Any out-of-tree consumer that copied the old bare style from the docs (e.g. the Pico snippet in EMBEDDED_PICO2W.md) needs the one-line include-path/prefix update; in-tree consumers are all migrated in this PR.
  • If there is an upstream OSS-Fuzz projects/osctap build script mirroring .clusterfuzzlite/build.sh (STATUS.md hints at one), it needs the same -I osctap-I . tweak.

🤖 Generated with Claude Code

https://claude.ai/code/session_017DGP2KmVV5B9RURrXigPRZ


Generated by Claude Code

The headers under osctap/ included their cross-directory siblings as
"ip/..." / "osc/...", which only resolves when the osctap/ directory
itself is on the include path. The exported tap::osc INTERFACE target
only adds the repo root, so an external consumer including
<osctap/ip/TcpSocket.h> died at "ip/IpEndpointName.h" (verified against
main). Every project include in the tree — shipped headers, tests,
demos, examples, fuzz targets, and the Android JNI bridge — now uses the
full "osctap/..." path from the repo root, so a single include root
serves both the library's internal includes and the public <osctap/...>
prefix (plus the deprecated <oscpack/...> shim).

The extra osctap/ include dir is dropped from the root and Android CMake
builds, the ClusterFuzzLite build script and CI fuzz-smoke job switch
from -I osctap to -I ., and the doc snippets are updated to match. The
only remaining bare include is tests/OscUnitTests.h, a test-local header
that resolves relative to its own file. CompatIncludeShim.cpp keeps its
deliberate <oscpack/...> includes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017DGP2KmVV5B9RURrXigPRZ
@tap
tap merged commit 9223e0e into main Aug 7, 2026
36 checks passed
@tap
tap deleted the claude/header-include-quotes-4l9ue3 branch August 7, 2026 20:57
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.

2 participants