-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
WIP: Use pure go sqlite driver instead of cgo go-sqlite3 and remove go build tags related with sqlite #15002
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
Conversation
…ld tags related with sqlite
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two questions:
- Why does this library bring its own C library?
- How does adding far more code improve compile time?
@@ -69,7 +69,7 @@ func initDBEngine(ctx context.Context) (err error) { | |||
for i := 0; i < setting.Database.DBConnectRetries; i++ { | |||
select { | |||
case <-ctx.Done(): | |||
return fmt.Errorf("Aborted due to shutdown:\nin retry ORM engine initialization") | |||
return fmt.Errorf("aborted due to shutdown:\nin retry ORM engine initialization") |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's GO styling. GO standard says: every error message starts with lower-case. Please read the standards.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
After reading the code of The ps: I haven't done any test and I am not sure how much time could be save by this Go-sqlite during Gitea compiling, just leave a comment about how it works. |
I think much time and memory in developer's machine and CI agents will be saved when CGO is gone. Because we can drop the xgo to do cross-compile. When using xgo, you have to check or download a very big image(about 5GB) and spent many time to compile because c++ compile is slower than pure Go. |
This PR tries to use pure go sqlite driver instead of cgo go-sqlite3 for better compile time.