-
Notifications
You must be signed in to change notification settings - Fork 469
Alllow .res files in stdlib #5714
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
Conversation
Files in stdlib use ocamldep to figure out dependencies. Allow .res files and temporarily convert them to .ml to feed them to ocamldep
@cknitt @mattdamon108 this is just a proof of concept -- I'll need some JS help to clean it up. |
Is this really intended for 10.1? Or should it rather go into 11.0? What exactly would you like to get cleaned up? |
I'd like to be able to export functions which are ml keywords. |
So one can convert to .ml without ovewrtiting ".cm*" files.
One issue remaining is that config (performed by ninja.js at the end of build) has at least the same effect as There's already something like that going on even before this PR: If you do a clean build. Then build again, some work is done. The third time it is not. Looks like something in "test" is changed at the end of the first build (presumably by config), so that the second build needs to do work again. |
No need to protect now that a temporary dir is used for temporary .ml files. Of course, it would be nice to clean up the build, separately.
more idiomatic path parse Co-authored-by: woonki <woonki.moon@gmail.com>
jscomp/others/release.ninja
Outdated
@@ -63,11 +63,13 @@ o others/js_vector.cmj : cc_cmi others/js_vector.ml | others/belt_internals.cmi | |||
o others/js_vector.cmi : cc others/js_vector.mli | others/belt_internals.cmi others/js.cmi $bsc | |||
o others/js_weakmap.cmi others/js_weakmap.cmj : cc others/js_weakmap.ml | others/belt_internals.cmi others/js.cmi $bsc | |||
o others/js_weakset.cmi others/js_weakset.cmj : cc others/js_weakset.ml | others/belt_internals.cmi others/js.cmi $bsc | |||
o others/js_xxx.cmi others/js_xxx.cmj : cc others/js_xxx.res | others/belt_internals.cmi others/js.cmi others/js_promise.cmj $bsc | |||
o others/js_yyy.cmi others/js_yyy.cmj : cc others/js_yyy.res | others/belt_internals.cmi others/js.cmi others/js_xxx.cmj $bsc |
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 looks good: js_xxx
uses js_promise
and js_yyy
uses js_xxx
This is ready for another review. It is now using a temporary directory, so even if dependencies get computed twice in parallel, it still works. Separately, the build needs to be cleaned up. Why does it compute dependencies twice. And why the dev and build ninjas are identical, and why is there a distinction between dev and build, and what is and is not supposed to run in parallel anyway, and why tests build again after a successful clean build. |
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.
Looks good! 👍 🎉
Just a few nits, and the Js_xxx and Js_yyy should be removed before merging.
Files in stdlib use ocamldep to figure out dependencies. Allow .res files and temporarily convert them to .ml to feed them to ocamldep