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

Use read_exact instead of read_exact_at #325

Merged
merged 1 commit into from
Aug 27, 2023

Conversation

avinassh
Copy link
Member

I am trying to use libsql API library and aiming to cross compile my app across OS. Currently it uses a *nix OS specific import and can't be used on Windows. This patch tries to fix that.

  • We are using read_exact_at but at offset zero, so it is same as read_exact
  • Earlier, it was reading twice into buffer. Any particular reason for that? I changed it to read it once

@avinassh
Copy link
Member Author

This PR currently breaks, but #324 fixes the import error

@avinassh avinassh changed the title Use read_at instead of read_exact_at Use read_exact instead of read_exact_at Aug 26, 2023
@penberg
Copy link
Collaborator

penberg commented Aug 26, 2023

Hey @avinassh! The change looks good to me, but I also wonder why we're reading twice. Let's try to get @MarinPostma or @psarna to have a look at this before merging.

@MarinPostma
Copy link
Contributor

Looks good. Idk why we were reading twice, likely a mistake

@MarinPostma
Copy link
Contributor

Do we want to bother with making sqld compile on windows? Just asking

@penberg
Copy link
Collaborator

penberg commented Aug 27, 2023

@MarinPostma Sure, I think it's good to keep stuff running on Windows when possible.

@penberg penberg merged commit d75c602 into tursodatabase:main Aug 27, 2023
1 of 4 checks passed
@avinassh avinassh deleted the read_at branch August 27, 2023 07:59
github-merge-queue bot pushed a commit that referenced this pull request Oct 17, 2023
325: remove posgres wire over ws, and refactor r=MarinPostma a=MarinPostma

remove posgres wire porotocol over websocket and refactor to simlify architecture


Co-authored-by: ad hoc <[email protected]>
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.

3 participants