-
Notifications
You must be signed in to change notification settings - Fork 416
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
Split calls to ocamldep #486
Conversation
Instead of doing a single call to ocamldep, do one per file. This is needed to support "menhir --infer". This should also make compilation go further when there are files with syntax errors.
The cram tests disagree in CI:
Curious about why is this change desired. Doesn't this slow builds by invoking an external command potentially a lot more often? The interface looks much better. |
src/ordered_set_lang.ml
Outdated
String_map.find_exn (f fn) files_contents ~string_of_key:(sprintf "%S") | ||
~desc:(fun _ -> "<filename to s-expression>") | ||
) ~f:(fun s -> f (String_with_vars.t s)) | ||
parse_general (Option.value_exn (String_map.find (f fn) files_contents)) |
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.
String_map.find (f fn) files_contents
returning None
was also impossible before this change as well? Could you remind me why that is?
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.
This code is only called from Super_context.expand_and_eval_set
where it's easy to check the correctness. I hesitated between doing this and upgrading this code to Sexp.code_error
but maybe I should, just for uniformity
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.
done
src/module_compilation.ml
Outdated
| Cmi | Cmo -> [Module.cm_file m ~dir Cmi] | ||
| Cmx -> [Module.cm_file m ~dir Cmi; Module.cm_file m ~dir Cmx]))) | ||
(Ocamldep.Dep_graph.deps_of dep_graph m >>^ fun deps -> | ||
List.concat_map deps |
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.
An accidental space snuck in here
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.
oops
I'll check the performance implications. The motivations are:
|
I tried to build jenga from scratch with -j1 and -j20. It is slightly slower indeed:
Though I'm still in favour of this patch since it allows to support |
I'm merging this as the slowdown is relatively small, we have a way to improve things and I need this PR for another one I'm preparing. |
Well, I'll merge it once node is installed and I can re-generate the js_of_ocaml tests... |
Ok. Fine with me. Slow doesnt seem so bad and it might perform better on
some incremental builds
…On Tue, Feb 6, 2018, 7:46 PM Jérémie Dimino ***@***.***> wrote:
Well, I'll merge it once node is installed and I can re-generate the
js_of_ocaml tests...
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#486 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAIe-2d1pDPUFGgg9QCE87vKvbsC6q-Yks5tSDt_gaJpZM4R5-HX>
.
|
Instead of doing a single call to ocamldep, do one per file. This will allow to support
menhir --infer
(#305).