Skip to content

[AIT-124] Proposal for how the path-based API will look in Swift#128

Draft
lawrence-forooghian wants to merge 34 commits into
mainfrom
2025-12-09-path-based-api-proposal
Draft

[AIT-124] Proposal for how the path-based API will look in Swift#128
lawrence-forooghian wants to merge 34 commits into
mainfrom
2025-12-09-path-based-api-proposal

Conversation

@lawrence-forooghian
Copy link
Copy Markdown
Collaborator

@lawrence-forooghian lawrence-forooghian commented May 11, 2026

This is some work that I did in December last year, to decide how to port the JS path-based API to Swift. We never finalised the design due to shifting priorities. Now it's May 2026 and we're planning to start working on this, so I've revisited it and added some further notes.

Here's what's here (bullet points written by Claude):

  • PATH-BASED-API.md — notes (written by me) recording the design decisions made when porting the JS path-based API to Swift.

  • PATH-BASED-API-MAIN-DELTA.md (written by Claude) — what's changed in liveobjects.d.ts on ably-js main (tip 498d26df at time of writing) since this proposal was based on ably-js at 0bdd674 — the LiveObjects types have since moved out of ably.d.ts into a dedicated liveobjects.d.ts, and the new LODR-057 compact() / compactJson() split landed. The doc lists the action items the proposal needs to absorb, plus the bits that can be ignored (REST API, batch context).

  • PATH-BASED-API-JAVA-PYTHON-COMPARISON.md (written by Claude) — how this Swift proposal compares to the parallel Java / Python path-based API proposal in ably-java#1190 (reviewed at commit be13cdc). Picks out the conversion-specific decisions (the ones not inherited from the cross-SDK path-based design) and notes where Swift and Java/Python diverge.

  • The rest of the PR rewrites Sources/AblyLiveObjects/Public/PublicTypes.swift into the proposed Swift surface and adds an example.swift demonstrating the proposed usage.

  • It's also worth listening to this Fellow call, in which we discuss the path-based API and some design decisions in porting it to Swift. (Stick around until the description of how I've handled cyclical references in the Swift compact object representation, but you don't need to listen to the final discussion about how to change the JS compact API because that's already been done in JS now.) [AIT-124] Sketch of how user-specified types might work in Swift #129 builds on the current PR to explore the codegen approach described in that call.

Related tickets

  • AIT-124 — Swift Path-based LO API: understand how to implement in Swift (this PR)
  • AIT-354 — Swift path-based api without user specified types (the implementation work this proposal is meant to inform)
  • AIT-455 — Implicit attach getRoot() (action item 2 in the delta doc)

Preparation for trying to add the public path-based API from JS, whilst
still being able to use `swift build` to check that the API itself compiles.
The latest commit on the integration/objects-breaking-api (i.e.
path-based API) branch at the moment.

Will remove stuff from here as it's migrated to Swift.
It's now only used as an input to operations
now that it's only input people shouldn't need to query these

Note that we don't have an output equivalent any more
This document was generated by Claude; take with a pinch of salt. But
the gist seems to be what I was expecting — that not _much_ has changed;
largest thing is the changes to the compaction APIs, which we have an
issue to track.
Again, Claude-authored with my input; lightly reviewed.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d9eb8db5-863f-4482-9170-4e5cb1d81d47

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2025-12-09-path-based-api-proposal

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant