-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Issue 787: enable SQLITE_ENABLE_UPDATE_DELETE_LIMIT #802
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
base: master
Are you sure you want to change the base?
Conversation
20be4be
to
b0f0357
Compare
Dammit: |
b0f0357
to
9955ad5
Compare
I wonder the changes for sqlite-binding.c will be updated & reverted with |
Oh, is I've now noticed rewriting the upgrade tool had indeed been suggested before: #500 (comment) If you don't feel comfortable merging in PRs with changes to the bindings directly, I could also remove this part of the change and let you run the updated upgrade script yourself afterwards. Up to you! |
Hi again! Any thoughts about the change, then? :) |
UP |
I don't want to update sqlite3-binding.c directly. So if you want to add this, please update upgrade/upgrad.go to enable you want. |
Did I understand this right? You're happy with accepting my change to the upgrade script, but want to run it and commit the bindings changes yourself? I've removed the changes to Let me know if it's OK now! :) |
Thanks. But please keep to write in Go since I want to run this script on Windows too. |
I don't think that's possible, sadly. At least I couldn't think of a way to do so (I mean, even a go script would have to either call configure/make or nmake on windows). EDIT: Hmm, it does look like invoking the build tools from go should work fine. There could then be a separate windows/unix implementation. Would the windows environment indeed have |
All right! Here's my attempt at going back to go. I ended up rewriting more of the original It does run on Windows as well, provided the right tools are available ( |
upgrade/upgrade_windows.go
Outdated
) | ||
|
||
func buildAmalgamation(baseDir, buildFlags string) error { | ||
args := []string{"/f", "Makefile.msc", "sqlite3.c"} |
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.
Please check "gcc" can be used at the first.
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.
What command should be run if gcc is available? And how should I check if it is?
Sorry, I'm not developing on Windows, so I'm not sure of all the ways to build this, and what the typical toolchains would be.
The only thing I tried was installing Visual Studio and ActiveTcl, and then running the recommended nmake
script. This worked for me. I didn't try MinGW or anything like that...
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.
Ehm, I was still waiting for some clarifications here...
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.
Still no feedback? :/
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.
MinGW works mostly like UNIX.
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.
Thanks for looking at it again!
So does running
$ sh configure
$ make sqlite3.c
work indeed?
In which case should we get rid of upgrade_windows.go
altogether?
Or should both ways of building be available, either picked based on some CLI flag, or by trying one and checking for 'executable not found' or something to decide whether it should fall back to the other way?
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.
c:\msys64\usr\bin\bash.exe -c ./configure
c:\msys64\usr\bin\make.exe sqlite3.c
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.
Sounds good. I'll make windows and unix code symmetrical then, simply with default paths to bash
and make
different (and configurable). And will get rid of nmake
, unless you think it's useful to leave it in there?
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.
(Is the -c
necessary, by the way? Not that it makes much difference... just curious. I will now invoke configure this way indeed, and run bash
by default.)
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.
Hey again! Any thoughts about the current implementation? Do you want me to do any more changes?
Hey @mattn! Are you still interested in this change, or should I just close the PR? |
It's been a while! Any chance you could have another look? :) Also, maybe #828 should go in first: it's probably easier if I have to fix the rebase rather than the other way around... |
ad7dd67
to
69ffa53
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #802 +/- ##
=======================================
Coverage 46.72% 46.72%
=======================================
Files 12 12
Lines 1526 1526
=======================================
Hits 713 713
Misses 671 671
Partials 142 142 ☔ View full report in Codecov by Sentry. |
...anyway, so I did rebase on top of #828, assuming you might want that change indeed. But then frustratingly sqlite decided to now give sha3 instead of sha1, so for a hash check I had to bring non-stdlib-packages back in (and committing the go.sum seems to break non-linux go 1.11 builds...). Let me know what you want to do about that... |
69ffa53
to
b2839fc
Compare
OK, I see you took a different direction. Updated this PR accordingly. Could you maybe try it out again at some point? |
I tried to run new upgrade.go but nothing changed. |
🤔 Very strange. You mean it ran with no errors, but the bindings didn't get edited at all?? As comparison, here's the output when I run it:
How do you deal with the |
Now I exported upgrade package to https://github.com/mattn/go-sqlite3-upgrade |
I run go-sqlite3-upgrade but nothing changes. |
Oh I see. Well I don't see a branch or something with my changes in the new repository. Did you just copy-paste the changes from my PR locally into your /go-sqlite3-upgrade? Will you be deprecating the |
go-sqlite3-upgrade uses the code contained in this pull-request change set. I want to know what is updated and what is needed by this pull-request. Thanks. |
I'm sorry, I'm still confused. :s |
Ooops. Sorry. Could you please send the changes as same as this pull-request? |
Did I put the changes in the right place? 🙂 |
Subscribing; anything I can do to help this along? |
Good question... I can't answer it though! 😄 Well, maybe you could also double-check the change for sanity, give feedback if you have any; otherwise it's really up to mattn to find time to review and accept/reject the PR. |
Pinging again: is this ever going to be of interest, or should I just close and scrap the PR? |
@mattn A good amount of effort and discussion has been put into this PR -- would you be able to take a few minutes to review or approve it? (I don't have any expertise here, but it does seem to be thorough and the code looks pretty clean.) |
Hi @rittneje! Sorry to ping you, but I thought I'd try to get the ball rolling again here, and you seem to be more actively managing the package now. |
a1f0ed7
to
defa76a
Compare
build amalgamation with SQLITE_ENABLE_UPDATE_DELETE_LIMIT upgrade: go back to go
defa76a
to
e5f99d7
Compare
Since rebuilding the amalgamation from scratch requires the whole
./configure && make
thingy, running the upgrade script in go sadly won't do, so I rewrote it in bash.Oh, just though probably adding a unit test in the go package to check the DELETE with LIMIT works would be good.Done.Should resolve #787.