[deps] use patched version of javalib

Reviewed By: jvillard

Differential Revision: D5748106

fbshipit-source-id: 43589f8
master
Sam Blackshear 7 years ago committed by Facebook Github Bot
parent 879891a3af
commit 5a32fa966a

@ -167,6 +167,20 @@ install_infer-deps () {
opam pin add infer-deps "$INFER_DEPS_DIR"
}
# temporary: patch javalib and use local version as source of truth. can be removed once javalib
# creates a new release with the patch
# (https://gforge.inria.fr/tracker/index.php?func=detail&aid=21418&group_id=686&atid=2817)
install_patched_javalib() {
local javalib_dir="$INFER_ROOT"/dependencies/javalib
local unzipped_javalib_dir="$javalib_dir"/javalib-2.3.3
tar xvf "$javalib_dir"/javalib-2.3.3.tar.bz2 -C "$javalib_dir"
# apply the patch
patch -d "$unzipped_javalib_dir"/src < "$javalib_dir"/allow_empty_method.patch
opam pin add javalib "$unzipped_javalib_dir"
# clean up unzipped source
rm -rf "$unzipped_javalib_dir"
}
install_locked_deps() {
if ! opam lock 2> /dev/null; then
echo "opam-lock not found in the current switch, installing from '$OPAM_LOCK_URL'..." >&2
@ -176,6 +190,7 @@ install_locked_deps() {
}
install_opam_deps() {
install_patched_javalib
if [ "$USE_OPAM_LOCK" = yes ]; then
install_locked_deps
else

@ -0,0 +1,15 @@
--- jLow2High.ml 2016-11-01 08:10:40.000000000 -0700
+++ jLow2High.ml 2017-08-30 14:54:09.000000000 -0700
@@ -630,9 +630,9 @@
Java (lazy (low2high_code consts bootstrap_methods (Lazy.force c)))
| [] when is_native -> Native
| [] ->
- raise
- (Class_structure_error
- "A method not declared as Native, nor Abstract has been found without code.")
+ (* although this will never happen in bytecode generated by Javac, some bytecode generators
+ create empty method bodies without bothering to mark them native *)
+ Native
| [_] ->
raise
(Class_structure_error)

Binary file not shown.
Loading…
Cancel
Save