Skip to content

Visibility controls on public API#121

Merged
alan-george-lk merged 19 commits into
mainfrom
bugfix/truly_private_spdlog
May 11, 2026
Merged

Visibility controls on public API#121
alan-george-lk merged 19 commits into
mainfrom
bugfix/truly_private_spdlog

Conversation

@alan-george-lk
Copy link
Copy Markdown
Collaborator

@alan-george-lk alan-george-lk commented May 7, 2026

This PR changes the following:

  • Define LIVEKIT_API macro to expose LiveKit API symbols across platforms (common convention, example)
  • All symbol visibility hidden by default otherwise
  • Update relevant class/method symbols with this new macro
  • Made include prefixes consistent for public API (all now use #include "livekit/<blah" convention, updated AGENTS.md to define this rule
  • Hide third-party symbols from consumers
    • spdlog was installed at the system level in CI (and documented for users to install at that level), but was brought in via FetchContent/vcpkg. This is no longer needed (system install). Removed that flow and deprecated the CMake argument/functionality for using system level spdlog. It is now entirely within the SDK and fully private/no symbols exposed to clash

Testing

  • Built against/linked in downstream project that originally exposed this issue (suspected spdlog clash with third-party lib)
    • Without this fix and conflicting spdlog: process has deied [pid 5915, exit code -7...
  • Added tester script to tests.yml CI stage to catch this across all OS moving forward, with the small caveat that we need to ensure any new deps are added to the symbol check
  • Unit/integration tests are standalone binaries that practice this linking, ensured they still worked via CI
Screenshot 2026-05-11 at 11 23 44 AM

@alan-george-lk alan-george-lk changed the title Visibility/export controls on public API Visibility controls on public API May 8, 2026
Comment thread .github/workflows/builds.yml
Comment thread include/livekit/local_audio_track.h Outdated
Comment thread .github/scripts/check_no_private_symbols.py
Comment thread .github/workflows/builds.yml Outdated
Comment thread AGENTS.md Outdated
Comment thread .github/workflows/builds.yml
@alan-george-lk alan-george-lk marked this pull request as ready for review May 11, 2026 17:05
Copy link
Copy Markdown
Collaborator

@stephen-derosa stephen-derosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- is there any test we can run to make sure we arent missing the LIVEKIT_API macro for items that should be public?

Comment thread .github/workflows/tests.yml Outdated
Copy link
Copy Markdown
Collaborator

@xianshijing-lk xianshijing-lk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm assuming the check will be moved to release CI flow

@alan-george-lk alan-george-lk merged commit 1ea0bca into main May 11, 2026
22 checks passed
@alan-george-lk alan-george-lk deleted the bugfix/truly_private_spdlog branch May 11, 2026 22:08
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.

3 participants