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
Rework bundled compilation to support included extensions #127
Conversation
CC @wangfenjin |
You can run https://github.com/wangfenjin/duckdb-rs/blob/main/add_rustfmt_hook.sh |
Do you think it's better to depends on the openssl crate directly? Instead of copy all the code to our repo |
Awesome, I've done that, but for some reason I think it's still producing slightly different results (like maybe the line lengths are different). Let's see if this most recent CI passes...
I don't think that's possible unfortunately — I had to make some modifications including returning some values out of the |
Codecov Report
@@ Coverage Diff @@
## main #127 +/- ##
==========================================
- Coverage 59.54% 59.40% -0.14%
==========================================
Files 26 26
Lines 1483 1483
==========================================
- Hits 883 881 -2
- Misses 600 602 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Let's add a feature maybe called And then add the flag in ci to make it build passed Thanks @ankrgyl |
It will be better if you can also help add some tests to verify these extensions actually works, the tests will also be used as examples for other users. The tests can be enabled by |
If you don't have the time to add tests it's fine, I'll do that later after this one merged |
Is the submodule and tar.gz v0.7.1 ? |
https://github.com/wangfenjin/duckdb-rs/blob/main/libduckdb-sys/upgrade.sh#L14-L16 we may also update this file to make update version easier in the future. But that fine I can do that after this one get merged |
Thank you @ankrgyl . This looks great and I'll be your first happy user of this as I've been hoping for this functionality for some time. I especially like what you did with tar.gz on the duckdb directory, nice! |
Would prefer if you could do that in a separate change. Thank you for offering!
Yes although I noticed that yours are generated on an x86 linux machine and mine on an arm64 mac. Maybe we should generate them on one of your machines?
I think the new |
Additionally, I discovered that the build scripts we pulled from OpenSSL were I fixed those in this commit: a3c3ced |
I generated on a intel mac. Never notice the difference of this, maybe we should delete the file and always generate the file on the fly in the build process. I'll follow up this issue |
Ah got it. I think technically it may be ok (?) at least according to CI, but I agree that generating it dynamically is safer. |
@wangfenjin could you help me with windows? I'm not familiar nor have an environment of my own to test with. I followed https://github.com/sfackler/rust-openssl/blob/master/.github/workflows/ci.yml#L93 to add VCPKG and hoped that would work... |
Just pushed a change to try this (although not sure I got the syntax correct). |
This change takes advantage of duckdb/duckdb-rs#127 to directly bundle the relevant extensions into DuckDB. With this change, we can be sure that QueryScript will work across all platforms it compiles on, and startup times are much (~0.5-1s) faster.
Change-Id: I67dd345659e9957cac8590aad1d7dd8ac190cb53
This reverts commit 96bdc43.
Change-Id: Ifa042c7f4be521a210636c7870e1e225946910e8
Some follow up:
|
Thanks @ankrgyl for your help! I’ll merge this PR now |
@wangfenjin Thanks for merging this change in. Any change a new release can be cut with these features available? |
We try to keep the version same with duckdb for easy maintenance, for now maybe you can use master branch, I always keep master branch works |
Thank you @ankrgyl . Going to try this for my own project at the earliest opportunity. I've been waiting for this for a while and looking at the changes in the PR, I certainly couldn't have done it without you so very grateful! 🙏🙌 |
This change reworks the bundled compilation process so that we can support built-in extensions, like httpfs, to the compilation process. There are a number of changes that support it:
package_build.build_package
from the DuckDB repo to gather source files, including extensions. We no longer use the amalgamation, and end up pulling more than 3,000 files. To keep the number of files in the repo small, we tar.gz the duckdb directory (and untar it on demand). This is all managed from a new script calledupdate_sources.py
.