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

doc: document the Melange sources / folder structure in CONTRIBUTING.md #805

Merged
merged 6 commits into from
Oct 22, 2023

Conversation

anmonteiro
Copy link
Member

No description provided.

Copy link
Member

@jchavarri jchavarri left a 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 ✨

CONTRIBUTING.md Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
[`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)
Copy link
Member

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).

Copy link
Member Author

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.

Copy link
Member

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.

Comment on lines +161 to +162
- the Melange FFI (Foreign Function Interface) `external`s and attributes
are interpreted in the PPX.
Copy link
Member

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

pval_prim = External_ffi_types.inline_int64_primitive s;

that are later picked up by lambda

| 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.

anmonteiro and others added 3 commits October 22, 2023 00:35
Co-authored-by: Javier Chávarri <javier.chavarri@gmail.com>
…e-re/melange into anmonteiro/compiler-codebase-tour
@anmonteiro anmonteiro merged commit 45f98ad into main Oct 22, 2023
4 checks passed
@anmonteiro anmonteiro deleted the anmonteiro/compiler-codebase-tour branch October 22, 2023 21:37
@anmonteiro
Copy link
Member Author

@jchavarri I made a few changes thanks to your suggestions. Feel free to suggest further improvements.

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.

2 participants