Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECO-4900] First attempt at defining public API #6

Closed
wants to merge 2 commits into from

Conversation

lawrence-forooghian
Copy link
Collaborator

No description provided.

@lawrence-forooghian lawrence-forooghian force-pushed the ECO-4900-public-interface branch from e59e032 to 61ae43f Compare August 14, 2024 15:26
Based on JS at 0b4b0f8.

The entry point is the DefaultChatClient class.

Chose to use existential types when one protocol returns another (i.e.
`-> any MyProtocol`) instead of associated types, because it’s more
readable and I don’t think that we need to worry about the performance
implications.

turned on explicit_acl, but just for the library — it's a handy thing to
have to make sure you've not missed making anything public, but we don’t
need it for BuildTool

(For future reference, generate memberwise initializers in Xcode by
clicking at the start of the type declaration and doing Editor ->
Refactor -> Generate Memberwise Initializer.)

Skipped copying the docstrings from JS; created #1 to do this later.
Turned off missing_docs for now.

We’ll be able to validate this API when we do #4, which will create a
mock implementation of this API and then build the example app around
the mock.

Some stuff is up in the air until we start trying to implement, too.

maybe have been too liberal with Sendable

not sure if the types where `subscribe()` just returns a subscription
could be sequences themselves, i still don't understand the nuance of
buffering and whatnot, what happens if you share them

so the api decided on is that there are no responses, you can directly iterate over what comes out (because there’s no need for an `off()`)
@lawrence-forooghian lawrence-forooghian force-pushed the ECO-4900-public-interface branch from 61ae43f to 4c2c98a Compare August 14, 2024 16:08
@lawrence-forooghian lawrence-forooghian deleted the ECO-4900-public-interface branch August 15, 2024 09:19
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