Skip to content

Commit

Permalink
Compatibility with javalib 3.1 release
Browse files Browse the repository at this point in the history
Summary:
This javalib release gives compatibility with java 9 modules.
It should also remove some Infer warnings (when a class has no superclass)
JFile.sep is now a char

Reviewed By: jvillard

Differential Revision: D16220583

fbshipit-source-id: 5d05afde0
  • Loading branch information
davidpichardie authored and facebook-github-bot committed Jul 17, 2019
1 parent 380515b commit f47d4ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
9 changes: 3 additions & 6 deletions infer/src/java/jClasspath.ml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ let add_models jar_filename =

let is_model procname = String.Set.mem !models_specs_filenames (Typ.Procname.to_filename procname)

let split_classpath =
assert (Int.( = ) (String.length JFile.sep) 1) ;
let char_sep = JFile.sep.[0] in
fun cp -> String.split ~on:char_sep cp

let split_classpath = String.split ~on:JFile.sep

let classpath_of_paths paths =
let of_path path =
Expand All @@ -56,7 +52,8 @@ let classpath_of_paths paths =
L.debug Capture Medium "Path %s not found" full_path ;
None
in
List.filter_map paths ~f:of_path |> String.concat ~sep:JFile.sep
let string_sep = Char.to_string JFile.sep in
List.filter_map paths ~f:of_path |> String.concat ~sep:string_sep


type file_entry = Singleton of SourceFile.t | Duplicate of (string * SourceFile.t) list
Expand Down
2 changes: 1 addition & 1 deletion opam
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ depends: [
"ctypes" {>="0.9.2"}
"dune" {build & >="1.0"}
"elina" {>="1.1"}
"javalib" {="3.0"}
"javalib" {>="3.1"}
"mtime"
"ocaml" {>="4.06.0"}
"ocamlfind" {build}
Expand Down
3 changes: 1 addition & 2 deletions opam.locked
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ depends: [
"camlidl" {= "1.05"}
"camlp4" {= "4.07+1"}
"camlzip" {= "1.08"}
"camomile" {= "1.0.1"}
"cmdliner" {= "1.0.4"}
"conf-autoconf" {= "0.1"}
"conf-gmp" {= "1"}
Expand All @@ -60,7 +59,7 @@ depends: [
"fieldslib" {= "v0.12.0"}
"integers" {= "0.2.2"}
"jane-street-headers" {= "v0.12.0"}
"javalib" {= "3.0"}
"javalib" {= "3.1"}
"jbuilder" {= "transition"}
"jst-config" {= "v0.12.0"}
"menhir" {= "20190626"}
Expand Down

0 comments on commit f47d4ed

Please sign in to comment.