Skip to content
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

Better stub generation #700

Merged
merged 4 commits into from
Oct 1, 2018
Merged

Better stub generation #700

merged 4 commits into from
Oct 1, 2018

Conversation

rgrinberg
Copy link
Contributor

This PR is twofold:

  • Use dune's promotion mechanism to generate the stubs file. This makes it easier to verify that the process is correct as the generated stubs are now expected. This also makes it unnecessary for users to run any shell scripts during compilation.

  • The second commit replaces the shell script with a pure OCaml script. It's a little longer, but it should be portable. Also, it outputs the stubs with slightly better formatting.

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
@hhugo
Copy link
Member

hhugo commented Oct 1, 2018

I would have expected to see a rule for lib/js_of_ocaml_stubs.c with a (mode fallback)

@rgrinberg
Copy link
Contributor Author

Do you mean (mode promote)? How do you expect to regenerate the fallback rule?

rgrinberg and others added 2 commits October 1, 2018 14:26
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
@hhugo
Copy link
Member

hhugo commented Oct 1, 2018

Do you mean (mode promote)?

probably :)

@hhugo
Copy link
Member

hhugo commented Oct 1, 2018

I've pushed a commit to use the ocaml lexer instead of a custom one. I should resolve some issue I had in #671 where external is not on the same line as the primitive name

@rgrinberg
Copy link
Contributor Author

Makes sense. That's quite a bit better.

@hhugo hhugo merged commit f660068 into ocsigen:master Oct 1, 2018
@hhugo
Copy link
Member

hhugo commented Oct 1, 2018

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants