tursodatabase / tursodatabase/libsql-client-ts
`createClient` using embedded replica blocks on I/O
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 576
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
createClient should not block the caller at all, nor throw errors unrelated to the validity of the parameters it receives. An example of a thrown error can be seen in #98.
Seems related to https://github.com/libsql/libsql-js/issues/22
Instead, the SDK should try to connect asynchronously after client creation, and defer any errors to first async method call on the client. Either that, or there should be a new client factory function that returns a promise instead of a client object and operates entirely async.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the createClient implementation and reproduce the synchronous failure described in issue #98. Review the related libsql issue #22 for context. Done means client creation performs no blocking I/O or unrelated synchronous throws, with connection errors deferred to the first asynchronous client method or handled by an asynchronous factory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sqlite, typescript
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100