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

feat: Using sqlite CGO is for building a 32-bit Windows operating system #2743

Merged
merged 13 commits into from
Aug 3, 2023

Conversation

horizon220222
Copy link
Contributor

@horizon220222 horizon220222 commented Jul 5, 2023

Why do we need to use github.com/gogf/gf/contrib/drivers/sqlitecgo/v2?

Using sqlite CGO is for building a 32-bit Windows operating system

https://github.com/glebarez/go-sqlite does not support building a 32-bit Windows operating system.

sqlite

【using CGO】github.com/mattn/go-sqlite3
【not using CGO】https://github.com/glebarez/go-sqlite

goframe driver

[using CGO]github.com/gogf/gf/contrib/drivers/sqlitecgo/v2
[not using CGO]github.com/gogf/gf/contrib/drivers/sqlite/v2

@horizon220222
Copy link
Contributor Author

You need to set the environment variable CGO_ENABLED=1 and make sure that GCC is installed on your path.

windows: https://jmeubank.github.io/tdm-gcc/

@gqcn
Copy link
Member

gqcn commented Jul 6, 2023

@horizon220222 CI failed, please have a check. You can refer to the build testing shell:
https://github.com/gogf/gf/blob/master/.github/workflows/build_and_test.sh
image

@horizon220222
Copy link
Contributor Author

I will take care of it over the weekend.

@horizon220222 horizon220222 force-pushed the master branch 2 times, most recently from 2b671a1 to 7aa92dd Compare July 9, 2023 04:34
@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2023

Codecov Report

Patch coverage: 71.34% and project coverage change: +0.01% 🎉

Comparison is base (4791581) 79.20% compared to head (80fd9d7) 79.21%.

❗ Current head 80fd9d7 differs from pull request most recent head 8bbc2e1. Consider uploading reports for the commit 8bbc2e1 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2743      +/-   ##
==========================================
+ Coverage   79.20%   79.21%   +0.01%     
==========================================
  Files         632      634       +2     
  Lines       52159    52406     +247     
==========================================
+ Hits        41310    41511     +201     
- Misses       8804     8834      +30     
- Partials     2045     2061      +16     
Flag Coverage Δ
go-1.15-386 79.19% <ø> (?)
go-1.15-amd64 79.21% <ø> (?)
go-1.16-386 79.23% <ø> (?)
go-1.16-amd64 79.26% <ø> (?)
go-1.17-386 79.22% <71.34%> (?)
go-1.17-amd64 79.19% <71.34%> (?)
go-1.18-386 78.85% <ø> (-0.44%) ⬇️
go-1.18-amd64 78.80% <ø> (-0.40%) ⬇️
go-1.19-386 79.16% <ø> (+0.01%) ⬆️
go-1.19-amd64 79.21% <ø> (+0.12%) ⬆️
go-1.20-386 79.20% <ø> (+<0.01%) ⬆️
go-1.20-amd64 79.21% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
contrib/drivers/sqlitecgo/sqlite.go 71.34% <71.34%> (ø)

... and 17 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@horizon220222
Copy link
Contributor Author

20230709130705

fix: building errors 1.15 and 1.16 (undefined: math.MaxInt)

contrib/drivers/sqlitecgo/go.mod Outdated Show resolved Hide resolved
contrib/drivers/sqlitecgo/README.md Outdated Show resolved Hide resolved
contrib/drivers/sqlitecgo/sqlite.go Outdated Show resolved Hide resolved
@gqcn
Copy link
Member

gqcn commented Jul 25, 2023

@horizon220222 Any updates?

@horizon220222
Copy link
Contributor Author

最近比较忙,已经修改

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Recently busy, has been modified

.github/workflows/build_and_test.sh Outdated Show resolved Hide resolved
contrib/drivers/sqlitecgo/go.mod Outdated Show resolved Hide resolved
contrib/drivers/sqlitecgo/sqlite.go Show resolved Hide resolved
@gqcn gqcn merged commit 2fbe412 into gogf:master Aug 3, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants