Rename Sandbox Token Source to Development Token Source - #994
Rename Sandbox Token Source to Development Token Source#994MaxHeimbrock wants to merge 4 commits into
Conversation
…fromSandboxTokenServer Aligns with the cross-SDK rename of the sandbox token source to development token source (client-sdk-js#2032, client-sdk-swift#1077, client-sdk-unity#366). SandboxTokenServerOptions is kept as a deprecated typealias of DevelopmentTokenServerOptions and fromSandboxTokenServer delegates to the new factory, so existing code keeps compiling. The wire protocol (endpoint URL and X-Sandbox-ID header) is unchanged. Also adds a Token sources section to the README. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 4973d87 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Diffuse output: AARJAR |
…ibility A typealias only exists at compile time, so the JVM class shipped in v2.21.0-v2.27.0 would disappear from the artifact, breaking already compiled apps and Java consumers. Restoring the data class (and the original fromSandboxTokenServer signature) preserves the released ABI. Also adds the KDoc required for public APIs to the deprecated members. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| * @see fromDevelopmentTokenServer | ||
| */ | ||
| @Suppress("DEPRECATION") | ||
| @Deprecated("Use fromDevelopmentTokenServer instead", ReplaceWith("fromDevelopmentTokenServer(sandboxId, options)")) |
There was a problem hiding this comment.
🟡 Automated migration hint for the old token helper produces code that does not compile
The suggested automatic replacement text attached to the old helper (ReplaceWith("fromDevelopmentTokenServer(sandboxId, options)") at livekit-android-sdk/src/main/java/io/livekit/android/token/TokenSource.kt:222) passes along the old options object, which the new helper does not accept, so applying the IDE's one-click migration leaves users with broken code.
Impact: Developers who accept the suggested upgrade get a build error instead of a working migration.
Type mismatch between old and new options types in ReplaceWith
fromDevelopmentTokenServer takes DevelopmentTokenServerOptions, while the deprecated fromSandboxTokenServer parameter options is of type SandboxTokenServerOptions (livekit-android-sdk/src/main/java/io/livekit/android/token/EndpointTokenSource.kt:64-66). The ReplaceWith expression forwards options unchanged, so the produced call is type-incorrect. The same problem exists for the class-level hint ReplaceWith("DevelopmentTokenServerOptions(baseUrl)") at livekit-android-sdk/src/main/java/io/livekit/android/token/EndpointTokenSource.kt:63, which is not a valid replacement for a type reference.
| @Deprecated("Use fromDevelopmentTokenServer instead", ReplaceWith("fromDevelopmentTokenServer(sandboxId, options)")) | |
| @Deprecated("Use fromDevelopmentTokenServer instead", ReplaceWith("fromDevelopmentTokenServer(sandboxId, DevelopmentTokenServerOptions(options.baseUrl))")) |
Was this helpful? React with 👍 or 👎 to provide feedback.
Aligns with the cross-SDK rename of the sandbox token source to development token source (client-sdk-js#2032, client-sdk-swift#1077, client-sdk-unity#366).
SandboxTokenServerOptions is kept as a deprecated typealias of DevelopmentTokenServerOptions and fromSandboxTokenServer delegates to the new factory, so existing code keeps compiling. The wire protocol (endpoint URL and X-Sandbox-ID header) is unchanged. Also adds a Token sources section to the README.
Picked up in #995