rescript-lang / rescript

ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript.
https://rescript-lang.org
Other
6.77k stars 453 forks source link

ReScriptify cppo files for certain belt / Js modules #5458

Closed ryyppy closed 3 months ago

ryyppy commented 2 years ago

As stated in #5361 (rescriptify Belt / Js docs), we noticed that some modules are generated from cppo.ml[i] files.

That means that some docs will get overridden with the old docs as soon as we re-generate the necessary files. Therefore we either need to remove cppo from our user-facing modules infra, or accommodate cppo with ReScript code.

Goal is to be able to generate the relevant res and resi files for our Js and Belt modules.

Full list of cppo files with their generated counterparts:

cristianoc commented 2 years ago

cppo does not actually parse files -- might run just as well on res files

cristianoc commented 2 years ago

ninja is instructed to only look for .ml and .mli files in jscomp/others but could look for .res and .resi

cknitt commented 1 year ago

Started implementing this. Indeed it works fine to run cppo on .res files.

cknitt commented 1 year ago

See #6271 for the Belt part.

I will extend that to the rest of jscomp/other in a separate PR later.

cknitt commented 3 months ago

Other cppo files were removed in #6283.