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
Load 'mini_portile2' only when needed. #381
Conversation
Hmm, is there one more place where the require should be needed?
I should probably check this. |
@voxik Thanks for opening this PR! This seems like a reasonable request, I'll take a deeper look this weekend. |
This enables installation using system SQLite3 without having mini_portile2 around: ~~~ gem install --force sqlite3 -- --enable-system-libraries ~~~
00b11a9
to
193c5e0
Compare
I have moved the require into |
Kicked off CI again. Thanks! |
Thx, looks better this time 👍 |
@voxik I'm in the process of adding a check for this to the CI suite. I'm having problems using the installed gem which I imagine aren't a problem for your Fedora build pipeline but wanted to just verify before proceeding ... Here's what I think the test should look like: gem uninstall mini_portile2 --all --force
gem install --local --force $gem -- --enable-system-libraries
if gem list -i mini_portile2 ; then
echo "should not have installed mini_portile, failing"
exit 1
fi
ruby -r sqlite3 -e 'pp SQLite3::SQLITE_VERSION, SQLite3::SQLITE_LOADED_VERSION' That last line, though, results in an exception like:
I think the right thing to do in this test is to simply verify that the build can succeed, and not to worry about running the gem. Correct? |
Yes, that is not surprising. To avoid that issue, we drop the mini_portile2 runtime dependency during the build: I think this is acceptable modification, because neither the prebuilt gems have this dependency.
Yes, right. |
Thanks. I'll push my test and re-run CI. |
Merged! Will be in the next release. |
This enables installation using system SQLite3 without having mini_portile2 around:
FTR, this is the process used by Fedora package, where we like to avoid maintaining additional dependencies unless really needed.