Use the full osctap/ prefix in all project includes - #28
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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}/osctapin the Android build) is dropped, the ClusterFuzzLite build script and the CI fuzz-smoke job switch from-I osctapto-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 theosctap/directory itself is on the include path. The exportedtap::oscINTERFACE 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.cppkeeps"OscUnitTests.h"(test-local header, resolves relative to its own file), andCompatIncludeShim.cppkeeps its<oscpack/...>includes, since regressing that path is exactly what it guards against.Verification
main: a consumer TU including<osctap/ip/TcpSocket.h>with only the repo root on the include path dies atip/IpEndpointName.h: No such file or directory. The same TU compiles clean on this branch.OSCPACK_BUILD_EXAMPLES=ONandOSCTAP_FREESTANDING=ON: all 10 ctest tests pass, includingCompatIncludeShim.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.Notes for the reviewer
-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 inEMBEDDED_PICO2W.md) needs the one-line include-path/prefix update; in-tree consumers are all migrated in this PR.projects/osctapbuild 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