Skip to content

Convert Belt sources to .res #6271

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

Merged
merged 3 commits into from
Jun 1, 2023
Merged

Convert Belt sources to .res #6271

merged 3 commits into from
Jun 1, 2023

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented May 28, 2023

This converts the Belt sources, including the .cppo files, to .res/.resi.

I have left the converted files as they are - may I leave the cleanup of the docstrings to @ryyppy?

@cknitt cknitt changed the title Belt res Convert Belt sources to .res May 28, 2023
@cknitt cknitt requested review from cristianoc and ryyppy May 28, 2023 14:33
@cknitt cknitt marked this pull request as ready for review May 28, 2023 15:01
Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing

@ryyppy
Copy link
Member

ryyppy commented May 28, 2023

what does "cleanup of docstrings" mean in particular?

@cknitt
Copy link
Member Author

cknitt commented Jun 1, 2023

@ryyppy I resolved all the issues with the doc comments, the PR is ready to go.

function preprocessorNinjaSync() {
var cppoNative = `
${cppoRule()}
${cppoRule("-n")}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prevent generating lines like

# 1 "others/hashmap.cppo.res"

which the ReScript parser does not like.

Copy link
Member

@ryyppy ryyppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!

At some point we said we want to get rid of the cppo stuff, since A) the cppo-ed modules aren't really that common to be used and B) we'll probably never change them ever again after rescript-core has been established — but really nice you could maintain the current state with .res.

The format of the docstrings is probably not perfect, but we'll fix that as we try to extract the docstrings for the v11 docs.

@cknitt cknitt merged commit 22e69d2 into rescript-lang:master Jun 1, 2023
@cknitt cknitt deleted the belt-res branch June 1, 2023 07:51
@cristianoc
Copy link
Collaborator

The one thing that cppo blocks right now is formatting.
But perhaps we can just selectively disable formatting for those files? @cknitt what do you think?

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.

3 participants