Skip to content

Final naming consistency pass before 1.0 freeze#89

Merged
AndroidPoet merged 1 commit into
mainfrom
audit/final-naming
Jun 26, 2026
Merged

Final naming consistency pass before 1.0 freeze#89
AndroidPoet merged 1 commit into
mainfrom
audit/final-naming

Conversation

@AndroidPoet

Copy link
Copy Markdown
Owner

A naming-only audit of every module's public API (7 parallel read-only auditors + a cross-module acronym/factory-verb/enum-casing analysis), judged against Kotlin/JetBrains API conventions. Verdict: the surface was already in good shape — every auditor reported no blockers. This PR fixes the handful of genuine, contained violations of the SDK's own conventions and records the debatable/parity-driven cases as deliberate decisions in API_DESIGN.md.

Renames (the SDK's own convention was violated)

Before After Why
invokeSSE invokeSse acronyms are word-cased everywhere else (Url, Otp, Jwt)
Paginator.endReached isEndReached boolean reads as an assertion (sibling isLoading)
selectWithCount selectWithCountTyped it decodes into T → joins the *Typed family
setPrivate configurePrivate matches the builder's configure* group
createUploadSignedUrl(WithPath) createSignedUploadUrl(WithPath) Signed+direction order
VectorDistanceMetric.DOTPRODUCT DOT_PRODUCT legible entry; wire value kept via @SerialName
jwksUri jwksUrl siblings are all *Url; wire value kept via @SerialName

Removed (exact duplicates)

  • core SupabaseResult.toResultFlow() — identical single-emit to asFlow()
  • realtime RealtimeSubscription.statusFlow() — identical to the status property

Deliberately kept (documented in API_DESIGN.md)

Enum-casing split (UPPER_SNAKE for wire/option enums, PascalCase for the two domain-category sets), filter-operator vocabulary, factory-verb variety, rpcTyped=single vs selectTyped=list, pseudo-namespaced auth methods, the *OrThrow/*WithResult escape-hatch suffixes. Deferred (not worth pre-freeze churn; sync isn't published in 1.0): sync.Record/CursorSyncRecord/SyncCursor, RealtimeSubscription.channelchannelName.

apiDump regenerated; apiCheck + detekt + spotlessCheck + jvmTest all green; docs site builds clean. CHANGELOG + API_DESIGN.md updated.

A naming-only audit of every module's public API against the SDK's own
conventions. Fixes the handful of genuine, contained inconsistencies; the
debatable and parity-driven cases are recorded as deliberate decisions in
API_DESIGN.md.

Renames (the SDK's own convention was violated):
- invokeSSE -> invokeSse (acronyms are word-cased everywhere else)
- Paginator.endReached -> isEndReached (boolean reads as an assertion)
- database selectWithCount -> selectWithCountTyped (joins the *Typed family)
- realtime setPrivate -> configurePrivate (matches configure* builder group)
- storage createUploadSignedUrl(WithPath) -> createSignedUploadUrl(WithPath)
- storage VectorDistanceMetric.DOTPRODUCT -> DOT_PRODUCT (wire value kept)
- auth-admin OIDC jwksUri -> jwksUrl (siblings are all *Url; wire value kept)

Removed two exact duplicates:
- core SupabaseResult.toResultFlow() (identical to asFlow())
- realtime RealtimeSubscription.statusFlow() (identical to the status property)

apiDump regenerated; apiCheck + detekt + spotlessCheck + jvmTest all green;
docs site builds clean. CHANGELOG + API_DESIGN.md updated.
@AndroidPoet AndroidPoet merged commit 358e6fa into main Jun 26, 2026
9 checks passed
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.

1 participant