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

Update github.com/mattn/go-sqlite3 to newer version #56

Closed
briancain opened this issue Jul 25, 2024 · 5 comments
Closed

Update github.com/mattn/go-sqlite3 to newer version #56

briancain opened this issue Jul 25, 2024 · 5 comments

Comments

@briancain
Copy link
Member

Describe the bug

When using this library, when I run my tests, I get this sqlite error, which comes from an old version of sqlite pulled in by this library:

From go.mod:

github.com/hashicorp/go-dbw v0.1.2

But this also exists on v0.1.3 as well.

=== Errors
sqlite3-binding.c: In function 'sqlite3SelectNew':
sqlite3-binding.c:125801:10: warning: function may return address of local variable [-Wreturn-local-addr]
125801 |   return pNew;
       |          ^~~~
sqlite3-binding.c:125761:10: note: declared here
125761 |   Select standin;
       |          ^~~~~~~

DONE 373 tests, 1 skipped, 5 errors in 201.283s

mattn/go-sqlite3#803
mattn/go-sqlite3#822

https://github.com/hashicorp/go-dbw/blob/1d5f53bf2a7a95abae6879531fca90aa6db2213a/go.mod#L45C1-L45C50

In theory, bumping to the 2.x version with go-sqlite3 might fix this.

To Reproduce

Steps to reproduce the behavior:

Pull in this library from at least v0.1.2 and write a test that invokes the go-dbw library, see the error/warning message from sqlite3-binding.

Expected behavior

No errors from an old sqlite library

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

@briancain
Copy link
Member Author

Maybe pinging @jimlambrt since I see you are active on this repo

@jimlambrt
Copy link
Collaborator

It seems like you can either ignore the warning or upgrade your installed version of sqlite to eliminate the warning.

Gorm's sqlite driver is the owner of the go-sqlite3 version we're using, so we can't just upgrade to v2 (if that would even eliminate the warning).

Sorry, I'm not sure there's anything else we can do here to eliminate the warning.

@briancain
Copy link
Member Author

Ah, I don't have sqlite installed. It's coming from whatever is up the dependency tree, looks like from Gorm itself.

And yep, I could ignore, but if it's something already fixed in a new version, it would be better to upgrade. But thanks for the info!

@jimlambrt
Copy link
Collaborator

Closing for now.

@Damuammu
Copy link

Damuammu commented Aug 15, 2024

Describe the bug

When using this library, when I run my tests, I get this sqlite error, which comes from an old version of sqlite pulled in by this library:

From go.mod:

github.com/hashicorp/go-dbw v0.1.2

But this also exists on v0.1.3 as well.

=== Errors
sqlite3-binding.c: In function 'sqlite3SelectNew':
sqlite3-binding.c:125801:10: warning: function may return address of local variable [-Wreturn-local-addr]
125801 |   return pNew;
       |          ^~~~
sqlite3-binding.c:125761:10: note: declared here
125761 |   Select standin;
       |          ^~~~~~~

DONE 373 tests, 1 skipped, 5 errors in 201.283s

mattn/go-sqlite3#803 mattn/go-sqlite3#822

https://github.com/hashicorp/go-dbw/blob/1d5f53bf2a7a95abae6879531fca90aa6db2213a/go.mod#L45C1-L45C50

In theory, bumping to the 2.x version with go-sqlite3 might fix this.

To Reproduce

Steps to reproduce the behavior:

Pull in this library from at least v0.1.2 and write a test that invokes the go-dbw library, see the error/warning message from sqlite3-binding.

Expected behavior

No errors from an old sqlite library

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

even after adding flag getting same waring iam unable to install jaeles. since internally while installing jaeles its install go-sqllite3

github.com/mattn/go-sqlite3

sqlite3-binding.c: In function ‘sqlite3SelectNew’:
sqlite3-binding.c:129019:10: warning: function may return address of local variable [-Wreturn-local-addr]
129019 | return pNew;
| ^~~~
sqlite3-binding.c:128979:10: note: declared here
128979 | Select standin;
| ^~~~~~~
image

Please advise

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

3 participants