-
-
Notifications
You must be signed in to change notification settings - Fork 628
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
Can't use gorm because the change of crawshaw.io/sqlite #421
Comments
@hichenming oh dear, this is tricky. Are you aware of a way to allow both to be linked together? If not, I think a tag is the right way forward, as you suggest. |
I had the same issue. After searching for many hours I didn't find a way to link them together or anything but I found a way to make it work by allowing multiple definitions with this flag |
I tried running after using the command, it still fails to compile and it did create the replace in the go.mod file
|
@Zelak312 thanks |
I have the same error and I can't update from 1.15.2 to 1.18.1. I've tried |
@skinner12 @Zelak312 @hichenming could you confirm that you're using github.com/mattn/go-sqlite3 elsewhere in your application? It's nothing internal to anacrolix/torrent that is using it? I thought the fix in github.com/getlantern/sqlite would fix this issue, but then ran into it myself with another application I have that used mattn/go-sqlite3 throughout, and tried to use a recent anacrolix/torrent that was using crawshaw.io/sqlite. I'm not sure what the best way forward is, I expect a tag and/or something linker related is required. I'm not sure it's reasonable to expect anacrolix/torrent to revert to mattn/go-sqlite3, just because that's the most popular module for sqlite3 in Go. It could be possible to break out some of the sqlite stuff in anacrolix/torrent into modules that aren't always depended on, or provide a tag to exclude that stuff so that another sqlite module can be used elsewhere in an application. |
Hi @anacrolix, I confirm that I'm using sqlite3 elsewhere: I used it for save some infos from downloading torrents and other data. Anyway, now that my app gets bigger, I choose to use postgresql so I didn't get sqlite3 dependence, the error disappears and I updated to latest version of anacrolix/torrent seamless. Thanks for your support |
Thanks for the feedback @skinner12 . |
When crawshaw.io/sqlite and mattn/go-sqlite3 are in the same binary, try passing |
This should be fixed with #421 (comment). |
I have the same issue. And mentioned solution doesn't work...
After it:
Without |
@racoon-devel I am not able to reproduce this. Could you provide a link to your project so I can try build it? |
Sure, branch |
I pushed a fix to https://github.com/anacrolix/rms-torrent/tree/feature/advanced-torrent. For some reason your anacrolix/torrent is stuck on v1.11.0. This happens frequently, it's a combination of golang/go#55955 and golang/go#56494 making it nontrivial to upgrade. You should find it's fixed if you incorporate the changes in the branch above, and ensure that anacrolix/torrent does not regress to v1.11.0. |
Oh... @anacrolix Thank you so much! |
torrent has changed sqlite library to use crawshaw.io/sqlite in this commit 7455b98
I use gorm to manage database, and gorm needs sql diver github.com/mattn/go-sqlite3, as a result, I can't compile my project now:
Is there a workround that we can choose which sqlite lib to use? Maybe add some build flag?
Thanks advance, nice work anyway.
The text was updated successfully, but these errors were encountered: