fix path lookup, improve 4.05/4.06 support (pass 100% of make check), add Travis CI - #11
Merged
Conversation
Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Helps debugging path lookup. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Path lookup was not finding the example sources, because `normalize_path` returns a path that ends with a `/` always. normalize_path should only be used on the directory component of a filename. Also the leading dots should be removed from filenames. Make check is now finding all the sources again. Fixes #10 Signed-off-by: Edwin Török <edvin.torok@citrix.com>
It was not finding the implicit references to `?a` and `?b` from `anon-call.ml`: `else if x mod 4 <> 0 then let tmp = (fun l -> List.map (AnonFn.f) l) in ignore (tmp [])` And concluded that `?a` should be `~a` due to the previous line but that is wrong: `if x > 32 then let tmp = (fun l -> List.map (AnonFn.f ~a:12) l) in ignore (tmp [])` Fix `DeadArg` so it sees the call on the else line. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
`ignore(o)` was treating all methods of `o` as used due to the type of `o` getting expanded to a `Tobject` with all the methods. IIUC this is due to same reason as in DeadCode.ml:219, the type is not present in the source code but gets expanded by the time we reach this place. If we are dealing with the object itself do not mark its methods used. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Dune wraps libraries by default with a library_name__ prefix, when looking for the source file remove this prefix if it exists. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Also add Travis CI integration. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Contributor
|
Wonderful, thanks! |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make checkwill now succeed on master, see commit messages for individual changes.Tested on OCaml 4.06.1 locally (Linux), and OCaml 4.05.0/4.06.0 on Travis.
This should fix #10 and be useful for #6
Not sure why we need to look up the source file name based on the binary object file name, surely the
.cmi/.cmtfiles themselves should have enough location information inside them to determine what the real source is without making assumptions about the build system?