-
Notifications
You must be signed in to change notification settings - Fork 85
Externals Extraction from .cmt Files #3699
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
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 fine. I did not carefully review the contents of extract_externals/
, since it was reviewed elsewhere earlier.
One additional remark: I think it would be good to put either a readme file in that directory or a comment in extract_externals.mli
explaning what it is.
If, in the interest of getting this into our next release, you want to address any of these comments in a future PR, that's fine, just merge.
I added a readme file that explains the basic usage of the extraction. I would postpone fine tuning the readme to a future PR. |
This PR adds a command line tool to the compiler that can be used to extract shape information about the external declarations in
.cmt
files. The tool is built asextract_externals.opt
.The impact on the rest of the compiler from this PR is minimal. To reduce code duplication, the environment reconstruction in
envaux.ml
is parameterized by a flag whether it show allow or disallow missing modules in the reconstruction of the environment. Apart from this change, this PR only adds functionality in new files.The externals extraction. The extraction takes as input
.cmt
files along with a sequence of-I
,-H
, and-open
flags that would be used for compilation. It then outputs a sexp expression that lists the external declarations that it found in the.cmt
files along with information about their shapes.