-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
doc: document the Melange sources / folder structure in CONTRIBUTING.md #805
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.
Thanks for writing this. Looking at the current structure, I can see how much it's been simplified in the last year or two ✨
[`jscomp/test/dist-es6`](https://github.com/melange-re/melange/tree/main/jscomp/test/dist-es6)) | ||
- **NOTE**: these snapshots are currently built manually. To do so, | ||
comment the only line in | ||
[`jscomp/dune`](https://github.com/melange-re/melange/blob/main/jscomp/dune) |
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.
Maybe worth pointing to the current commit in main
now, so that at least if folder layout changes in the future, the docs can point to the state where things were written (applies to all links to code in the document).
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.
I was thinking the fact they're on main
will let us catch if we ever break them. Meaning the guide should be updated.
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.
I was thinking the fact they're on
main
will let us catch if we ever break them.
I doubt we will know we are breaking them, as there is no mechanism to warn us.
- the Melange FFI (Foreign Function Interface) `external`s and attributes | ||
are interpreted in the PPX. |
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.
One part that confuses me about the current setup is that the PPX is not self-contained right? In the sense that part of the interpretation of these externals happens in the PPX, but another part happens at lambda compilation time.
E.g. the ppx inlines here some int64 constants
Line 655 in 1167ca7
pval_prim = External_ffi_types.inline_int64_primitive s; |
that are later picked up by lambda
melange/jscomp/core/lam_convert.ml
Line 544 in 1167ca7
| Ffi_inline_const i -> Lam.const i |
I am not sure if it's worth mentioning here that melange.ppx
is not a traditional ppx, in that sense, but is designed to work with the rest of the compiler.
Co-authored-by: Javier Chávarri <javier.chavarri@gmail.com>
…e-re/melange into anmonteiro/compiler-codebase-tour
@jchavarri I made a few changes thanks to your suggestions. Feel free to suggest further improvements. |
No description provided.