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

The state of the project. #123

Open
husio opened this issue May 25, 2021 · 8 comments
Open

The state of the project. #123

husio opened this issue May 25, 2021 · 8 comments
Assignees

Comments

@husio
Copy link
Contributor

husio commented May 25, 2021

I was wondering what is the state of this repository. I think crawshaw/sqlite is an amazing take on the SQLite driver for Go. It seems though that the original authors are not able to spend time on it right now.
There are many pull requests and issues open. Most of them are addressed initially, but the author is waiting for response by the repository maintainer. I understand this is because of lack of time rather than anything else.

I believe the repository is not dead, it's just resting :) Is there a way to help with the crawshaw/sqlite maintanance? Is there anything that can be done in order to help with the pending pull request list?

@AdamSLevy
Copy link
Collaborator

Hey all,

Many apologies for not staying current with this repo. I too really love this package but haven't had much occasion to use it as of late, and between life and work I have lapsed as a maintainer.

I will try to circle through the open issues and PRs and perform some triage and updates this weekend.

@anacrolix
Copy link
Contributor

@AdamSLevy consider opening up maintainership to several contributors. I'm sure with some good communication they can manage the project appropriately. There are quite a few PRs that are very suitable to be merged, and others with some guidance.

@AdamSLevy
Copy link
Collaborator

Certainly.

I'm not sure I have the permissions to grant push access to others but I will come up with a short list based on past contributions and try to reach out to @crawshaw about adding maintainers.

If anyone is interested feel free to comment here for consideration.

@AdamSLevy AdamSLevy self-assigned this Oct 6, 2021
@anacrolix
Copy link
Contributor

Consider me for your short-list: I'm currently using this library extensively across several projects in production, in open-source and for my employer, in several different arrangements including the Pool and Blob implementations, different journal modes, and a mix of single and multi-process use cases. I have a fork or two, including using more recent versions of sqlite due to some needed features there, so quite a bit of test and use case coverage.

@AdamSLevy
Copy link
Collaborator

Brief update: I have not reached out to @crawshaw about this yet, but I have taken the time to go through as many PRs and issues as possible this weekend and have cleaned up and merged several as well as updating the package to the latest SQLite 3.36.0 release.

If we are going to add another maintainer I'd like to ensure we're on the same page with the direction of this repo and project. Up to this point it's just been my opinions, and my interpretations of David Crawshaw's intentions based on open issues and the code itself. But with more people getting involved its worth shoring that up. It would also make contributing and accepting contributions easier.

So here are some thoughts about that.

  • One of the strengths of the sqlite package is that it is a relatively thin wrapper around the C APIs. In general if you understand the sqlite C APIs, you can understand the Go package APIs. At the same time the Go APIs are designed to hide all of the CGo complexity and protect you from major design pitfalls or implementation errors. For example the caching of prepared statements and the lifecycle management of those objects with the lifecycle management of a Conn. (Note this still isn't perfect. For example I still see people calling Stmt.Finalize when using Conn.Prepare.)
  • This ties in with the last strength, but by staying close to the C API design, we offer the power of SQLite native features such as their nested transaction support and provide what is IMO a very nice Golang API for this. I would like to continue to expand support of SQLite3 features into the Go API.
  • An apparent design goal of the sqlite package is to be TinyGo compatible. I haven't actually tried to use TinyGo with it, but this is the reason the sqlite package does not import context or perform reflection. sqlitex provides these nicer APIs that are more abstracted from the complexity of preparing statements. I would like to maintain this design goal and even expand CI testing to ensure sqlite can be built with the TinyGo toolchain.
  • Another strength of this package is its test coverage and general code quality and documentation. Keeping this high is of top priority. Part of that is ensuring that the API design encourages proper use or is not easy to misuse or misunderstand. For example consider my comment on this rejected PR: added pool.Size() and pool.ExecScript() #108 (comment)
  • It should go without saying but correct C memory management is of top importance. Haven't given it much thought but adding testing coverage to detect memory leaks would be valuable if possible.

In any case let me know what you think about these design goals and how we might formalize some of them.

@anacrolix
Copy link
Contributor

I think this project is significantly lagging other implementations in this space. zombiezen.com/go/sqlite provides a much more complete experience and a much tidier API. This implementation only retains relevance vs. zombiezen.com/go/sqlite in that it uses C underneath, and retains compatibility with other C code intended for use with sqlite (such as extensions).

I do not think updates are being provided in a sufficiently timely manner. I also think that while test coverage is good, it should not be at the expense of relevance and a reasonable feature set. Upstream sqlite updates are slow to arrive. There has been no tagged release in several years.

It's my view that the current maintainer is not meeting the needs of the project. They had ample opportunity to seek support earlier in this thread and failed to do so.

I think open source authors don't owe anyone anything, but in this case the maintainer is not even the original author. Access to low-level sqlite3 functionality is of elevated interest in the community right now, and the handling of this repo is becoming a missed opportunity.

This wouldn't be such an issue if long-lived forks in Go weren't so difficult to manage as dependencies across non-trivial projects, but unfortunately they are and here we are.

@boutros
Copy link

boutros commented Feb 14, 2023

Since the original creator is busy with other stuff (and also seems to be maintaining another sqlite lib over at github.com/tailscale/sqlite), I was thinking maybe some of us interested in seeing this lib moving forward could create a github organization and maintain a fork of this driver?

I don't mean to disrespect the effort which the creator and maintainers have put into this repo, and I am very greatfull for the value it allready has provided, but am simply interested in keeping upstream sqlite in sync and also try to look into the issues and bugs.

Just a thought!

@anacrolix
Copy link
Contributor

I have started a fork here: https://github.com/go-llsqlite/llsqlite. Numerous fixes and PRs from this project have been merged into it already (it represents the crawshaw-based sqlite version I use in production on multiple projects. Feel free to message me about it, request maintainer privileges and submit PRs.

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

No branches or pull requests

4 participants