-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
JNI interface to opening ZIM archives (including embedded ones) by fd #429
Conversation
59c70e4
to
1a5a2e7
Compare
d96433c
to
e1736b0
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
This looks like it is working for me on the Android side. Is it ready to merge and publish? |
@veloman-yunkan Can we merge the two PRs in libzim and libkiwix soon? Before libzim 7.0.0 release? |
Yes. I will submit both PRs for review over the weekend. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
@veloman-yunkan Do you have still a lot to do on this PR (now that the libzim sibling PR has been merged)? |
I don't think so |
526a4cc
to
37d6ee3
Compare
Codecov Report
@@ Coverage Diff @@
## master #429 +/- ##
==========================================
- Coverage 59.73% 59.62% -0.12%
==========================================
Files 50 50
Lines 3410 3418 +8
Branches 1732 1736 +4
==========================================
+ Hits 2037 2038 +1
- Misses 1370 1377 +7
Partials 3 3
Continue to review full report at Codecov.
|
@veloman-yunkan |
0974192
to
fdb4e9c
Compare
@kelson42 Done, but we better bring it into |
@veloman-yunkan Thx, up to you, you might be right. Fell free to open a new PR. Just wanted that it does not get forgotten. |
fdb4e9c
to
8f5ee8e
Compare
|
The kiwixlib java wrapper unit test can be run manually via the src/wrapper/java/org/kiwix/testing/compile_test.sh script. The test ZIM files in src/wrapper/java/org/kiwix/testing were created using the create_test_zimfiles. They must be updated/re-generated and committed in git whenever their source data or the create_test_zimfiles script changes. Note: small.zim.embedded is not used at this point, it was created for testing the enhancement coming in a few commits.
... and a corresponding unit test
Opening ZIM archives by file descriptor (as well as embedded ZIM archives) is not supported under Windows.
8f5ee8e
to
839fc10
Compare
We have to bump to a major release name. I have rebased on |
@mgautierfr We are expecting your review here to carry on. |
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.
{ | ||
|
||
/* initialize random seed: */ | ||
srand(time(nullptr)); |
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.
Now that we implement random in libzim (openzim/libzim#476) this may be not necessary.
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.
I see some inconsistency here. #446 doesn't drop the call to srand()
in the other (pre-existing) constructor of kiwix::Reader
. If that was an omission, then #446 can be amended for all three constructors of kiwix::Reader
. Otherwise, if one constructor of kiwix::Reader
contains that code, the others should do the same.
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.
Yes, see my global comment in the PR. We should remove it in #446.
Yes, it is a pity that a change in the wrapper (Pair->DirectAccessInformation) force us to dump the major version of the whole kiwix-lib but we have to. |
I guess we could merge that one now? |
In fact, I was wondering why it wasn't merged |
Will fix #423
This PR exposes in the
libkiwix
java wrapper the functionality introduced by openzim/libzim#449.The changes were tested in
native_mixed
build mode via thesrc/wrapper/java/org/kiwix/testing/compile_and_run_test.sh
script. Achieving successful compilation in that mode required some tweaks. In particular,(cd BUILD_native_mixed/INSTALL/; ln -s ../../BUILD_native_static/INSTALL/include)
(cd BUILD_native_mixed/INSTALL/; meson configure -Dwrapper=java)
fatal error: jni.h: No such file or directory
compilation error was worked around as follows (I realize that it is just a hack but it worked):Java unit tests were run as follows:
All changes in c++ code are covered via the java unit tests which are not run by the CI, hence the failure of the codecov/patch check.